Fix docs error.
This commit is contained in:
@@ -21,6 +21,8 @@ set(dytnsapi_public_header
|
||||
include/alibabacloud/dytnsapi/DytnsapiExport.h )
|
||||
|
||||
set(dytnsapi_public_header_model
|
||||
include/alibabacloud/dytnsapi/model/DescribeEmptyNumberRequest.h
|
||||
include/alibabacloud/dytnsapi/model/DescribeEmptyNumberResult.h
|
||||
include/alibabacloud/dytnsapi/model/DescribeEmptyNumberDetectRequest.h
|
||||
include/alibabacloud/dytnsapi/model/DescribeEmptyNumberDetectResult.h
|
||||
include/alibabacloud/dytnsapi/model/DescribePhoneNumberAnalysisRequest.h
|
||||
@@ -60,6 +62,8 @@ set(dytnsapi_public_header_model
|
||||
|
||||
set(dytnsapi_src
|
||||
src/DytnsapiClient.cc
|
||||
src/model/DescribeEmptyNumberRequest.cc
|
||||
src/model/DescribeEmptyNumberResult.cc
|
||||
src/model/DescribeEmptyNumberDetectRequest.cc
|
||||
src/model/DescribeEmptyNumberDetectResult.cc
|
||||
src/model/DescribePhoneNumberAnalysisRequest.cc
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#include <alibabacloud/core/EndpointProvider.h>
|
||||
#include <alibabacloud/core/RpcServiceClient.h>
|
||||
#include "DytnsapiExport.h"
|
||||
#include "model/DescribeEmptyNumberRequest.h"
|
||||
#include "model/DescribeEmptyNumberResult.h"
|
||||
#include "model/DescribeEmptyNumberDetectRequest.h"
|
||||
#include "model/DescribeEmptyNumberDetectResult.h"
|
||||
#include "model/DescribePhoneNumberAnalysisRequest.h"
|
||||
@@ -67,6 +69,9 @@ namespace AlibabaCloud
|
||||
class ALIBABACLOUD_DYTNSAPI_EXPORT DytnsapiClient : public RpcServiceClient
|
||||
{
|
||||
public:
|
||||
typedef Outcome<Error, Model::DescribeEmptyNumberResult> DescribeEmptyNumberOutcome;
|
||||
typedef std::future<DescribeEmptyNumberOutcome> DescribeEmptyNumberOutcomeCallable;
|
||||
typedef std::function<void(const DytnsapiClient*, const Model::DescribeEmptyNumberRequest&, const DescribeEmptyNumberOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeEmptyNumberAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeEmptyNumberDetectResult> DescribeEmptyNumberDetectOutcome;
|
||||
typedef std::future<DescribeEmptyNumberDetectOutcome> DescribeEmptyNumberDetectOutcomeCallable;
|
||||
typedef std::function<void(const DytnsapiClient*, const Model::DescribeEmptyNumberDetectRequest&, const DescribeEmptyNumberDetectOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeEmptyNumberDetectAsyncHandler;
|
||||
@@ -126,6 +131,9 @@ namespace AlibabaCloud
|
||||
DytnsapiClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||
DytnsapiClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||
~DytnsapiClient();
|
||||
DescribeEmptyNumberOutcome describeEmptyNumber(const Model::DescribeEmptyNumberRequest &request)const;
|
||||
void describeEmptyNumberAsync(const Model::DescribeEmptyNumberRequest& request, const DescribeEmptyNumberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeEmptyNumberOutcomeCallable describeEmptyNumberCallable(const Model::DescribeEmptyNumberRequest& request) const;
|
||||
DescribeEmptyNumberDetectOutcome describeEmptyNumberDetect(const Model::DescribeEmptyNumberDetectRequest &request)const;
|
||||
void describeEmptyNumberDetectAsync(const Model::DescribeEmptyNumberDetectRequest& request, const DescribeEmptyNumberDetectAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeEmptyNumberDetectOutcomeCallable describeEmptyNumberDetectCallable(const Model::DescribeEmptyNumberDetectRequest& request) const;
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_DYTNSAPI_MODEL_DESCRIBEEMPTYNUMBERREQUEST_H_
|
||||
#define ALIBABACLOUD_DYTNSAPI_MODEL_DESCRIBEEMPTYNUMBERREQUEST_H_
|
||||
|
||||
#include <alibabacloud/dytnsapi/DytnsapiExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Dytnsapi {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_DYTNSAPI_EXPORT DescribeEmptyNumberRequest : public RpcServiceRequest {
|
||||
public:
|
||||
DescribeEmptyNumberRequest();
|
||||
~DescribeEmptyNumberRequest();
|
||||
long getResourceOwnerId() const;
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
std::string getAccessKeyId() const;
|
||||
void setAccessKeyId(const std::string &accessKeyId);
|
||||
std::string getRouteName() const;
|
||||
void setRouteName(const std::string &routeName);
|
||||
std::string getMask() const;
|
||||
void setMask(const std::string &mask);
|
||||
std::string getResourceOwnerAccount() const;
|
||||
void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
|
||||
long getOwnerId() const;
|
||||
void setOwnerId(long ownerId);
|
||||
std::string getAuthCode() const;
|
||||
void setAuthCode(const std::string &authCode);
|
||||
std::string getInputNumber() const;
|
||||
void setInputNumber(const std::string &inputNumber);
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string accessKeyId_;
|
||||
std::string routeName_;
|
||||
std::string mask_;
|
||||
std::string resourceOwnerAccount_;
|
||||
long ownerId_;
|
||||
std::string authCode_;
|
||||
std::string inputNumber_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Dytnsapi
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_DYTNSAPI_MODEL_DESCRIBEEMPTYNUMBERREQUEST_H_
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_DYTNSAPI_MODEL_DESCRIBEEMPTYNUMBERRESULT_H_
|
||||
#define ALIBABACLOUD_DYTNSAPI_MODEL_DESCRIBEEMPTYNUMBERRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/dytnsapi/DytnsapiExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Dytnsapi
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_DYTNSAPI_EXPORT DescribeEmptyNumberResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string status;
|
||||
std::string number;
|
||||
};
|
||||
|
||||
|
||||
DescribeEmptyNumberResult();
|
||||
explicit DescribeEmptyNumberResult(const std::string &payload);
|
||||
~DescribeEmptyNumberResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DYTNSAPI_MODEL_DESCRIBEEMPTYNUMBERRESULT_H_
|
||||
@@ -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