diff --git a/CHANGELOG b/CHANGELOG index a7dc42f97..1c050813f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +2018-11-13 Version: 1.31.0 +1, Add FuzzyMatchDomainSensitiveWord interface,Support fuzzy matching sensitive words. +2, Add BatchFuzzyMatchDomainSensitiveWord interface,Support batch fuzzy matching sensitive words. +3, Add DynamicCheck properties for results of CheckDomain interface. + 2018-11-10 Version: 1.30.5 1, Update SetWaitingRoomConfig. diff --git a/VERSION b/VERSION index e425d4057..8b9687207 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.30.5 \ No newline at end of file +1.31.0 \ No newline at end of file diff --git a/domain/CMakeLists.txt b/domain/CMakeLists.txt index 0e6de1059..d4f26b898 100644 --- a/domain/CMakeLists.txt +++ b/domain/CMakeLists.txt @@ -97,6 +97,8 @@ set(domain_public_header_model include/alibabacloud/domain/model/QueryDnsHostResult.h include/alibabacloud/domain/model/QueryRegistrantProfileRealNameVerificationInfoRequest.h include/alibabacloud/domain/model/QueryRegistrantProfileRealNameVerificationInfoResult.h + include/alibabacloud/domain/model/FuzzyMatchDomainSensitiveWordRequest.h + include/alibabacloud/domain/model/FuzzyMatchDomainSensitiveWordResult.h include/alibabacloud/domain/model/FailDemandRequest.h include/alibabacloud/domain/model/FailDemandResult.h include/alibabacloud/domain/model/SaveSingleTaskForCancelingTransferInRequest.h @@ -121,6 +123,8 @@ set(domain_public_header_model include/alibabacloud/domain/model/SaveBatchTaskForCreatingOrderRenewResult.h include/alibabacloud/domain/model/QueryServerLockRequest.h include/alibabacloud/domain/model/QueryServerLockResult.h + include/alibabacloud/domain/model/BatchFuzzyMatchDomainSensitiveWordRequest.h + include/alibabacloud/domain/model/BatchFuzzyMatchDomainSensitiveWordResult.h include/alibabacloud/domain/model/SaveSingleTaskForModifyingDnsHostRequest.h include/alibabacloud/domain/model/SaveSingleTaskForModifyingDnsHostResult.h include/alibabacloud/domain/model/QueryBookingDomainInfoRequest.h @@ -314,6 +318,8 @@ set(domain_src src/model/QueryDnsHostResult.cc src/model/QueryRegistrantProfileRealNameVerificationInfoRequest.cc src/model/QueryRegistrantProfileRealNameVerificationInfoResult.cc + src/model/FuzzyMatchDomainSensitiveWordRequest.cc + src/model/FuzzyMatchDomainSensitiveWordResult.cc src/model/FailDemandRequest.cc src/model/FailDemandResult.cc src/model/SaveSingleTaskForCancelingTransferInRequest.cc @@ -338,6 +344,8 @@ set(domain_src src/model/SaveBatchTaskForCreatingOrderRenewResult.cc src/model/QueryServerLockRequest.cc src/model/QueryServerLockResult.cc + src/model/BatchFuzzyMatchDomainSensitiveWordRequest.cc + src/model/BatchFuzzyMatchDomainSensitiveWordResult.cc src/model/SaveSingleTaskForModifyingDnsHostRequest.cc src/model/SaveSingleTaskForModifyingDnsHostResult.cc src/model/QueryBookingDomainInfoRequest.cc diff --git a/domain/include/alibabacloud/domain/DomainClient.h b/domain/include/alibabacloud/domain/DomainClient.h index 3621e0ea7..e4ebe763c 100644 --- a/domain/include/alibabacloud/domain/DomainClient.h +++ b/domain/include/alibabacloud/domain/DomainClient.h @@ -98,6 +98,8 @@ #include "model/QueryDnsHostResult.h" #include "model/QueryRegistrantProfileRealNameVerificationInfoRequest.h" #include "model/QueryRegistrantProfileRealNameVerificationInfoResult.h" +#include "model/FuzzyMatchDomainSensitiveWordRequest.h" +#include "model/FuzzyMatchDomainSensitiveWordResult.h" #include "model/FailDemandRequest.h" #include "model/FailDemandResult.h" #include "model/SaveSingleTaskForCancelingTransferInRequest.h" @@ -122,6 +124,8 @@ #include "model/SaveBatchTaskForCreatingOrderRenewResult.h" #include "model/QueryServerLockRequest.h" #include "model/QueryServerLockResult.h" +#include "model/BatchFuzzyMatchDomainSensitiveWordRequest.h" +#include "model/BatchFuzzyMatchDomainSensitiveWordResult.h" #include "model/SaveSingleTaskForModifyingDnsHostRequest.h" #include "model/SaveSingleTaskForModifyingDnsHostResult.h" #include "model/QueryBookingDomainInfoRequest.h" @@ -359,6 +363,9 @@ namespace AlibabaCloud typedef Outcome QueryRegistrantProfileRealNameVerificationInfoOutcome; typedef std::future QueryRegistrantProfileRealNameVerificationInfoOutcomeCallable; typedef std::function&)> QueryRegistrantProfileRealNameVerificationInfoAsyncHandler; + typedef Outcome FuzzyMatchDomainSensitiveWordOutcome; + typedef std::future FuzzyMatchDomainSensitiveWordOutcomeCallable; + typedef std::function&)> FuzzyMatchDomainSensitiveWordAsyncHandler; typedef Outcome FailDemandOutcome; typedef std::future FailDemandOutcomeCallable; typedef std::function&)> FailDemandAsyncHandler; @@ -395,6 +402,9 @@ namespace AlibabaCloud typedef Outcome QueryServerLockOutcome; typedef std::future QueryServerLockOutcomeCallable; typedef std::function&)> QueryServerLockAsyncHandler; + typedef Outcome BatchFuzzyMatchDomainSensitiveWordOutcome; + typedef std::future BatchFuzzyMatchDomainSensitiveWordOutcomeCallable; + typedef std::function&)> BatchFuzzyMatchDomainSensitiveWordAsyncHandler; typedef Outcome SaveSingleTaskForModifyingDnsHostOutcome; typedef std::future SaveSingleTaskForModifyingDnsHostOutcomeCallable; typedef std::function&)> SaveSingleTaskForModifyingDnsHostAsyncHandler; @@ -685,6 +695,9 @@ namespace AlibabaCloud QueryRegistrantProfileRealNameVerificationInfoOutcome queryRegistrantProfileRealNameVerificationInfo(const Model::QueryRegistrantProfileRealNameVerificationInfoRequest &request)const; void queryRegistrantProfileRealNameVerificationInfoAsync(const Model::QueryRegistrantProfileRealNameVerificationInfoRequest& request, const QueryRegistrantProfileRealNameVerificationInfoAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; QueryRegistrantProfileRealNameVerificationInfoOutcomeCallable queryRegistrantProfileRealNameVerificationInfoCallable(const Model::QueryRegistrantProfileRealNameVerificationInfoRequest& request) const; + FuzzyMatchDomainSensitiveWordOutcome fuzzyMatchDomainSensitiveWord(const Model::FuzzyMatchDomainSensitiveWordRequest &request)const; + void fuzzyMatchDomainSensitiveWordAsync(const Model::FuzzyMatchDomainSensitiveWordRequest& request, const FuzzyMatchDomainSensitiveWordAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + FuzzyMatchDomainSensitiveWordOutcomeCallable fuzzyMatchDomainSensitiveWordCallable(const Model::FuzzyMatchDomainSensitiveWordRequest& request) const; FailDemandOutcome failDemand(const Model::FailDemandRequest &request)const; void failDemandAsync(const Model::FailDemandRequest& request, const FailDemandAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; FailDemandOutcomeCallable failDemandCallable(const Model::FailDemandRequest& request) const; @@ -721,6 +734,9 @@ namespace AlibabaCloud QueryServerLockOutcome queryServerLock(const Model::QueryServerLockRequest &request)const; void queryServerLockAsync(const Model::QueryServerLockRequest& request, const QueryServerLockAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; QueryServerLockOutcomeCallable queryServerLockCallable(const Model::QueryServerLockRequest& request) const; + BatchFuzzyMatchDomainSensitiveWordOutcome batchFuzzyMatchDomainSensitiveWord(const Model::BatchFuzzyMatchDomainSensitiveWordRequest &request)const; + void batchFuzzyMatchDomainSensitiveWordAsync(const Model::BatchFuzzyMatchDomainSensitiveWordRequest& request, const BatchFuzzyMatchDomainSensitiveWordAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + BatchFuzzyMatchDomainSensitiveWordOutcomeCallable batchFuzzyMatchDomainSensitiveWordCallable(const Model::BatchFuzzyMatchDomainSensitiveWordRequest& request) const; SaveSingleTaskForModifyingDnsHostOutcome saveSingleTaskForModifyingDnsHost(const Model::SaveSingleTaskForModifyingDnsHostRequest &request)const; void saveSingleTaskForModifyingDnsHostAsync(const Model::SaveSingleTaskForModifyingDnsHostRequest& request, const SaveSingleTaskForModifyingDnsHostAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; SaveSingleTaskForModifyingDnsHostOutcomeCallable saveSingleTaskForModifyingDnsHostCallable(const Model::SaveSingleTaskForModifyingDnsHostRequest& request) const; diff --git a/domain/include/alibabacloud/domain/model/BatchFuzzyMatchDomainSensitiveWordRequest.h b/domain/include/alibabacloud/domain/model/BatchFuzzyMatchDomainSensitiveWordRequest.h new file mode 100644 index 000000000..db81ccb54 --- /dev/null +++ b/domain/include/alibabacloud/domain/model/BatchFuzzyMatchDomainSensitiveWordRequest.h @@ -0,0 +1,54 @@ +/* + * 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_DOMAIN_MODEL_BATCHFUZZYMATCHDOMAINSENSITIVEWORDREQUEST_H_ +#define ALIBABACLOUD_DOMAIN_MODEL_BATCHFUZZYMATCHDOMAINSENSITIVEWORDREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Domain + { + namespace Model + { + class ALIBABACLOUD_DOMAIN_EXPORT BatchFuzzyMatchDomainSensitiveWordRequest : public RpcServiceRequest + { + + public: + BatchFuzzyMatchDomainSensitiveWordRequest(); + ~BatchFuzzyMatchDomainSensitiveWordRequest(); + + std::string getUserClientIp()const; + void setUserClientIp(const std::string& userClientIp); + std::string getKeyword()const; + void setKeyword(const std::string& keyword); + std::string getLang()const; + void setLang(const std::string& lang); + + private: + std::string userClientIp_; + std::string keyword_; + std::string lang_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DOMAIN_MODEL_BATCHFUZZYMATCHDOMAINSENSITIVEWORDREQUEST_H_ \ No newline at end of file diff --git a/domain/include/alibabacloud/domain/model/BatchFuzzyMatchDomainSensitiveWordResult.h b/domain/include/alibabacloud/domain/model/BatchFuzzyMatchDomainSensitiveWordResult.h new file mode 100644 index 000000000..dda4da51a --- /dev/null +++ b/domain/include/alibabacloud/domain/model/BatchFuzzyMatchDomainSensitiveWordResult.h @@ -0,0 +1,61 @@ +/* + * 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_DOMAIN_MODEL_BATCHFUZZYMATCHDOMAINSENSITIVEWORDRESULT_H_ +#define ALIBABACLOUD_DOMAIN_MODEL_BATCHFUZZYMATCHDOMAINSENSITIVEWORDRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Domain + { + namespace Model + { + class ALIBABACLOUD_DOMAIN_EXPORT BatchFuzzyMatchDomainSensitiveWordResult : public ServiceResult + { + public: + struct SensitiveWordMatchResult + { + struct MatchedSensitiveWord + { + std::string word; + }; + bool exist; + std::string keyword; + std::vector matchedSentiveWords; + }; + + + BatchFuzzyMatchDomainSensitiveWordResult(); + explicit BatchFuzzyMatchDomainSensitiveWordResult(const std::string &payload); + ~BatchFuzzyMatchDomainSensitiveWordResult(); + std::vector getSensitiveWordMatchResultList()const; + + protected: + void parse(const std::string &payload); + private: + std::vector sensitiveWordMatchResultList_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DOMAIN_MODEL_BATCHFUZZYMATCHDOMAINSENSITIVEWORDRESULT_H_ \ No newline at end of file diff --git a/domain/include/alibabacloud/domain/model/CheckDomainResult.h b/domain/include/alibabacloud/domain/model/CheckDomainResult.h index 7cf577df8..5314bf117 100644 --- a/domain/include/alibabacloud/domain/model/CheckDomainResult.h +++ b/domain/include/alibabacloud/domain/model/CheckDomainResult.h @@ -41,6 +41,7 @@ namespace AlibabaCloud std::string getDomainName()const; long getPrice()const; std::string getPremium()const; + bool getDynamicCheck()const; std::string getReason()const; protected: @@ -50,6 +51,7 @@ namespace AlibabaCloud std::string domainName_; long price_; std::string premium_; + bool dynamicCheck_; std::string reason_; }; diff --git a/domain/include/alibabacloud/domain/model/FuzzyMatchDomainSensitiveWordRequest.h b/domain/include/alibabacloud/domain/model/FuzzyMatchDomainSensitiveWordRequest.h new file mode 100644 index 000000000..c55eb9933 --- /dev/null +++ b/domain/include/alibabacloud/domain/model/FuzzyMatchDomainSensitiveWordRequest.h @@ -0,0 +1,54 @@ +/* + * 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_DOMAIN_MODEL_FUZZYMATCHDOMAINSENSITIVEWORDREQUEST_H_ +#define ALIBABACLOUD_DOMAIN_MODEL_FUZZYMATCHDOMAINSENSITIVEWORDREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Domain + { + namespace Model + { + class ALIBABACLOUD_DOMAIN_EXPORT FuzzyMatchDomainSensitiveWordRequest : public RpcServiceRequest + { + + public: + FuzzyMatchDomainSensitiveWordRequest(); + ~FuzzyMatchDomainSensitiveWordRequest(); + + std::string getUserClientIp()const; + void setUserClientIp(const std::string& userClientIp); + std::string getKeyword()const; + void setKeyword(const std::string& keyword); + std::string getLang()const; + void setLang(const std::string& lang); + + private: + std::string userClientIp_; + std::string keyword_; + std::string lang_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DOMAIN_MODEL_FUZZYMATCHDOMAINSENSITIVEWORDREQUEST_H_ \ No newline at end of file diff --git a/domain/include/alibabacloud/domain/model/FuzzyMatchDomainSensitiveWordResult.h b/domain/include/alibabacloud/domain/model/FuzzyMatchDomainSensitiveWordResult.h new file mode 100644 index 000000000..c04ea60ed --- /dev/null +++ b/domain/include/alibabacloud/domain/model/FuzzyMatchDomainSensitiveWordResult.h @@ -0,0 +1,59 @@ +/* + * 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_DOMAIN_MODEL_FUZZYMATCHDOMAINSENSITIVEWORDRESULT_H_ +#define ALIBABACLOUD_DOMAIN_MODEL_FUZZYMATCHDOMAINSENSITIVEWORDRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Domain + { + namespace Model + { + class ALIBABACLOUD_DOMAIN_EXPORT FuzzyMatchDomainSensitiveWordResult : public ServiceResult + { + public: + struct MatchedSensitiveWord + { + std::string word; + }; + + + FuzzyMatchDomainSensitiveWordResult(); + explicit FuzzyMatchDomainSensitiveWordResult(const std::string &payload); + ~FuzzyMatchDomainSensitiveWordResult(); + bool getExist()const; + std::string getKeyword()const; + std::vector getMatchedSentiveWords()const; + + protected: + void parse(const std::string &payload); + private: + bool exist_; + std::string keyword_; + std::vector matchedSentiveWords_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DOMAIN_MODEL_FUZZYMATCHDOMAINSENSITIVEWORDRESULT_H_ \ No newline at end of file diff --git a/domain/include/alibabacloud/domain/model/QueryDomainAdminDivisionResult.h b/domain/include/alibabacloud/domain/model/QueryDomainAdminDivisionResult.h index 534ac0a61..490789cfe 100644 --- a/domain/include/alibabacloud/domain/model/QueryDomainAdminDivisionResult.h +++ b/domain/include/alibabacloud/domain/model/QueryDomainAdminDivisionResult.h @@ -46,23 +46,11 @@ namespace AlibabaCloud QueryDomainAdminDivisionResult(); explicit QueryDomainAdminDivisionResult(const std::string &payload); ~QueryDomainAdminDivisionResult(); - bool getPrePage()const; - int getCurrentPageNum()const; - int getPageSize()const; - int getTotalPageNum()const; - int getTotalItemNum()const; - bool getNextPage()const; std::vector getAdminDivisions()const; protected: void parse(const std::string &payload); private: - bool prePage_; - int currentPageNum_; - int pageSize_; - int totalPageNum_; - int totalItemNum_; - bool nextPage_; std::vector adminDivisions_; }; diff --git a/domain/src/DomainClient.cc b/domain/src/DomainClient.cc index 8c99cba79..40fc68179 100644 --- a/domain/src/DomainClient.cc +++ b/domain/src/DomainClient.cc @@ -1419,6 +1419,42 @@ DomainClient::QueryRegistrantProfileRealNameVerificationInfoOutcomeCallable Doma return task->get_future(); } +DomainClient::FuzzyMatchDomainSensitiveWordOutcome DomainClient::fuzzyMatchDomainSensitiveWord(const FuzzyMatchDomainSensitiveWordRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return FuzzyMatchDomainSensitiveWordOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return FuzzyMatchDomainSensitiveWordOutcome(FuzzyMatchDomainSensitiveWordResult(outcome.result())); + else + return FuzzyMatchDomainSensitiveWordOutcome(outcome.error()); +} + +void DomainClient::fuzzyMatchDomainSensitiveWordAsync(const FuzzyMatchDomainSensitiveWordRequest& request, const FuzzyMatchDomainSensitiveWordAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, fuzzyMatchDomainSensitiveWord(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +DomainClient::FuzzyMatchDomainSensitiveWordOutcomeCallable DomainClient::fuzzyMatchDomainSensitiveWordCallable(const FuzzyMatchDomainSensitiveWordRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->fuzzyMatchDomainSensitiveWord(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + DomainClient::FailDemandOutcome DomainClient::failDemand(const FailDemandRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -1851,6 +1887,42 @@ DomainClient::QueryServerLockOutcomeCallable DomainClient::queryServerLockCallab return task->get_future(); } +DomainClient::BatchFuzzyMatchDomainSensitiveWordOutcome DomainClient::batchFuzzyMatchDomainSensitiveWord(const BatchFuzzyMatchDomainSensitiveWordRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return BatchFuzzyMatchDomainSensitiveWordOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return BatchFuzzyMatchDomainSensitiveWordOutcome(BatchFuzzyMatchDomainSensitiveWordResult(outcome.result())); + else + return BatchFuzzyMatchDomainSensitiveWordOutcome(outcome.error()); +} + +void DomainClient::batchFuzzyMatchDomainSensitiveWordAsync(const BatchFuzzyMatchDomainSensitiveWordRequest& request, const BatchFuzzyMatchDomainSensitiveWordAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, batchFuzzyMatchDomainSensitiveWord(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +DomainClient::BatchFuzzyMatchDomainSensitiveWordOutcomeCallable DomainClient::batchFuzzyMatchDomainSensitiveWordCallable(const BatchFuzzyMatchDomainSensitiveWordRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->batchFuzzyMatchDomainSensitiveWord(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + DomainClient::SaveSingleTaskForModifyingDnsHostOutcome DomainClient::saveSingleTaskForModifyingDnsHost(const SaveSingleTaskForModifyingDnsHostRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/domain/src/model/BatchFuzzyMatchDomainSensitiveWordRequest.cc b/domain/src/model/BatchFuzzyMatchDomainSensitiveWordRequest.cc new file mode 100644 index 000000000..dc118343b --- /dev/null +++ b/domain/src/model/BatchFuzzyMatchDomainSensitiveWordRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Domain::Model::BatchFuzzyMatchDomainSensitiveWordRequest; + +BatchFuzzyMatchDomainSensitiveWordRequest::BatchFuzzyMatchDomainSensitiveWordRequest() : + RpcServiceRequest("domain", "2018-01-29", "BatchFuzzyMatchDomainSensitiveWord") +{} + +BatchFuzzyMatchDomainSensitiveWordRequest::~BatchFuzzyMatchDomainSensitiveWordRequest() +{} + +std::string BatchFuzzyMatchDomainSensitiveWordRequest::getUserClientIp()const +{ + return userClientIp_; +} + +void BatchFuzzyMatchDomainSensitiveWordRequest::setUserClientIp(const std::string& userClientIp) +{ + userClientIp_ = userClientIp; + setParameter("UserClientIp", userClientIp); +} + +std::string BatchFuzzyMatchDomainSensitiveWordRequest::getKeyword()const +{ + return keyword_; +} + +void BatchFuzzyMatchDomainSensitiveWordRequest::setKeyword(const std::string& keyword) +{ + keyword_ = keyword; + setParameter("Keyword", keyword); +} + +std::string BatchFuzzyMatchDomainSensitiveWordRequest::getLang()const +{ + return lang_; +} + +void BatchFuzzyMatchDomainSensitiveWordRequest::setLang(const std::string& lang) +{ + lang_ = lang; + setParameter("Lang", lang); +} + diff --git a/domain/src/model/BatchFuzzyMatchDomainSensitiveWordResult.cc b/domain/src/model/BatchFuzzyMatchDomainSensitiveWordResult.cc new file mode 100644 index 000000000..f13443f11 --- /dev/null +++ b/domain/src/model/BatchFuzzyMatchDomainSensitiveWordResult.cc @@ -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 +#include + +using namespace AlibabaCloud::Domain; +using namespace AlibabaCloud::Domain::Model; + +BatchFuzzyMatchDomainSensitiveWordResult::BatchFuzzyMatchDomainSensitiveWordResult() : + ServiceResult() +{} + +BatchFuzzyMatchDomainSensitiveWordResult::BatchFuzzyMatchDomainSensitiveWordResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +BatchFuzzyMatchDomainSensitiveWordResult::~BatchFuzzyMatchDomainSensitiveWordResult() +{} + +void BatchFuzzyMatchDomainSensitiveWordResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + auto allSensitiveWordMatchResultList = value["SensitiveWordMatchResultList"]["SensitiveWordMatchResult"]; + for (auto value : allSensitiveWordMatchResultList) + { + SensitiveWordMatchResult sensitiveWordMatchResultListObject; + if(!value["Keyword"].isNull()) + sensitiveWordMatchResultListObject.keyword = value["Keyword"].asString(); + if(!value["Exist"].isNull()) + sensitiveWordMatchResultListObject.exist = value["Exist"].asString() == "true"; + auto allMatchedSentiveWords = value["MatchedSentiveWords"]["MatchedSensitiveWord"]; + for (auto value : allMatchedSentiveWords) + { + SensitiveWordMatchResult::MatchedSensitiveWord matchedSentiveWordsObject; + if(!value["Word"].isNull()) + matchedSentiveWordsObject.word = value["Word"].asString(); + sensitiveWordMatchResultListObject.matchedSentiveWords.push_back(matchedSentiveWordsObject); + } + sensitiveWordMatchResultList_.push_back(sensitiveWordMatchResultListObject); + } + +} + +std::vector BatchFuzzyMatchDomainSensitiveWordResult::getSensitiveWordMatchResultList()const +{ + return sensitiveWordMatchResultList_; +} + diff --git a/domain/src/model/CheckDomainResult.cc b/domain/src/model/CheckDomainResult.cc index 8c0e4a6bd..e048c462c 100644 --- a/domain/src/model/CheckDomainResult.cc +++ b/domain/src/model/CheckDomainResult.cc @@ -50,6 +50,8 @@ void CheckDomainResult::parse(const std::string &payload) reason_ = value["Reason"].asString(); if(!value["Price"].isNull()) price_ = std::stol(value["Price"].asString()); + if(!value["DynamicCheck"].isNull()) + dynamicCheck_ = value["DynamicCheck"].asString() == "true"; } @@ -73,6 +75,11 @@ std::string CheckDomainResult::getPremium()const return premium_; } +bool CheckDomainResult::getDynamicCheck()const +{ + return dynamicCheck_; +} + std::string CheckDomainResult::getReason()const { return reason_; diff --git a/domain/src/model/FuzzyMatchDomainSensitiveWordRequest.cc b/domain/src/model/FuzzyMatchDomainSensitiveWordRequest.cc new file mode 100644 index 000000000..6cbd4d607 --- /dev/null +++ b/domain/src/model/FuzzyMatchDomainSensitiveWordRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Domain::Model::FuzzyMatchDomainSensitiveWordRequest; + +FuzzyMatchDomainSensitiveWordRequest::FuzzyMatchDomainSensitiveWordRequest() : + RpcServiceRequest("domain", "2018-01-29", "FuzzyMatchDomainSensitiveWord") +{} + +FuzzyMatchDomainSensitiveWordRequest::~FuzzyMatchDomainSensitiveWordRequest() +{} + +std::string FuzzyMatchDomainSensitiveWordRequest::getUserClientIp()const +{ + return userClientIp_; +} + +void FuzzyMatchDomainSensitiveWordRequest::setUserClientIp(const std::string& userClientIp) +{ + userClientIp_ = userClientIp; + setParameter("UserClientIp", userClientIp); +} + +std::string FuzzyMatchDomainSensitiveWordRequest::getKeyword()const +{ + return keyword_; +} + +void FuzzyMatchDomainSensitiveWordRequest::setKeyword(const std::string& keyword) +{ + keyword_ = keyword; + setParameter("Keyword", keyword); +} + +std::string FuzzyMatchDomainSensitiveWordRequest::getLang()const +{ + return lang_; +} + +void FuzzyMatchDomainSensitiveWordRequest::setLang(const std::string& lang) +{ + lang_ = lang; + setParameter("Lang", lang); +} + diff --git a/domain/src/model/FuzzyMatchDomainSensitiveWordResult.cc b/domain/src/model/FuzzyMatchDomainSensitiveWordResult.cc new file mode 100644 index 000000000..3041d6e98 --- /dev/null +++ b/domain/src/model/FuzzyMatchDomainSensitiveWordResult.cc @@ -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 +#include + +using namespace AlibabaCloud::Domain; +using namespace AlibabaCloud::Domain::Model; + +FuzzyMatchDomainSensitiveWordResult::FuzzyMatchDomainSensitiveWordResult() : + ServiceResult() +{} + +FuzzyMatchDomainSensitiveWordResult::FuzzyMatchDomainSensitiveWordResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +FuzzyMatchDomainSensitiveWordResult::~FuzzyMatchDomainSensitiveWordResult() +{} + +void FuzzyMatchDomainSensitiveWordResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + auto allMatchedSentiveWords = value["MatchedSentiveWords"]["MatchedSensitiveWord"]; + for (auto value : allMatchedSentiveWords) + { + MatchedSensitiveWord matchedSentiveWordsObject; + if(!value["Word"].isNull()) + matchedSentiveWordsObject.word = value["Word"].asString(); + matchedSentiveWords_.push_back(matchedSentiveWordsObject); + } + if(!value["Keyword"].isNull()) + keyword_ = value["Keyword"].asString(); + if(!value["Exist"].isNull()) + exist_ = value["Exist"].asString() == "true"; + +} + +bool FuzzyMatchDomainSensitiveWordResult::getExist()const +{ + return exist_; +} + +std::string FuzzyMatchDomainSensitiveWordResult::getKeyword()const +{ + return keyword_; +} + +std::vector FuzzyMatchDomainSensitiveWordResult::getMatchedSentiveWords()const +{ + return matchedSentiveWords_; +} + diff --git a/domain/src/model/QueryDomainAdminDivisionResult.cc b/domain/src/model/QueryDomainAdminDivisionResult.cc index 71f94d040..b8ef98aa5 100644 --- a/domain/src/model/QueryDomainAdminDivisionResult.cc +++ b/domain/src/model/QueryDomainAdminDivisionResult.cc @@ -56,51 +56,9 @@ void QueryDomainAdminDivisionResult::parse(const std::string &payload) } adminDivisions_.push_back(adminDivisionsObject); } - if(!value["TotalItemNum"].isNull()) - totalItemNum_ = std::stoi(value["TotalItemNum"].asString()); - if(!value["CurrentPageNum"].isNull()) - currentPageNum_ = std::stoi(value["CurrentPageNum"].asString()); - if(!value["TotalPageNum"].isNull()) - totalPageNum_ = std::stoi(value["TotalPageNum"].asString()); - if(!value["PageSize"].isNull()) - pageSize_ = std::stoi(value["PageSize"].asString()); - if(!value["PrePage"].isNull()) - prePage_ = value["PrePage"].asString() == "true"; - if(!value["NextPage"].isNull()) - nextPage_ = value["NextPage"].asString() == "true"; } -bool QueryDomainAdminDivisionResult::getPrePage()const -{ - return prePage_; -} - -int QueryDomainAdminDivisionResult::getCurrentPageNum()const -{ - return currentPageNum_; -} - -int QueryDomainAdminDivisionResult::getPageSize()const -{ - return pageSize_; -} - -int QueryDomainAdminDivisionResult::getTotalPageNum()const -{ - return totalPageNum_; -} - -int QueryDomainAdminDivisionResult::getTotalItemNum()const -{ - return totalItemNum_; -} - -bool QueryDomainAdminDivisionResult::getNextPage()const -{ - return nextPage_; -} - std::vector QueryDomainAdminDivisionResult::getAdminDivisions()const { return adminDivisions_;