Fix docs error.
This commit is contained in:
@@ -51,6 +51,42 @@ DytnsapiClient::DytnsapiClient(const std::string & accessKeyId, const std::strin
|
||||
DytnsapiClient::~DytnsapiClient()
|
||||
{}
|
||||
|
||||
DytnsapiClient::DescribeEmptyNumberOutcome DytnsapiClient::describeEmptyNumber(const DescribeEmptyNumberRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeEmptyNumberOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeEmptyNumberOutcome(DescribeEmptyNumberResult(outcome.result()));
|
||||
else
|
||||
return DescribeEmptyNumberOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DytnsapiClient::describeEmptyNumberAsync(const DescribeEmptyNumberRequest& request, const DescribeEmptyNumberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeEmptyNumber(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DytnsapiClient::DescribeEmptyNumberOutcomeCallable DytnsapiClient::describeEmptyNumberCallable(const DescribeEmptyNumberRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeEmptyNumberOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeEmptyNumber(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DytnsapiClient::DescribeEmptyNumberDetectOutcome DytnsapiClient::describeEmptyNumberDetect(const DescribeEmptyNumberDetectRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
99
dytnsapi/src/model/DescribeEmptyNumberRequest.cc
Normal file
99
dytnsapi/src/model/DescribeEmptyNumberRequest.cc
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/dytnsapi/model/DescribeEmptyNumberRequest.h>
|
||||
|
||||
using AlibabaCloud::Dytnsapi::Model::DescribeEmptyNumberRequest;
|
||||
|
||||
DescribeEmptyNumberRequest::DescribeEmptyNumberRequest()
|
||||
: RpcServiceRequest("dytnsapi", "2020-02-17", "DescribeEmptyNumber") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeEmptyNumberRequest::~DescribeEmptyNumberRequest() {}
|
||||
|
||||
long DescribeEmptyNumberRequest::getResourceOwnerId() const {
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void DescribeEmptyNumberRequest::setResourceOwnerId(long resourceOwnerId) {
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string DescribeEmptyNumberRequest::getAccessKeyId() const {
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void DescribeEmptyNumberRequest::setAccessKeyId(const std::string &accessKeyId) {
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter(std::string("AccessKeyId"), accessKeyId);
|
||||
}
|
||||
|
||||
std::string DescribeEmptyNumberRequest::getRouteName() const {
|
||||
return routeName_;
|
||||
}
|
||||
|
||||
void DescribeEmptyNumberRequest::setRouteName(const std::string &routeName) {
|
||||
routeName_ = routeName;
|
||||
setParameter(std::string("RouteName"), routeName);
|
||||
}
|
||||
|
||||
std::string DescribeEmptyNumberRequest::getMask() const {
|
||||
return mask_;
|
||||
}
|
||||
|
||||
void DescribeEmptyNumberRequest::setMask(const std::string &mask) {
|
||||
mask_ = mask;
|
||||
setParameter(std::string("Mask"), mask);
|
||||
}
|
||||
|
||||
std::string DescribeEmptyNumberRequest::getResourceOwnerAccount() const {
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void DescribeEmptyNumberRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
|
||||
}
|
||||
|
||||
long DescribeEmptyNumberRequest::getOwnerId() const {
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void DescribeEmptyNumberRequest::setOwnerId(long ownerId) {
|
||||
ownerId_ = ownerId;
|
||||
setParameter(std::string("OwnerId"), std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string DescribeEmptyNumberRequest::getAuthCode() const {
|
||||
return authCode_;
|
||||
}
|
||||
|
||||
void DescribeEmptyNumberRequest::setAuthCode(const std::string &authCode) {
|
||||
authCode_ = authCode;
|
||||
setParameter(std::string("AuthCode"), authCode);
|
||||
}
|
||||
|
||||
std::string DescribeEmptyNumberRequest::getInputNumber() const {
|
||||
return inputNumber_;
|
||||
}
|
||||
|
||||
void DescribeEmptyNumberRequest::setInputNumber(const std::string &inputNumber) {
|
||||
inputNumber_ = inputNumber;
|
||||
setParameter(std::string("InputNumber"), inputNumber);
|
||||
}
|
||||
|
||||
68
dytnsapi/src/model/DescribeEmptyNumberResult.cc
Normal file
68
dytnsapi/src/model/DescribeEmptyNumberResult.cc
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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/dytnsapi/model/DescribeEmptyNumberResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dytnsapi;
|
||||
using namespace AlibabaCloud::Dytnsapi::Model;
|
||||
|
||||
DescribeEmptyNumberResult::DescribeEmptyNumberResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeEmptyNumberResult::DescribeEmptyNumberResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeEmptyNumberResult::~DescribeEmptyNumberResult()
|
||||
{}
|
||||
|
||||
void DescribeEmptyNumberResult::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["Status"].isNull())
|
||||
data_.status = dataNode["Status"].asString();
|
||||
if(!dataNode["Number"].isNull())
|
||||
data_.number = dataNode["Number"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DescribeEmptyNumberResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
DescribeEmptyNumberResult::Data DescribeEmptyNumberResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string DescribeEmptyNumberResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user