From 8a1c79417e1db315200bd1cf5699918e460fbe33 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 21 Apr 2020 11:02:12 +0800 Subject: [PATCH] Supported API for DescribeTags. --- CHANGELOG | 6 + VERSION | 2 +- alidns/CMakeLists.txt | 16 ++ .../alibabacloud/alidns/AlidnsClient.h | 32 ++++ .../alidns/model/DescribeDomainsRequest.h | 9 ++ .../alidns/model/DescribeDomainsResult.h | 6 + .../alidns/model/DescribeTagsRequest.h | 60 ++++++++ .../alidns/model/DescribeTagsResult.h | 62 ++++++++ .../alidns/model/ListTagResourcesRequest.h | 72 +++++++++ .../alidns/model/ListTagResourcesResult.h | 60 ++++++++ .../alidns/model/TagResourcesRequest.h | 69 +++++++++ .../alidns/model/TagResourcesResult.h | 49 ++++++ .../alidns/model/UntagResourcesRequest.h | 63 ++++++++ .../alidns/model/UntagResourcesResult.h | 49 ++++++ alidns/src/AlidnsClient.cc | 144 ++++++++++++++++++ alidns/src/model/DescribeDomainsRequest.cc | 16 ++ alidns/src/model/DescribeDomainsResult.cc | 10 ++ alidns/src/model/DescribeTagsRequest.cc | 84 ++++++++++ alidns/src/model/DescribeTagsResult.cc | 81 ++++++++++ alidns/src/model/ListTagResourcesRequest.cc | 113 ++++++++++++++ alidns/src/model/ListTagResourcesResult.cc | 70 +++++++++ alidns/src/model/TagResourcesRequest.cc | 102 +++++++++++++ alidns/src/model/TagResourcesResult.cc | 44 ++++++ alidns/src/model/UntagResourcesRequest.cc | 99 ++++++++++++ alidns/src/model/UntagResourcesResult.cc | 44 ++++++ 25 files changed, 1361 insertions(+), 1 deletion(-) create mode 100644 alidns/include/alibabacloud/alidns/model/DescribeTagsRequest.h create mode 100644 alidns/include/alibabacloud/alidns/model/DescribeTagsResult.h create mode 100644 alidns/include/alibabacloud/alidns/model/ListTagResourcesRequest.h create mode 100644 alidns/include/alibabacloud/alidns/model/ListTagResourcesResult.h create mode 100644 alidns/include/alibabacloud/alidns/model/TagResourcesRequest.h create mode 100644 alidns/include/alibabacloud/alidns/model/TagResourcesResult.h create mode 100644 alidns/include/alibabacloud/alidns/model/UntagResourcesRequest.h create mode 100644 alidns/include/alibabacloud/alidns/model/UntagResourcesResult.h create mode 100644 alidns/src/model/DescribeTagsRequest.cc create mode 100644 alidns/src/model/DescribeTagsResult.cc create mode 100644 alidns/src/model/ListTagResourcesRequest.cc create mode 100644 alidns/src/model/ListTagResourcesResult.cc create mode 100644 alidns/src/model/TagResourcesRequest.cc create mode 100644 alidns/src/model/TagResourcesResult.cc create mode 100644 alidns/src/model/UntagResourcesRequest.cc create mode 100644 alidns/src/model/UntagResourcesResult.cc diff --git a/CHANGELOG b/CHANGELOG index 402d658e4..4ebfdac6e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +2020-04-21 Version: 1.36.370 +- Supported API for DescribeTags. +- Supported API for ListTagResources. +- Supported API for TagResources. +- Supported API for UntagResources. + 2020-04-21 Version: 1.36.369 - Supported PackageDesign Apis. - Supported Api ListPackageDesignModelTypes. diff --git a/VERSION b/VERSION index 5661bb465..7b55733c4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.369 \ No newline at end of file +1.36.370 \ No newline at end of file diff --git a/alidns/CMakeLists.txt b/alidns/CMakeLists.txt index a28144dd6..d6cc1f4e5 100644 --- a/alidns/CMakeLists.txt +++ b/alidns/CMakeLists.txt @@ -141,6 +141,8 @@ set(alidns_public_header_model include/alibabacloud/alidns/model/DescribeSubDomainRecordsResult.h include/alibabacloud/alidns/model/DescribeSupportLinesRequest.h include/alibabacloud/alidns/model/DescribeSupportLinesResult.h + include/alibabacloud/alidns/model/DescribeTagsRequest.h + include/alibabacloud/alidns/model/DescribeTagsResult.h include/alibabacloud/alidns/model/DescribeTransferDomainsRequest.h include/alibabacloud/alidns/model/DescribeTransferDomainsResult.h include/alibabacloud/alidns/model/ExecuteGtmRecoveryPlanRequest.h @@ -149,6 +151,8 @@ set(alidns_public_header_model include/alibabacloud/alidns/model/GetMainDomainNameResult.h include/alibabacloud/alidns/model/GetTxtRecordForVerifyRequest.h include/alibabacloud/alidns/model/GetTxtRecordForVerifyResult.h + include/alibabacloud/alidns/model/ListTagResourcesRequest.h + include/alibabacloud/alidns/model/ListTagResourcesResult.h include/alibabacloud/alidns/model/ModifyHichinaDomainDNSRequest.h include/alibabacloud/alidns/model/ModifyHichinaDomainDNSResult.h include/alibabacloud/alidns/model/OperateBatchDomainRequest.h @@ -169,10 +173,14 @@ set(alidns_public_header_model include/alibabacloud/alidns/model/SetGtmAccessModeResult.h include/alibabacloud/alidns/model/SetGtmMonitorStatusRequest.h include/alibabacloud/alidns/model/SetGtmMonitorStatusResult.h + include/alibabacloud/alidns/model/TagResourcesRequest.h + include/alibabacloud/alidns/model/TagResourcesResult.h include/alibabacloud/alidns/model/TransferDomainRequest.h include/alibabacloud/alidns/model/TransferDomainResult.h include/alibabacloud/alidns/model/UnbindInstanceDomainsRequest.h include/alibabacloud/alidns/model/UnbindInstanceDomainsResult.h + include/alibabacloud/alidns/model/UntagResourcesRequest.h + include/alibabacloud/alidns/model/UntagResourcesResult.h include/alibabacloud/alidns/model/UpdateCustomLineRequest.h include/alibabacloud/alidns/model/UpdateCustomLineResult.h include/alibabacloud/alidns/model/UpdateDNSSLBWeightRequest.h @@ -318,6 +326,8 @@ set(alidns_src src/model/DescribeSubDomainRecordsResult.cc src/model/DescribeSupportLinesRequest.cc src/model/DescribeSupportLinesResult.cc + src/model/DescribeTagsRequest.cc + src/model/DescribeTagsResult.cc src/model/DescribeTransferDomainsRequest.cc src/model/DescribeTransferDomainsResult.cc src/model/ExecuteGtmRecoveryPlanRequest.cc @@ -326,6 +336,8 @@ set(alidns_src src/model/GetMainDomainNameResult.cc src/model/GetTxtRecordForVerifyRequest.cc src/model/GetTxtRecordForVerifyResult.cc + src/model/ListTagResourcesRequest.cc + src/model/ListTagResourcesResult.cc src/model/ModifyHichinaDomainDNSRequest.cc src/model/ModifyHichinaDomainDNSResult.cc src/model/OperateBatchDomainRequest.cc @@ -346,10 +358,14 @@ set(alidns_src src/model/SetGtmAccessModeResult.cc src/model/SetGtmMonitorStatusRequest.cc src/model/SetGtmMonitorStatusResult.cc + src/model/TagResourcesRequest.cc + src/model/TagResourcesResult.cc src/model/TransferDomainRequest.cc src/model/TransferDomainResult.cc src/model/UnbindInstanceDomainsRequest.cc src/model/UnbindInstanceDomainsResult.cc + src/model/UntagResourcesRequest.cc + src/model/UntagResourcesResult.cc src/model/UpdateCustomLineRequest.cc src/model/UpdateCustomLineResult.cc src/model/UpdateDNSSLBWeightRequest.cc diff --git a/alidns/include/alibabacloud/alidns/AlidnsClient.h b/alidns/include/alibabacloud/alidns/AlidnsClient.h index 9c38ad93d..d8f1de5ea 100644 --- a/alidns/include/alibabacloud/alidns/AlidnsClient.h +++ b/alidns/include/alibabacloud/alidns/AlidnsClient.h @@ -142,6 +142,8 @@ #include "model/DescribeSubDomainRecordsResult.h" #include "model/DescribeSupportLinesRequest.h" #include "model/DescribeSupportLinesResult.h" +#include "model/DescribeTagsRequest.h" +#include "model/DescribeTagsResult.h" #include "model/DescribeTransferDomainsRequest.h" #include "model/DescribeTransferDomainsResult.h" #include "model/ExecuteGtmRecoveryPlanRequest.h" @@ -150,6 +152,8 @@ #include "model/GetMainDomainNameResult.h" #include "model/GetTxtRecordForVerifyRequest.h" #include "model/GetTxtRecordForVerifyResult.h" +#include "model/ListTagResourcesRequest.h" +#include "model/ListTagResourcesResult.h" #include "model/ModifyHichinaDomainDNSRequest.h" #include "model/ModifyHichinaDomainDNSResult.h" #include "model/OperateBatchDomainRequest.h" @@ -170,10 +174,14 @@ #include "model/SetGtmAccessModeResult.h" #include "model/SetGtmMonitorStatusRequest.h" #include "model/SetGtmMonitorStatusResult.h" +#include "model/TagResourcesRequest.h" +#include "model/TagResourcesResult.h" #include "model/TransferDomainRequest.h" #include "model/TransferDomainResult.h" #include "model/UnbindInstanceDomainsRequest.h" #include "model/UnbindInstanceDomainsResult.h" +#include "model/UntagResourcesRequest.h" +#include "model/UntagResourcesResult.h" #include "model/UpdateCustomLineRequest.h" #include "model/UpdateCustomLineResult.h" #include "model/UpdateDNSSLBWeightRequest.h" @@ -385,6 +393,9 @@ namespace AlibabaCloud typedef Outcome DescribeSupportLinesOutcome; typedef std::future DescribeSupportLinesOutcomeCallable; typedef std::function&)> DescribeSupportLinesAsyncHandler; + typedef Outcome DescribeTagsOutcome; + typedef std::future DescribeTagsOutcomeCallable; + typedef std::function&)> DescribeTagsAsyncHandler; typedef Outcome DescribeTransferDomainsOutcome; typedef std::future DescribeTransferDomainsOutcomeCallable; typedef std::function&)> DescribeTransferDomainsAsyncHandler; @@ -397,6 +408,9 @@ namespace AlibabaCloud typedef Outcome GetTxtRecordForVerifyOutcome; typedef std::future GetTxtRecordForVerifyOutcomeCallable; typedef std::function&)> GetTxtRecordForVerifyAsyncHandler; + typedef Outcome ListTagResourcesOutcome; + typedef std::future ListTagResourcesOutcomeCallable; + typedef std::function&)> ListTagResourcesAsyncHandler; typedef Outcome ModifyHichinaDomainDNSOutcome; typedef std::future ModifyHichinaDomainDNSOutcomeCallable; typedef std::function&)> ModifyHichinaDomainDNSAsyncHandler; @@ -427,12 +441,18 @@ namespace AlibabaCloud typedef Outcome SetGtmMonitorStatusOutcome; typedef std::future SetGtmMonitorStatusOutcomeCallable; typedef std::function&)> SetGtmMonitorStatusAsyncHandler; + typedef Outcome TagResourcesOutcome; + typedef std::future TagResourcesOutcomeCallable; + typedef std::function&)> TagResourcesAsyncHandler; typedef Outcome TransferDomainOutcome; typedef std::future TransferDomainOutcomeCallable; typedef std::function&)> TransferDomainAsyncHandler; typedef Outcome UnbindInstanceDomainsOutcome; typedef std::future UnbindInstanceDomainsOutcomeCallable; typedef std::function&)> UnbindInstanceDomainsAsyncHandler; + typedef Outcome UntagResourcesOutcome; + typedef std::future UntagResourcesOutcomeCallable; + typedef std::function&)> UntagResourcesAsyncHandler; typedef Outcome UpdateCustomLineOutcome; typedef std::future UpdateCustomLineOutcomeCallable; typedef std::function&)> UpdateCustomLineAsyncHandler; @@ -651,6 +671,9 @@ namespace AlibabaCloud DescribeSupportLinesOutcome describeSupportLines(const Model::DescribeSupportLinesRequest &request)const; void describeSupportLinesAsync(const Model::DescribeSupportLinesRequest& request, const DescribeSupportLinesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeSupportLinesOutcomeCallable describeSupportLinesCallable(const Model::DescribeSupportLinesRequest& request) const; + DescribeTagsOutcome describeTags(const Model::DescribeTagsRequest &request)const; + void describeTagsAsync(const Model::DescribeTagsRequest& request, const DescribeTagsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeTagsOutcomeCallable describeTagsCallable(const Model::DescribeTagsRequest& request) const; DescribeTransferDomainsOutcome describeTransferDomains(const Model::DescribeTransferDomainsRequest &request)const; void describeTransferDomainsAsync(const Model::DescribeTransferDomainsRequest& request, const DescribeTransferDomainsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeTransferDomainsOutcomeCallable describeTransferDomainsCallable(const Model::DescribeTransferDomainsRequest& request) const; @@ -663,6 +686,9 @@ namespace AlibabaCloud GetTxtRecordForVerifyOutcome getTxtRecordForVerify(const Model::GetTxtRecordForVerifyRequest &request)const; void getTxtRecordForVerifyAsync(const Model::GetTxtRecordForVerifyRequest& request, const GetTxtRecordForVerifyAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetTxtRecordForVerifyOutcomeCallable getTxtRecordForVerifyCallable(const Model::GetTxtRecordForVerifyRequest& request) const; + ListTagResourcesOutcome listTagResources(const Model::ListTagResourcesRequest &request)const; + void listTagResourcesAsync(const Model::ListTagResourcesRequest& request, const ListTagResourcesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListTagResourcesOutcomeCallable listTagResourcesCallable(const Model::ListTagResourcesRequest& request) const; ModifyHichinaDomainDNSOutcome modifyHichinaDomainDNS(const Model::ModifyHichinaDomainDNSRequest &request)const; void modifyHichinaDomainDNSAsync(const Model::ModifyHichinaDomainDNSRequest& request, const ModifyHichinaDomainDNSAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ModifyHichinaDomainDNSOutcomeCallable modifyHichinaDomainDNSCallable(const Model::ModifyHichinaDomainDNSRequest& request) const; @@ -693,12 +719,18 @@ namespace AlibabaCloud SetGtmMonitorStatusOutcome setGtmMonitorStatus(const Model::SetGtmMonitorStatusRequest &request)const; void setGtmMonitorStatusAsync(const Model::SetGtmMonitorStatusRequest& request, const SetGtmMonitorStatusAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; SetGtmMonitorStatusOutcomeCallable setGtmMonitorStatusCallable(const Model::SetGtmMonitorStatusRequest& request) const; + TagResourcesOutcome tagResources(const Model::TagResourcesRequest &request)const; + void tagResourcesAsync(const Model::TagResourcesRequest& request, const TagResourcesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + TagResourcesOutcomeCallable tagResourcesCallable(const Model::TagResourcesRequest& request) const; TransferDomainOutcome transferDomain(const Model::TransferDomainRequest &request)const; void transferDomainAsync(const Model::TransferDomainRequest& request, const TransferDomainAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; TransferDomainOutcomeCallable transferDomainCallable(const Model::TransferDomainRequest& request) const; UnbindInstanceDomainsOutcome unbindInstanceDomains(const Model::UnbindInstanceDomainsRequest &request)const; void unbindInstanceDomainsAsync(const Model::UnbindInstanceDomainsRequest& request, const UnbindInstanceDomainsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; UnbindInstanceDomainsOutcomeCallable unbindInstanceDomainsCallable(const Model::UnbindInstanceDomainsRequest& request) const; + UntagResourcesOutcome untagResources(const Model::UntagResourcesRequest &request)const; + void untagResourcesAsync(const Model::UntagResourcesRequest& request, const UntagResourcesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UntagResourcesOutcomeCallable untagResourcesCallable(const Model::UntagResourcesRequest& request) const; UpdateCustomLineOutcome updateCustomLine(const Model::UpdateCustomLineRequest &request)const; void updateCustomLineAsync(const Model::UpdateCustomLineRequest& request, const UpdateCustomLineAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; UpdateCustomLineOutcomeCallable updateCustomLineCallable(const Model::UpdateCustomLineRequest& request) const; diff --git a/alidns/include/alibabacloud/alidns/model/DescribeDomainsRequest.h b/alidns/include/alibabacloud/alidns/model/DescribeDomainsRequest.h index 1f7e71f67..c9defad28 100644 --- a/alidns/include/alibabacloud/alidns/model/DescribeDomainsRequest.h +++ b/alidns/include/alibabacloud/alidns/model/DescribeDomainsRequest.h @@ -30,6 +30,12 @@ namespace AlibabaCloud { class ALIBABACLOUD_ALIDNS_EXPORT DescribeDomainsRequest : public RpcServiceRequest { + public: + struct Tag + { + std::string value; + std::string key; + }; public: DescribeDomainsRequest(); @@ -43,6 +49,8 @@ namespace AlibabaCloud void setResourceGroupId(const std::string& resourceGroupId); long getPageSize()const; void setPageSize(long pageSize); + std::vector getTag()const; + void setTag(const std::vector& tag); std::string getLang()const; void setLang(const std::string& lang); std::string getKeyWord()const; @@ -67,6 +75,7 @@ namespace AlibabaCloud long pageNumber_; std::string resourceGroupId_; long pageSize_; + std::vector tag_; std::string lang_; std::string keyWord_; std::string direction_; diff --git a/alidns/include/alibabacloud/alidns/model/DescribeDomainsResult.h b/alidns/include/alibabacloud/alidns/model/DescribeDomainsResult.h index 421c9e7ec..aea1786e3 100644 --- a/alidns/include/alibabacloud/alidns/model/DescribeDomainsResult.h +++ b/alidns/include/alibabacloud/alidns/model/DescribeDomainsResult.h @@ -34,6 +34,11 @@ namespace AlibabaCloud public: struct Domain { + struct Tag + { + std::string value; + std::string key; + }; std::string groupName; bool aliDomain; std::string domainName; @@ -52,6 +57,7 @@ namespace AlibabaCloud bool instanceExpired; long recordCount; long createTimestamp; + std::vector tags; }; diff --git a/alidns/include/alibabacloud/alidns/model/DescribeTagsRequest.h b/alidns/include/alibabacloud/alidns/model/DescribeTagsRequest.h new file mode 100644 index 000000000..5cfabfd3d --- /dev/null +++ b/alidns/include/alibabacloud/alidns/model/DescribeTagsRequest.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_ALIDNS_MODEL_DESCRIBETAGSREQUEST_H_ +#define ALIBABACLOUD_ALIDNS_MODEL_DESCRIBETAGSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Alidns + { + namespace Model + { + class ALIBABACLOUD_ALIDNS_EXPORT DescribeTagsRequest : public RpcServiceRequest + { + + public: + DescribeTagsRequest(); + ~DescribeTagsRequest(); + + std::string getResourceType()const; + void setResourceType(const std::string& resourceType); + long getPageNumber()const; + void setPageNumber(long pageNumber); + std::string getUserClientIp()const; + void setUserClientIp(const std::string& userClientIp); + long getPageSize()const; + void setPageSize(long pageSize); + std::string getLang()const; + void setLang(const std::string& lang); + + private: + std::string resourceType_; + long pageNumber_; + std::string userClientIp_; + long pageSize_; + std::string lang_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ALIDNS_MODEL_DESCRIBETAGSREQUEST_H_ \ No newline at end of file diff --git a/alidns/include/alibabacloud/alidns/model/DescribeTagsResult.h b/alidns/include/alibabacloud/alidns/model/DescribeTagsResult.h new file mode 100644 index 000000000..0609cf8f4 --- /dev/null +++ b/alidns/include/alibabacloud/alidns/model/DescribeTagsResult.h @@ -0,0 +1,62 @@ +/* + * 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_ALIDNS_MODEL_DESCRIBETAGSRESULT_H_ +#define ALIBABACLOUD_ALIDNS_MODEL_DESCRIBETAGSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Alidns + { + namespace Model + { + class ALIBABACLOUD_ALIDNS_EXPORT DescribeTagsResult : public ServiceResult + { + public: + struct Tag + { + std::vector values; + std::string key; + }; + + + DescribeTagsResult(); + explicit DescribeTagsResult(const std::string &payload); + ~DescribeTagsResult(); + long getTotalCount()const; + long getPageSize()const; + long getPageNumber()const; + std::vector getTags()const; + + protected: + void parse(const std::string &payload); + private: + long totalCount_; + long pageSize_; + long pageNumber_; + std::vector tags_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ALIDNS_MODEL_DESCRIBETAGSRESULT_H_ \ No newline at end of file diff --git a/alidns/include/alibabacloud/alidns/model/ListTagResourcesRequest.h b/alidns/include/alibabacloud/alidns/model/ListTagResourcesRequest.h new file mode 100644 index 000000000..ea89c7248 --- /dev/null +++ b/alidns/include/alibabacloud/alidns/model/ListTagResourcesRequest.h @@ -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. + */ + +#ifndef ALIBABACLOUD_ALIDNS_MODEL_LISTTAGRESOURCESREQUEST_H_ +#define ALIBABACLOUD_ALIDNS_MODEL_LISTTAGRESOURCESREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Alidns + { + namespace Model + { + class ALIBABACLOUD_ALIDNS_EXPORT ListTagResourcesRequest : public RpcServiceRequest + { + public: + struct Tag + { + std::string value; + std::string key; + }; + + public: + ListTagResourcesRequest(); + ~ListTagResourcesRequest(); + + std::vector getResourceId()const; + void setResourceId(const std::vector& resourceId); + std::string getResourceType()const; + void setResourceType(const std::string& resourceType); + int getSize()const; + void setSize(int size); + std::string getNextToken()const; + void setNextToken(const std::string& nextToken); + std::string getUserClientIp()const; + void setUserClientIp(const std::string& userClientIp); + std::vector getTag()const; + void setTag(const std::vector& tag); + std::string getLang()const; + void setLang(const std::string& lang); + + private: + std::vector resourceId_; + std::string resourceType_; + int size_; + std::string nextToken_; + std::string userClientIp_; + std::vector tag_; + std::string lang_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ALIDNS_MODEL_LISTTAGRESOURCESREQUEST_H_ \ No newline at end of file diff --git a/alidns/include/alibabacloud/alidns/model/ListTagResourcesResult.h b/alidns/include/alibabacloud/alidns/model/ListTagResourcesResult.h new file mode 100644 index 000000000..8ec66a0ba --- /dev/null +++ b/alidns/include/alibabacloud/alidns/model/ListTagResourcesResult.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_ALIDNS_MODEL_LISTTAGRESOURCESRESULT_H_ +#define ALIBABACLOUD_ALIDNS_MODEL_LISTTAGRESOURCESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Alidns + { + namespace Model + { + class ALIBABACLOUD_ALIDNS_EXPORT ListTagResourcesResult : public ServiceResult + { + public: + struct TagResource + { + std::string resourceId; + std::string tagKey; + std::string resourceType; + std::string tagValue; + }; + + + ListTagResourcesResult(); + explicit ListTagResourcesResult(const std::string &payload); + ~ListTagResourcesResult(); + std::string getNextToken()const; + std::vector getTagResources()const; + + protected: + void parse(const std::string &payload); + private: + std::string nextToken_; + std::vector tagResources_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ALIDNS_MODEL_LISTTAGRESOURCESRESULT_H_ \ No newline at end of file diff --git a/alidns/include/alibabacloud/alidns/model/TagResourcesRequest.h b/alidns/include/alibabacloud/alidns/model/TagResourcesRequest.h new file mode 100644 index 000000000..fc157e321 --- /dev/null +++ b/alidns/include/alibabacloud/alidns/model/TagResourcesRequest.h @@ -0,0 +1,69 @@ +/* + * 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_ALIDNS_MODEL_TAGRESOURCESREQUEST_H_ +#define ALIBABACLOUD_ALIDNS_MODEL_TAGRESOURCESREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Alidns + { + namespace Model + { + class ALIBABACLOUD_ALIDNS_EXPORT TagResourcesRequest : public RpcServiceRequest + { + public: + struct Tag + { + std::string value; + std::string key; + }; + + public: + TagResourcesRequest(); + ~TagResourcesRequest(); + + std::vector getResourceId()const; + void setResourceId(const std::vector& resourceId); + std::string getResourceType()const; + void setResourceType(const std::string& resourceType); + std::string getUserClientIp()const; + void setUserClientIp(const std::string& userClientIp); + std::vector getTag()const; + void setTag(const std::vector& tag); + std::string getLang()const; + void setLang(const std::string& lang); + bool getOverWrite()const; + void setOverWrite(bool overWrite); + + private: + std::vector resourceId_; + std::string resourceType_; + std::string userClientIp_; + std::vector tag_; + std::string lang_; + bool overWrite_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ALIDNS_MODEL_TAGRESOURCESREQUEST_H_ \ No newline at end of file diff --git a/alidns/include/alibabacloud/alidns/model/TagResourcesResult.h b/alidns/include/alibabacloud/alidns/model/TagResourcesResult.h new file mode 100644 index 000000000..7fb4c2325 --- /dev/null +++ b/alidns/include/alibabacloud/alidns/model/TagResourcesResult.h @@ -0,0 +1,49 @@ +/* + * 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_ALIDNS_MODEL_TAGRESOURCESRESULT_H_ +#define ALIBABACLOUD_ALIDNS_MODEL_TAGRESOURCESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Alidns + { + namespace Model + { + class ALIBABACLOUD_ALIDNS_EXPORT TagResourcesResult : public ServiceResult + { + public: + + + TagResourcesResult(); + explicit TagResourcesResult(const std::string &payload); + ~TagResourcesResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_ALIDNS_MODEL_TAGRESOURCESRESULT_H_ \ No newline at end of file diff --git a/alidns/include/alibabacloud/alidns/model/UntagResourcesRequest.h b/alidns/include/alibabacloud/alidns/model/UntagResourcesRequest.h new file mode 100644 index 000000000..2d87ef33c --- /dev/null +++ b/alidns/include/alibabacloud/alidns/model/UntagResourcesRequest.h @@ -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_ALIDNS_MODEL_UNTAGRESOURCESREQUEST_H_ +#define ALIBABACLOUD_ALIDNS_MODEL_UNTAGRESOURCESREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Alidns + { + namespace Model + { + class ALIBABACLOUD_ALIDNS_EXPORT UntagResourcesRequest : public RpcServiceRequest + { + + public: + UntagResourcesRequest(); + ~UntagResourcesRequest(); + + bool getAll()const; + void setAll(bool all); + std::vector getResourceId()const; + void setResourceId(const std::vector& resourceId); + std::string getResourceType()const; + void setResourceType(const std::string& resourceType); + std::string getUserClientIp()const; + void setUserClientIp(const std::string& userClientIp); + std::string getLang()const; + void setLang(const std::string& lang); + std::vector getTagKey()const; + void setTagKey(const std::vector& tagKey); + + private: + bool all_; + std::vector resourceId_; + std::string resourceType_; + std::string userClientIp_; + std::string lang_; + std::vector tagKey_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ALIDNS_MODEL_UNTAGRESOURCESREQUEST_H_ \ No newline at end of file diff --git a/alidns/include/alibabacloud/alidns/model/UntagResourcesResult.h b/alidns/include/alibabacloud/alidns/model/UntagResourcesResult.h new file mode 100644 index 000000000..8ee2c1bed --- /dev/null +++ b/alidns/include/alibabacloud/alidns/model/UntagResourcesResult.h @@ -0,0 +1,49 @@ +/* + * 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_ALIDNS_MODEL_UNTAGRESOURCESRESULT_H_ +#define ALIBABACLOUD_ALIDNS_MODEL_UNTAGRESOURCESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Alidns + { + namespace Model + { + class ALIBABACLOUD_ALIDNS_EXPORT UntagResourcesResult : public ServiceResult + { + public: + + + UntagResourcesResult(); + explicit UntagResourcesResult(const std::string &payload); + ~UntagResourcesResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_ALIDNS_MODEL_UNTAGRESOURCESRESULT_H_ \ No newline at end of file diff --git a/alidns/src/AlidnsClient.cc b/alidns/src/AlidnsClient.cc index 8b16e9e25..531909673 100644 --- a/alidns/src/AlidnsClient.cc +++ b/alidns/src/AlidnsClient.cc @@ -2211,6 +2211,42 @@ AlidnsClient::DescribeSupportLinesOutcomeCallable AlidnsClient::describeSupportL return task->get_future(); } +AlidnsClient::DescribeTagsOutcome AlidnsClient::describeTags(const DescribeTagsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeTagsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeTagsOutcome(DescribeTagsResult(outcome.result())); + else + return DescribeTagsOutcome(outcome.error()); +} + +void AlidnsClient::describeTagsAsync(const DescribeTagsRequest& request, const DescribeTagsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeTags(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +AlidnsClient::DescribeTagsOutcomeCallable AlidnsClient::describeTagsCallable(const DescribeTagsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeTags(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + AlidnsClient::DescribeTransferDomainsOutcome AlidnsClient::describeTransferDomains(const DescribeTransferDomainsRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -2355,6 +2391,42 @@ AlidnsClient::GetTxtRecordForVerifyOutcomeCallable AlidnsClient::getTxtRecordFor return task->get_future(); } +AlidnsClient::ListTagResourcesOutcome AlidnsClient::listTagResources(const ListTagResourcesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListTagResourcesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListTagResourcesOutcome(ListTagResourcesResult(outcome.result())); + else + return ListTagResourcesOutcome(outcome.error()); +} + +void AlidnsClient::listTagResourcesAsync(const ListTagResourcesRequest& request, const ListTagResourcesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listTagResources(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +AlidnsClient::ListTagResourcesOutcomeCallable AlidnsClient::listTagResourcesCallable(const ListTagResourcesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listTagResources(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + AlidnsClient::ModifyHichinaDomainDNSOutcome AlidnsClient::modifyHichinaDomainDNS(const ModifyHichinaDomainDNSRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -2715,6 +2787,42 @@ AlidnsClient::SetGtmMonitorStatusOutcomeCallable AlidnsClient::setGtmMonitorStat return task->get_future(); } +AlidnsClient::TagResourcesOutcome AlidnsClient::tagResources(const TagResourcesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return TagResourcesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return TagResourcesOutcome(TagResourcesResult(outcome.result())); + else + return TagResourcesOutcome(outcome.error()); +} + +void AlidnsClient::tagResourcesAsync(const TagResourcesRequest& request, const TagResourcesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, tagResources(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +AlidnsClient::TagResourcesOutcomeCallable AlidnsClient::tagResourcesCallable(const TagResourcesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->tagResources(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + AlidnsClient::TransferDomainOutcome AlidnsClient::transferDomain(const TransferDomainRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -2787,6 +2895,42 @@ AlidnsClient::UnbindInstanceDomainsOutcomeCallable AlidnsClient::unbindInstanceD return task->get_future(); } +AlidnsClient::UntagResourcesOutcome AlidnsClient::untagResources(const UntagResourcesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UntagResourcesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UntagResourcesOutcome(UntagResourcesResult(outcome.result())); + else + return UntagResourcesOutcome(outcome.error()); +} + +void AlidnsClient::untagResourcesAsync(const UntagResourcesRequest& request, const UntagResourcesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, untagResources(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +AlidnsClient::UntagResourcesOutcomeCallable AlidnsClient::untagResourcesCallable(const UntagResourcesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->untagResources(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + AlidnsClient::UpdateCustomLineOutcome AlidnsClient::updateCustomLine(const UpdateCustomLineRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/alidns/src/model/DescribeDomainsRequest.cc b/alidns/src/model/DescribeDomainsRequest.cc index ce3dfb099..f8f1a2191 100644 --- a/alidns/src/model/DescribeDomainsRequest.cc +++ b/alidns/src/model/DescribeDomainsRequest.cc @@ -71,6 +71,22 @@ void DescribeDomainsRequest::setPageSize(long pageSize) setParameter("PageSize", std::to_string(pageSize)); } +std::vector DescribeDomainsRequest::getTag()const +{ + return tag_; +} + +void DescribeDomainsRequest::setTag(const std::vector& tag) +{ + tag_ = tag; + for(int dep1 = 0; dep1!= tag.size(); dep1++) { + auto tagObj = tag.at(dep1); + std::string tagObjStr = "Tag." + std::to_string(dep1 + 1); + setParameter(tagObjStr + ".Value", tagObj.value); + setParameter(tagObjStr + ".Key", tagObj.key); + } +} + std::string DescribeDomainsRequest::getLang()const { return lang_; diff --git a/alidns/src/model/DescribeDomainsResult.cc b/alidns/src/model/DescribeDomainsResult.cc index a8d75bbca..2ca60dc1b 100644 --- a/alidns/src/model/DescribeDomainsResult.cc +++ b/alidns/src/model/DescribeDomainsResult.cc @@ -77,6 +77,16 @@ void DescribeDomainsResult::parse(const std::string &payload) domainsObject.createTime = valueDomainsDomain["CreateTime"].asString(); if(!valueDomainsDomain["CreateTimestamp"].isNull()) domainsObject.createTimestamp = std::stol(valueDomainsDomain["CreateTimestamp"].asString()); + auto allTagsNode = allDomainsNode["Tags"]["Tag"]; + for (auto allDomainsNodeTagsTag : allTagsNode) + { + Domain::Tag tagsObject; + if(!allDomainsNodeTagsTag["Key"].isNull()) + tagsObject.key = allDomainsNodeTagsTag["Key"].asString(); + if(!allDomainsNodeTagsTag["Value"].isNull()) + tagsObject.value = allDomainsNodeTagsTag["Value"].asString(); + domainsObject.tags.push_back(tagsObject); + } auto allDnsServers = value["DnsServers"]["DnsServer"]; for (auto value : allDnsServers) domainsObject.dnsServers.push_back(value.asString()); diff --git a/alidns/src/model/DescribeTagsRequest.cc b/alidns/src/model/DescribeTagsRequest.cc new file mode 100644 index 000000000..0ac8b0a6d --- /dev/null +++ b/alidns/src/model/DescribeTagsRequest.cc @@ -0,0 +1,84 @@ +/* + * 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::Alidns::Model::DescribeTagsRequest; + +DescribeTagsRequest::DescribeTagsRequest() : + RpcServiceRequest("alidns", "2015-01-09", "DescribeTags") +{ + setMethod(HttpRequest::Method::Post); +} + +DescribeTagsRequest::~DescribeTagsRequest() +{} + +std::string DescribeTagsRequest::getResourceType()const +{ + return resourceType_; +} + +void DescribeTagsRequest::setResourceType(const std::string& resourceType) +{ + resourceType_ = resourceType; + setParameter("ResourceType", resourceType); +} + +long DescribeTagsRequest::getPageNumber()const +{ + return pageNumber_; +} + +void DescribeTagsRequest::setPageNumber(long pageNumber) +{ + pageNumber_ = pageNumber; + setParameter("PageNumber", std::to_string(pageNumber)); +} + +std::string DescribeTagsRequest::getUserClientIp()const +{ + return userClientIp_; +} + +void DescribeTagsRequest::setUserClientIp(const std::string& userClientIp) +{ + userClientIp_ = userClientIp; + setParameter("UserClientIp", userClientIp); +} + +long DescribeTagsRequest::getPageSize()const +{ + return pageSize_; +} + +void DescribeTagsRequest::setPageSize(long pageSize) +{ + pageSize_ = pageSize; + setParameter("PageSize", std::to_string(pageSize)); +} + +std::string DescribeTagsRequest::getLang()const +{ + return lang_; +} + +void DescribeTagsRequest::setLang(const std::string& lang) +{ + lang_ = lang; + setParameter("Lang", lang); +} + diff --git a/alidns/src/model/DescribeTagsResult.cc b/alidns/src/model/DescribeTagsResult.cc new file mode 100644 index 000000000..d1762b561 --- /dev/null +++ b/alidns/src/model/DescribeTagsResult.cc @@ -0,0 +1,81 @@ +/* + * 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::Alidns; +using namespace AlibabaCloud::Alidns::Model; + +DescribeTagsResult::DescribeTagsResult() : + ServiceResult() +{} + +DescribeTagsResult::DescribeTagsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeTagsResult::~DescribeTagsResult() +{} + +void DescribeTagsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allTagsNode = value["Tags"]["Tag"]; + for (auto valueTagsTag : allTagsNode) + { + Tag tagsObject; + if(!valueTagsTag["Key"].isNull()) + tagsObject.key = valueTagsTag["Key"].asString(); + auto allValues = value["Values"]["Value"]; + for (auto value : allValues) + tagsObject.values.push_back(value.asString()); + tags_.push_back(tagsObject); + } + if(!value["TotalCount"].isNull()) + totalCount_ = std::stol(value["TotalCount"].asString()); + if(!value["PageNumber"].isNull()) + pageNumber_ = std::stol(value["PageNumber"].asString()); + if(!value["PageSize"].isNull()) + pageSize_ = std::stol(value["PageSize"].asString()); + +} + +long DescribeTagsResult::getTotalCount()const +{ + return totalCount_; +} + +long DescribeTagsResult::getPageSize()const +{ + return pageSize_; +} + +long DescribeTagsResult::getPageNumber()const +{ + return pageNumber_; +} + +std::vector DescribeTagsResult::getTags()const +{ + return tags_; +} + diff --git a/alidns/src/model/ListTagResourcesRequest.cc b/alidns/src/model/ListTagResourcesRequest.cc new file mode 100644 index 000000000..74bc77d4a --- /dev/null +++ b/alidns/src/model/ListTagResourcesRequest.cc @@ -0,0 +1,113 @@ +/* + * 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::Alidns::Model::ListTagResourcesRequest; + +ListTagResourcesRequest::ListTagResourcesRequest() : + RpcServiceRequest("alidns", "2015-01-09", "ListTagResources") +{ + setMethod(HttpRequest::Method::Post); +} + +ListTagResourcesRequest::~ListTagResourcesRequest() +{} + +std::vector ListTagResourcesRequest::getResourceId()const +{ + return resourceId_; +} + +void ListTagResourcesRequest::setResourceId(const std::vector& resourceId) +{ + resourceId_ = resourceId; + for(int dep1 = 0; dep1!= resourceId.size(); dep1++) { + setParameter("ResourceId."+ std::to_string(dep1), resourceId.at(dep1)); + } +} + +std::string ListTagResourcesRequest::getResourceType()const +{ + return resourceType_; +} + +void ListTagResourcesRequest::setResourceType(const std::string& resourceType) +{ + resourceType_ = resourceType; + setParameter("ResourceType", resourceType); +} + +int ListTagResourcesRequest::getSize()const +{ + return size_; +} + +void ListTagResourcesRequest::setSize(int size) +{ + size_ = size; + setParameter("Size", std::to_string(size)); +} + +std::string ListTagResourcesRequest::getNextToken()const +{ + return nextToken_; +} + +void ListTagResourcesRequest::setNextToken(const std::string& nextToken) +{ + nextToken_ = nextToken; + setParameter("NextToken", nextToken); +} + +std::string ListTagResourcesRequest::getUserClientIp()const +{ + return userClientIp_; +} + +void ListTagResourcesRequest::setUserClientIp(const std::string& userClientIp) +{ + userClientIp_ = userClientIp; + setParameter("UserClientIp", userClientIp); +} + +std::vector ListTagResourcesRequest::getTag()const +{ + return tag_; +} + +void ListTagResourcesRequest::setTag(const std::vector& tag) +{ + tag_ = tag; + for(int dep1 = 0; dep1!= tag.size(); dep1++) { + auto tagObj = tag.at(dep1); + std::string tagObjStr = "Tag." + std::to_string(dep1 + 1); + setParameter(tagObjStr + ".Value", tagObj.value); + setParameter(tagObjStr + ".Key", tagObj.key); + } +} + +std::string ListTagResourcesRequest::getLang()const +{ + return lang_; +} + +void ListTagResourcesRequest::setLang(const std::string& lang) +{ + lang_ = lang; + setParameter("Lang", lang); +} + diff --git a/alidns/src/model/ListTagResourcesResult.cc b/alidns/src/model/ListTagResourcesResult.cc new file mode 100644 index 000000000..f84bb2ec8 --- /dev/null +++ b/alidns/src/model/ListTagResourcesResult.cc @@ -0,0 +1,70 @@ +/* + * 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::Alidns; +using namespace AlibabaCloud::Alidns::Model; + +ListTagResourcesResult::ListTagResourcesResult() : + ServiceResult() +{} + +ListTagResourcesResult::ListTagResourcesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListTagResourcesResult::~ListTagResourcesResult() +{} + +void ListTagResourcesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allTagResourcesNode = value["TagResources"]["TagResource"]; + for (auto valueTagResourcesTagResource : allTagResourcesNode) + { + TagResource tagResourcesObject; + if(!valueTagResourcesTagResource["TagKey"].isNull()) + tagResourcesObject.tagKey = valueTagResourcesTagResource["TagKey"].asString(); + if(!valueTagResourcesTagResource["TagValue"].isNull()) + tagResourcesObject.tagValue = valueTagResourcesTagResource["TagValue"].asString(); + if(!valueTagResourcesTagResource["ResourceId"].isNull()) + tagResourcesObject.resourceId = valueTagResourcesTagResource["ResourceId"].asString(); + if(!valueTagResourcesTagResource["ResourceType"].isNull()) + tagResourcesObject.resourceType = valueTagResourcesTagResource["ResourceType"].asString(); + tagResources_.push_back(tagResourcesObject); + } + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + +} + +std::string ListTagResourcesResult::getNextToken()const +{ + return nextToken_; +} + +std::vector ListTagResourcesResult::getTagResources()const +{ + return tagResources_; +} + diff --git a/alidns/src/model/TagResourcesRequest.cc b/alidns/src/model/TagResourcesRequest.cc new file mode 100644 index 000000000..e8cb5d134 --- /dev/null +++ b/alidns/src/model/TagResourcesRequest.cc @@ -0,0 +1,102 @@ +/* + * 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::Alidns::Model::TagResourcesRequest; + +TagResourcesRequest::TagResourcesRequest() : + RpcServiceRequest("alidns", "2015-01-09", "TagResources") +{ + setMethod(HttpRequest::Method::Post); +} + +TagResourcesRequest::~TagResourcesRequest() +{} + +std::vector TagResourcesRequest::getResourceId()const +{ + return resourceId_; +} + +void TagResourcesRequest::setResourceId(const std::vector& resourceId) +{ + resourceId_ = resourceId; + for(int dep1 = 0; dep1!= resourceId.size(); dep1++) { + setParameter("ResourceId."+ std::to_string(dep1), resourceId.at(dep1)); + } +} + +std::string TagResourcesRequest::getResourceType()const +{ + return resourceType_; +} + +void TagResourcesRequest::setResourceType(const std::string& resourceType) +{ + resourceType_ = resourceType; + setParameter("ResourceType", resourceType); +} + +std::string TagResourcesRequest::getUserClientIp()const +{ + return userClientIp_; +} + +void TagResourcesRequest::setUserClientIp(const std::string& userClientIp) +{ + userClientIp_ = userClientIp; + setParameter("UserClientIp", userClientIp); +} + +std::vector TagResourcesRequest::getTag()const +{ + return tag_; +} + +void TagResourcesRequest::setTag(const std::vector& tag) +{ + tag_ = tag; + for(int dep1 = 0; dep1!= tag.size(); dep1++) { + auto tagObj = tag.at(dep1); + std::string tagObjStr = "Tag." + std::to_string(dep1 + 1); + setParameter(tagObjStr + ".Value", tagObj.value); + setParameter(tagObjStr + ".Key", tagObj.key); + } +} + +std::string TagResourcesRequest::getLang()const +{ + return lang_; +} + +void TagResourcesRequest::setLang(const std::string& lang) +{ + lang_ = lang; + setParameter("Lang", lang); +} + +bool TagResourcesRequest::getOverWrite()const +{ + return overWrite_; +} + +void TagResourcesRequest::setOverWrite(bool overWrite) +{ + overWrite_ = overWrite; + setParameter("OverWrite", overWrite ? "true" : "false"); +} + diff --git a/alidns/src/model/TagResourcesResult.cc b/alidns/src/model/TagResourcesResult.cc new file mode 100644 index 000000000..9e526be63 --- /dev/null +++ b/alidns/src/model/TagResourcesResult.cc @@ -0,0 +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 +#include + +using namespace AlibabaCloud::Alidns; +using namespace AlibabaCloud::Alidns::Model; + +TagResourcesResult::TagResourcesResult() : + ServiceResult() +{} + +TagResourcesResult::TagResourcesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +TagResourcesResult::~TagResourcesResult() +{} + +void TagResourcesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/alidns/src/model/UntagResourcesRequest.cc b/alidns/src/model/UntagResourcesRequest.cc new file mode 100644 index 000000000..7811ab791 --- /dev/null +++ b/alidns/src/model/UntagResourcesRequest.cc @@ -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 + +using AlibabaCloud::Alidns::Model::UntagResourcesRequest; + +UntagResourcesRequest::UntagResourcesRequest() : + RpcServiceRequest("alidns", "2015-01-09", "UntagResources") +{ + setMethod(HttpRequest::Method::Post); +} + +UntagResourcesRequest::~UntagResourcesRequest() +{} + +bool UntagResourcesRequest::getAll()const +{ + return all_; +} + +void UntagResourcesRequest::setAll(bool all) +{ + all_ = all; + setParameter("All", all ? "true" : "false"); +} + +std::vector UntagResourcesRequest::getResourceId()const +{ + return resourceId_; +} + +void UntagResourcesRequest::setResourceId(const std::vector& resourceId) +{ + resourceId_ = resourceId; + for(int dep1 = 0; dep1!= resourceId.size(); dep1++) { + setParameter("ResourceId."+ std::to_string(dep1), resourceId.at(dep1)); + } +} + +std::string UntagResourcesRequest::getResourceType()const +{ + return resourceType_; +} + +void UntagResourcesRequest::setResourceType(const std::string& resourceType) +{ + resourceType_ = resourceType; + setParameter("ResourceType", resourceType); +} + +std::string UntagResourcesRequest::getUserClientIp()const +{ + return userClientIp_; +} + +void UntagResourcesRequest::setUserClientIp(const std::string& userClientIp) +{ + userClientIp_ = userClientIp; + setParameter("UserClientIp", userClientIp); +} + +std::string UntagResourcesRequest::getLang()const +{ + return lang_; +} + +void UntagResourcesRequest::setLang(const std::string& lang) +{ + lang_ = lang; + setParameter("Lang", lang); +} + +std::vector UntagResourcesRequest::getTagKey()const +{ + return tagKey_; +} + +void UntagResourcesRequest::setTagKey(const std::vector& tagKey) +{ + tagKey_ = tagKey; + for(int dep1 = 0; dep1!= tagKey.size(); dep1++) { + setParameter("TagKey."+ std::to_string(dep1), tagKey.at(dep1)); + } +} + diff --git a/alidns/src/model/UntagResourcesResult.cc b/alidns/src/model/UntagResourcesResult.cc new file mode 100644 index 000000000..1000ed7d5 --- /dev/null +++ b/alidns/src/model/UntagResourcesResult.cc @@ -0,0 +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 +#include + +using namespace AlibabaCloud::Alidns; +using namespace AlibabaCloud::Alidns::Model; + +UntagResourcesResult::UntagResourcesResult() : + ServiceResult() +{} + +UntagResourcesResult::UntagResourcesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UntagResourcesResult::~UntagResourcesResult() +{} + +void UntagResourcesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} +