From fe60cca4048fce7302b78b805c2f021c818be337 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 7 Dec 2021 07:25:44 +0000 Subject: [PATCH] Add MetaTag APIs. --- CHANGELOG | 3 + VERSION | 2 +- tag/CMakeLists.txt | 16 ++ tag/include/alibabacloud/tag/TagClient.h | 32 ++++ .../tag/model/CreateTagsRequest.h | 63 +++++++ .../alibabacloud/tag/model/CreateTagsResult.h | 49 ++++++ .../alibabacloud/tag/model/DeleteTagRequest.h | 57 ++++++ .../alibabacloud/tag/model/DeleteTagResult.h | 49 ++++++ .../tag/model/DescribeRegionsRequest.h | 57 ++++++ .../tag/model/DescribeRegionsResult.h | 57 ++++++ .../tag/model/ListResourcesByTagRequest.h | 72 ++++++++ .../tag/model/ListResourcesByTagResult.h | 64 +++++++ .../tag/model/ListTagKeysRequest.h | 122 +++++++------ .../tag/model/ListTagKeysResult.h | 1 + .../tag/model/ListTagResourcesRequest.h | 116 ++++++------ .../tag/model/ListTagValuesRequest.h | 122 +++++++------ .../tag/model/TagResourcesRequest.h | 98 +++++------ .../tag/model/UntagResourcesRequest.h | 98 +++++------ tag/src/TagClient.cc | 144 +++++++++++++++ tag/src/model/CreateTagsRequest.cc | 83 +++++++++ tag/src/model/CreateTagsResult.cc | 44 +++++ tag/src/model/DeleteTagRequest.cc | 81 +++++++++ tag/src/model/DeleteTagResult.cc | 44 +++++ tag/src/model/DescribeRegionsRequest.cc | 81 +++++++++ tag/src/model/DescribeRegionsResult.cc | 61 +++++++ tag/src/model/ListResourcesByTagRequest.cc | 126 +++++++++++++ tag/src/model/ListResourcesByTagResult.cc | 76 ++++++++ tag/src/model/ListTagKeysRequest.cc | 166 ++++++++++-------- tag/src/model/ListTagKeysResult.cc | 6 +- tag/src/model/ListTagResourcesRequest.cc | 143 +++++++-------- tag/src/model/ListTagResourcesResult.cc | 16 +- tag/src/model/ListTagValuesRequest.cc | 166 ++++++++++-------- tag/src/model/TagResourcesRequest.cc | 107 +++++------ tag/src/model/UntagResourcesRequest.cc | 108 +++++------- 34 files changed, 1881 insertions(+), 649 deletions(-) create mode 100644 tag/include/alibabacloud/tag/model/CreateTagsRequest.h create mode 100644 tag/include/alibabacloud/tag/model/CreateTagsResult.h create mode 100644 tag/include/alibabacloud/tag/model/DeleteTagRequest.h create mode 100644 tag/include/alibabacloud/tag/model/DeleteTagResult.h create mode 100644 tag/include/alibabacloud/tag/model/DescribeRegionsRequest.h create mode 100644 tag/include/alibabacloud/tag/model/DescribeRegionsResult.h create mode 100644 tag/include/alibabacloud/tag/model/ListResourcesByTagRequest.h create mode 100644 tag/include/alibabacloud/tag/model/ListResourcesByTagResult.h create mode 100644 tag/src/model/CreateTagsRequest.cc create mode 100644 tag/src/model/CreateTagsResult.cc create mode 100644 tag/src/model/DeleteTagRequest.cc create mode 100644 tag/src/model/DeleteTagResult.cc create mode 100644 tag/src/model/DescribeRegionsRequest.cc create mode 100644 tag/src/model/DescribeRegionsResult.cc create mode 100644 tag/src/model/ListResourcesByTagRequest.cc create mode 100644 tag/src/model/ListResourcesByTagResult.cc diff --git a/CHANGELOG b/CHANGELOG index 12db82c05..ac9321040 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2021-12-07 Version: 1.36.968 +- Add MetaTag APIs. + 2021-12-06 Version: 1.36.967 - Support Bond Eni. diff --git a/VERSION b/VERSION index 732dc3959..a24273877 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.967 \ No newline at end of file +1.36.968 \ No newline at end of file diff --git a/tag/CMakeLists.txt b/tag/CMakeLists.txt index d7aaf4d0f..0d3f42ff8 100644 --- a/tag/CMakeLists.txt +++ b/tag/CMakeLists.txt @@ -21,6 +21,14 @@ set(tag_public_header include/alibabacloud/tag/TagExport.h ) set(tag_public_header_model + include/alibabacloud/tag/model/CreateTagsRequest.h + include/alibabacloud/tag/model/CreateTagsResult.h + include/alibabacloud/tag/model/DeleteTagRequest.h + include/alibabacloud/tag/model/DeleteTagResult.h + include/alibabacloud/tag/model/DescribeRegionsRequest.h + include/alibabacloud/tag/model/DescribeRegionsResult.h + include/alibabacloud/tag/model/ListResourcesByTagRequest.h + include/alibabacloud/tag/model/ListResourcesByTagResult.h include/alibabacloud/tag/model/ListTagKeysRequest.h include/alibabacloud/tag/model/ListTagKeysResult.h include/alibabacloud/tag/model/ListTagResourcesRequest.h @@ -34,6 +42,14 @@ set(tag_public_header_model set(tag_src src/TagClient.cc + src/model/CreateTagsRequest.cc + src/model/CreateTagsResult.cc + src/model/DeleteTagRequest.cc + src/model/DeleteTagResult.cc + src/model/DescribeRegionsRequest.cc + src/model/DescribeRegionsResult.cc + src/model/ListResourcesByTagRequest.cc + src/model/ListResourcesByTagResult.cc src/model/ListTagKeysRequest.cc src/model/ListTagKeysResult.cc src/model/ListTagResourcesRequest.cc diff --git a/tag/include/alibabacloud/tag/TagClient.h b/tag/include/alibabacloud/tag/TagClient.h index 508a94efa..385fbfcf5 100644 --- a/tag/include/alibabacloud/tag/TagClient.h +++ b/tag/include/alibabacloud/tag/TagClient.h @@ -22,6 +22,14 @@ #include #include #include "TagExport.h" +#include "model/CreateTagsRequest.h" +#include "model/CreateTagsResult.h" +#include "model/DeleteTagRequest.h" +#include "model/DeleteTagResult.h" +#include "model/DescribeRegionsRequest.h" +#include "model/DescribeRegionsResult.h" +#include "model/ListResourcesByTagRequest.h" +#include "model/ListResourcesByTagResult.h" #include "model/ListTagKeysRequest.h" #include "model/ListTagKeysResult.h" #include "model/ListTagResourcesRequest.h" @@ -41,6 +49,18 @@ namespace AlibabaCloud class ALIBABACLOUD_TAG_EXPORT TagClient : public RpcServiceClient { public: + typedef Outcome CreateTagsOutcome; + typedef std::future CreateTagsOutcomeCallable; + typedef std::function&)> CreateTagsAsyncHandler; + typedef Outcome DeleteTagOutcome; + typedef std::future DeleteTagOutcomeCallable; + typedef std::function&)> DeleteTagAsyncHandler; + typedef Outcome DescribeRegionsOutcome; + typedef std::future DescribeRegionsOutcomeCallable; + typedef std::function&)> DescribeRegionsAsyncHandler; + typedef Outcome ListResourcesByTagOutcome; + typedef std::future ListResourcesByTagOutcomeCallable; + typedef std::function&)> ListResourcesByTagAsyncHandler; typedef Outcome ListTagKeysOutcome; typedef std::future ListTagKeysOutcomeCallable; typedef std::function&)> ListTagKeysAsyncHandler; @@ -61,6 +81,18 @@ namespace AlibabaCloud TagClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); TagClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); ~TagClient(); + CreateTagsOutcome createTags(const Model::CreateTagsRequest &request)const; + void createTagsAsync(const Model::CreateTagsRequest& request, const CreateTagsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateTagsOutcomeCallable createTagsCallable(const Model::CreateTagsRequest& request) const; + DeleteTagOutcome deleteTag(const Model::DeleteTagRequest &request)const; + void deleteTagAsync(const Model::DeleteTagRequest& request, const DeleteTagAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DeleteTagOutcomeCallable deleteTagCallable(const Model::DeleteTagRequest& request) const; + DescribeRegionsOutcome describeRegions(const Model::DescribeRegionsRequest &request)const; + void describeRegionsAsync(const Model::DescribeRegionsRequest& request, const DescribeRegionsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeRegionsOutcomeCallable describeRegionsCallable(const Model::DescribeRegionsRequest& request) const; + ListResourcesByTagOutcome listResourcesByTag(const Model::ListResourcesByTagRequest &request)const; + void listResourcesByTagAsync(const Model::ListResourcesByTagRequest& request, const ListResourcesByTagAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListResourcesByTagOutcomeCallable listResourcesByTagCallable(const Model::ListResourcesByTagRequest& request) const; ListTagKeysOutcome listTagKeys(const Model::ListTagKeysRequest &request)const; void listTagKeysAsync(const Model::ListTagKeysRequest& request, const ListTagKeysAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListTagKeysOutcomeCallable listTagKeysCallable(const Model::ListTagKeysRequest& request) const; diff --git a/tag/include/alibabacloud/tag/model/CreateTagsRequest.h b/tag/include/alibabacloud/tag/model/CreateTagsRequest.h new file mode 100644 index 000000000..0038d4a06 --- /dev/null +++ b/tag/include/alibabacloud/tag/model/CreateTagsRequest.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_TAG_MODEL_CREATETAGSREQUEST_H_ +#define ALIBABACLOUD_TAG_MODEL_CREATETAGSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Tag { +namespace Model { +class ALIBABACLOUD_TAG_EXPORT CreateTagsRequest : public RpcServiceRequest { +public: + struct TagKeyValueParamList { + std::string key; + struct TagValueParamList { + std::string value; + std::string description; + }; + std::vector tagValueParamList; + std::string description; + }; + CreateTagsRequest(); + ~CreateTagsRequest(); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::string getResourceOwnerAccount() const; + void setResourceOwnerAccount(const std::string &resourceOwnerAccount); + std::string getOwnerAccount() const; + void setOwnerAccount(const std::string &ownerAccount); + long getOwnerId() const; + void setOwnerId(long ownerId); + std::vector getTagKeyValueParamList() const; + void setTagKeyValueParamList(const std::vector &tagKeyValueParamList); + +private: + std::string regionId_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + std::vector tagKeyValueParamList_; +}; +} // namespace Model +} // namespace Tag +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_TAG_MODEL_CREATETAGSREQUEST_H_ diff --git a/tag/include/alibabacloud/tag/model/CreateTagsResult.h b/tag/include/alibabacloud/tag/model/CreateTagsResult.h new file mode 100644 index 000000000..a990b4fc0 --- /dev/null +++ b/tag/include/alibabacloud/tag/model/CreateTagsResult.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_TAG_MODEL_CREATETAGSRESULT_H_ +#define ALIBABACLOUD_TAG_MODEL_CREATETAGSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Tag + { + namespace Model + { + class ALIBABACLOUD_TAG_EXPORT CreateTagsResult : public ServiceResult + { + public: + + + CreateTagsResult(); + explicit CreateTagsResult(const std::string &payload); + ~CreateTagsResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_TAG_MODEL_CREATETAGSRESULT_H_ \ No newline at end of file diff --git a/tag/include/alibabacloud/tag/model/DeleteTagRequest.h b/tag/include/alibabacloud/tag/model/DeleteTagRequest.h new file mode 100644 index 000000000..1fbd43d56 --- /dev/null +++ b/tag/include/alibabacloud/tag/model/DeleteTagRequest.h @@ -0,0 +1,57 @@ +/* + * 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_TAG_MODEL_DELETETAGREQUEST_H_ +#define ALIBABACLOUD_TAG_MODEL_DELETETAGREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Tag { +namespace Model { +class ALIBABACLOUD_TAG_EXPORT DeleteTagRequest : public RpcServiceRequest { +public: + DeleteTagRequest(); + ~DeleteTagRequest(); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::string getValue() const; + void setValue(const std::string &value); + std::string getKey() const; + void setKey(const std::string &key); + std::string getResourceOwnerAccount() const; + void setResourceOwnerAccount(const std::string &resourceOwnerAccount); + std::string getOwnerAccount() const; + void setOwnerAccount(const std::string &ownerAccount); + long getOwnerId() const; + void setOwnerId(long ownerId); + +private: + std::string regionId_; + std::string value_; + std::string key_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; +}; +} // namespace Model +} // namespace Tag +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_TAG_MODEL_DELETETAGREQUEST_H_ diff --git a/tag/include/alibabacloud/tag/model/DeleteTagResult.h b/tag/include/alibabacloud/tag/model/DeleteTagResult.h new file mode 100644 index 000000000..65deda23b --- /dev/null +++ b/tag/include/alibabacloud/tag/model/DeleteTagResult.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_TAG_MODEL_DELETETAGRESULT_H_ +#define ALIBABACLOUD_TAG_MODEL_DELETETAGRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Tag + { + namespace Model + { + class ALIBABACLOUD_TAG_EXPORT DeleteTagResult : public ServiceResult + { + public: + + + DeleteTagResult(); + explicit DeleteTagResult(const std::string &payload); + ~DeleteTagResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_TAG_MODEL_DELETETAGRESULT_H_ \ No newline at end of file diff --git a/tag/include/alibabacloud/tag/model/DescribeRegionsRequest.h b/tag/include/alibabacloud/tag/model/DescribeRegionsRequest.h new file mode 100644 index 000000000..1fbd79287 --- /dev/null +++ b/tag/include/alibabacloud/tag/model/DescribeRegionsRequest.h @@ -0,0 +1,57 @@ +/* + * 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_TAG_MODEL_DESCRIBEREGIONSREQUEST_H_ +#define ALIBABACLOUD_TAG_MODEL_DESCRIBEREGIONSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Tag { +namespace Model { +class ALIBABACLOUD_TAG_EXPORT DescribeRegionsRequest : public RpcServiceRequest { +public: + DescribeRegionsRequest(); + ~DescribeRegionsRequest(); + long getResourceOwnerId() const; + void setResourceOwnerId(long resourceOwnerId); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::string getResourceOwnerAccount() const; + void setResourceOwnerAccount(const std::string &resourceOwnerAccount); + std::string getOwnerAccount() const; + void setOwnerAccount(const std::string &ownerAccount); + long getOwnerId() const; + void setOwnerId(long ownerId); + std::string getAcceptLanguage() const; + void setAcceptLanguage(const std::string &acceptLanguage); + +private: + long resourceOwnerId_; + std::string regionId_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + std::string acceptLanguage_; +}; +} // namespace Model +} // namespace Tag +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_TAG_MODEL_DESCRIBEREGIONSREQUEST_H_ diff --git a/tag/include/alibabacloud/tag/model/DescribeRegionsResult.h b/tag/include/alibabacloud/tag/model/DescribeRegionsResult.h new file mode 100644 index 000000000..5dd684d4a --- /dev/null +++ b/tag/include/alibabacloud/tag/model/DescribeRegionsResult.h @@ -0,0 +1,57 @@ +/* + * 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_TAG_MODEL_DESCRIBEREGIONSRESULT_H_ +#define ALIBABACLOUD_TAG_MODEL_DESCRIBEREGIONSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Tag + { + namespace Model + { + class ALIBABACLOUD_TAG_EXPORT DescribeRegionsResult : public ServiceResult + { + public: + struct Region + { + std::string regionId; + std::string regionEndpoint; + std::string localName; + }; + + + DescribeRegionsResult(); + explicit DescribeRegionsResult(const std::string &payload); + ~DescribeRegionsResult(); + std::vector getRegions()const; + + protected: + void parse(const std::string &payload); + private: + std::vector regions_; + + }; + } + } +} +#endif // !ALIBABACLOUD_TAG_MODEL_DESCRIBEREGIONSRESULT_H_ \ No newline at end of file diff --git a/tag/include/alibabacloud/tag/model/ListResourcesByTagRequest.h b/tag/include/alibabacloud/tag/model/ListResourcesByTagRequest.h new file mode 100644 index 000000000..7d806f03d --- /dev/null +++ b/tag/include/alibabacloud/tag/model/ListResourcesByTagRequest.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_TAG_MODEL_LISTRESOURCESBYTAGREQUEST_H_ +#define ALIBABACLOUD_TAG_MODEL_LISTRESOURCESBYTAGREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Tag { +namespace Model { +class ALIBABACLOUD_TAG_EXPORT ListResourcesByTagRequest : public RpcServiceRequest { +public: + ListResourcesByTagRequest(); + ~ListResourcesByTagRequest(); + std::string getTagFilterKey() const; + void setTagFilterKey(const std::string &tagFilterKey); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::string getNextToken() const; + void setNextToken(const std::string &nextToken); + bool getIncludeAllTags() const; + void setIncludeAllTags(bool includeAllTags); + std::string getTagFilterValue() const; + void setTagFilterValue(const std::string &tagFilterValue); + std::string getResourceOwnerAccount() const; + void setResourceOwnerAccount(const std::string &resourceOwnerAccount); + std::string getOwnerAccount() const; + void setOwnerAccount(const std::string &ownerAccount); + long getOwnerId() const; + void setOwnerId(long ownerId); + std::string getResourceType() const; + void setResourceType(const std::string &resourceType); + int getMaxResult() const; + void setMaxResult(int maxResult); + std::string getFuzzyType() const; + void setFuzzyType(const std::string &fuzzyType); + +private: + std::string tagFilterKey_; + std::string regionId_; + std::string nextToken_; + bool includeAllTags_; + std::string tagFilterValue_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + std::string resourceType_; + int maxResult_; + std::string fuzzyType_; +}; +} // namespace Model +} // namespace Tag +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_TAG_MODEL_LISTRESOURCESBYTAGREQUEST_H_ diff --git a/tag/include/alibabacloud/tag/model/ListResourcesByTagResult.h b/tag/include/alibabacloud/tag/model/ListResourcesByTagResult.h new file mode 100644 index 000000000..e4a4be33a --- /dev/null +++ b/tag/include/alibabacloud/tag/model/ListResourcesByTagResult.h @@ -0,0 +1,64 @@ +/* + * 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_TAG_MODEL_LISTRESOURCESBYTAGRESULT_H_ +#define ALIBABACLOUD_TAG_MODEL_LISTRESOURCESBYTAGRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Tag + { + namespace Model + { + class ALIBABACLOUD_TAG_EXPORT ListResourcesByTagResult : public ServiceResult + { + public: + struct TagResource + { + struct Tag + { + std::string category; + std::string value; + std::string key; + }; + std::string resourceId; + std::vector tags; + }; + + + ListResourcesByTagResult(); + explicit ListResourcesByTagResult(const std::string &payload); + ~ListResourcesByTagResult(); + std::string getNextToken()const; + std::vector getResources()const; + + protected: + void parse(const std::string &payload); + private: + std::string nextToken_; + std::vector resources_; + + }; + } + } +} +#endif // !ALIBABACLOUD_TAG_MODEL_LISTRESOURCESBYTAGRESULT_H_ \ No newline at end of file diff --git a/tag/include/alibabacloud/tag/model/ListTagKeysRequest.h b/tag/include/alibabacloud/tag/model/ListTagKeysRequest.h index 857315442..96789dc1d 100644 --- a/tag/include/alibabacloud/tag/model/ListTagKeysRequest.h +++ b/tag/include/alibabacloud/tag/model/ListTagKeysRequest.h @@ -1,69 +1,75 @@ /* * 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_TAG_MODEL_LISTTAGKEYSREQUEST_H_ -#define ALIBABACLOUD_TAG_MODEL_LISTTAGKEYSREQUEST_H_ - -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Tag - { - namespace Model - { - class ALIBABACLOUD_TAG_EXPORT ListTagKeysRequest : public RpcServiceRequest - { - - public: - ListTagKeysRequest(); - ~ListTagKeysRequest(); - - std::string getRegionId()const; - void setRegionId(const std::string& regionId); - std::string getNextToken()const; - void setNextToken(const std::string& nextToken); - int getPageSize()const; - void setPageSize(int pageSize); - std::string getResourceOwnerAccount()const; - void setResourceOwnerAccount(const std::string& resourceOwnerAccount); - std::string getOwnerAccount()const; - void setOwnerAccount(const std::string& ownerAccount); - long getOwnerId()const; - void setOwnerId(long ownerId); - std::string getResourceType()const; - void setResourceType(const std::string& resourceType); - std::string getCategory()const; - void setCategory(const std::string& category); - - private: - std::string regionId_; - std::string nextToken_; - int pageSize_; - std::string resourceOwnerAccount_; - std::string ownerAccount_; - long ownerId_; - std::string resourceType_; - std::string category_; - - }; - } - } -} -#endif // !ALIBABACLOUD_TAG_MODEL_LISTTAGKEYSREQUEST_H_ \ No newline at end of file + */ + +#ifndef ALIBABACLOUD_TAG_MODEL_LISTTAGKEYSREQUEST_H_ +#define ALIBABACLOUD_TAG_MODEL_LISTTAGKEYSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Tag { +namespace Model { +class ALIBABACLOUD_TAG_EXPORT ListTagKeysRequest : public RpcServiceRequest { +public: + ListTagKeysRequest(); + ~ListTagKeysRequest(); + std::string getTagProduct() const; + void setTagProduct(const std::string &tagProduct); + std::string getTagFilterKey() const; + void setTagFilterKey(const std::string &tagFilterKey); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::string getNextToken() const; + void setNextToken(const std::string &nextToken); + int getPageSize() const; + void setPageSize(int pageSize); + std::string getQueryType() const; + void setQueryType(const std::string &queryType); + std::string getResourceOwnerAccount() const; + void setResourceOwnerAccount(const std::string &resourceOwnerAccount); + std::string getOwnerAccount() const; + void setOwnerAccount(const std::string &ownerAccount); + long getOwnerId() const; + void setOwnerId(long ownerId); + std::string getResourceType() const; + void setResourceType(const std::string &resourceType); + std::string getFuzzyType() const; + void setFuzzyType(const std::string &fuzzyType); + std::string getCategory() const; + void setCategory(const std::string &category); + +private: + std::string tagProduct_; + std::string tagFilterKey_; + std::string regionId_; + std::string nextToken_; + int pageSize_; + std::string queryType_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + std::string resourceType_; + std::string fuzzyType_; + std::string category_; +}; +} // namespace Model +} // namespace Tag +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_TAG_MODEL_LISTTAGKEYSREQUEST_H_ diff --git a/tag/include/alibabacloud/tag/model/ListTagKeysResult.h b/tag/include/alibabacloud/tag/model/ListTagKeysResult.h index a8a8179e2..a6a07a482 100644 --- a/tag/include/alibabacloud/tag/model/ListTagKeysResult.h +++ b/tag/include/alibabacloud/tag/model/ListTagKeysResult.h @@ -35,6 +35,7 @@ namespace AlibabaCloud struct Key { std::string category; + std::string description; std::string key; }; diff --git a/tag/include/alibabacloud/tag/model/ListTagResourcesRequest.h b/tag/include/alibabacloud/tag/model/ListTagResourcesRequest.h index 4edc0ba9b..19b735ea1 100644 --- a/tag/include/alibabacloud/tag/model/ListTagResourcesRequest.h +++ b/tag/include/alibabacloud/tag/model/ListTagResourcesRequest.h @@ -1,72 +1,66 @@ /* * 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_TAG_MODEL_LISTTAGRESOURCESREQUEST_H_ -#define ALIBABACLOUD_TAG_MODEL_LISTTAGRESOURCESREQUEST_H_ - -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Tag - { - namespace Model - { - class ALIBABACLOUD_TAG_EXPORT ListTagResourcesRequest : public RpcServiceRequest - { - - public: - ListTagResourcesRequest(); - ~ListTagResourcesRequest(); - - std::string getRegionId()const; - void setRegionId(const std::string& regionId); - std::string getNextToken()const; - void setNextToken(const std::string& nextToken); - int getPageSize()const; - void setPageSize(int pageSize); - std::vector getResourceARN()const; - void setResourceARN(const std::vector& resourceARN); - std::string getResourceOwnerAccount()const; - void setResourceOwnerAccount(const std::string& resourceOwnerAccount); - std::string getOwnerAccount()const; - void setOwnerAccount(const std::string& ownerAccount); - long getOwnerId()const; - void setOwnerId(long ownerId); - std::string getTags()const; - void setTags(const std::string& tags); - std::string getCategory()const; - void setCategory(const std::string& category); - - private: - std::string regionId_; - std::string nextToken_; - int pageSize_; - std::vector resourceARN_; - std::string resourceOwnerAccount_; - std::string ownerAccount_; - long ownerId_; - std::string tags_; - std::string category_; - - }; - } - } -} -#endif // !ALIBABACLOUD_TAG_MODEL_LISTTAGRESOURCESREQUEST_H_ \ No newline at end of file + */ + +#ifndef ALIBABACLOUD_TAG_MODEL_LISTTAGRESOURCESREQUEST_H_ +#define ALIBABACLOUD_TAG_MODEL_LISTTAGRESOURCESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Tag { +namespace Model { +class ALIBABACLOUD_TAG_EXPORT ListTagResourcesRequest : public RpcServiceRequest { +public: + ListTagResourcesRequest(); + ~ListTagResourcesRequest(); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::string getNextToken() const; + void setNextToken(const std::string &nextToken); + int getPageSize() const; + void setPageSize(int pageSize); + std::vector getResourceARN() const; + void setResourceARN(const std::vector &resourceARN); + std::string getResourceOwnerAccount() const; + void setResourceOwnerAccount(const std::string &resourceOwnerAccount); + std::string getOwnerAccount() const; + void setOwnerAccount(const std::string &ownerAccount); + long getOwnerId() const; + void setOwnerId(long ownerId); + std::string getTags() const; + void setTags(const std::string &tags); + std::string getCategory() const; + void setCategory(const std::string &category); + +private: + std::string regionId_; + std::string nextToken_; + int pageSize_; + std::vector resourceARN_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + std::string tags_; + std::string category_; +}; +} // namespace Model +} // namespace Tag +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_TAG_MODEL_LISTTAGRESOURCESREQUEST_H_ diff --git a/tag/include/alibabacloud/tag/model/ListTagValuesRequest.h b/tag/include/alibabacloud/tag/model/ListTagValuesRequest.h index c5357fd76..10ca722ae 100644 --- a/tag/include/alibabacloud/tag/model/ListTagValuesRequest.h +++ b/tag/include/alibabacloud/tag/model/ListTagValuesRequest.h @@ -1,69 +1,75 @@ /* * 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_TAG_MODEL_LISTTAGVALUESREQUEST_H_ -#define ALIBABACLOUD_TAG_MODEL_LISTTAGVALUESREQUEST_H_ - -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Tag - { - namespace Model - { - class ALIBABACLOUD_TAG_EXPORT ListTagValuesRequest : public RpcServiceRequest - { - - public: - ListTagValuesRequest(); - ~ListTagValuesRequest(); - - std::string getRegionId()const; - void setRegionId(const std::string& regionId); - std::string getNextToken()const; - void setNextToken(const std::string& nextToken); - int getPageSize()const; - void setPageSize(int pageSize); - std::string getKey()const; - void setKey(const std::string& key); - std::string getResourceOwnerAccount()const; - void setResourceOwnerAccount(const std::string& resourceOwnerAccount); - std::string getOwnerAccount()const; - void setOwnerAccount(const std::string& ownerAccount); - long getOwnerId()const; - void setOwnerId(long ownerId); - std::string getResourceType()const; - void setResourceType(const std::string& resourceType); - - private: - std::string regionId_; - std::string nextToken_; - int pageSize_; - std::string key_; - std::string resourceOwnerAccount_; - std::string ownerAccount_; - long ownerId_; - std::string resourceType_; - - }; - } - } -} -#endif // !ALIBABACLOUD_TAG_MODEL_LISTTAGVALUESREQUEST_H_ \ No newline at end of file + */ + +#ifndef ALIBABACLOUD_TAG_MODEL_LISTTAGVALUESREQUEST_H_ +#define ALIBABACLOUD_TAG_MODEL_LISTTAGVALUESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Tag { +namespace Model { +class ALIBABACLOUD_TAG_EXPORT ListTagValuesRequest : public RpcServiceRequest { +public: + ListTagValuesRequest(); + ~ListTagValuesRequest(); + std::string getTagProduct() const; + void setTagProduct(const std::string &tagProduct); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::string getNextToken() const; + void setNextToken(const std::string &nextToken); + int getPageSize() const; + void setPageSize(int pageSize); + std::string getTagFilterValue() const; + void setTagFilterValue(const std::string &tagFilterValue); + std::string getKey() const; + void setKey(const std::string &key); + std::string getQueryType() const; + void setQueryType(const std::string &queryType); + std::string getResourceOwnerAccount() const; + void setResourceOwnerAccount(const std::string &resourceOwnerAccount); + std::string getOwnerAccount() const; + void setOwnerAccount(const std::string &ownerAccount); + long getOwnerId() const; + void setOwnerId(long ownerId); + std::string getResourceType() const; + void setResourceType(const std::string &resourceType); + std::string getFuzzyType() const; + void setFuzzyType(const std::string &fuzzyType); + +private: + std::string tagProduct_; + std::string regionId_; + std::string nextToken_; + int pageSize_; + std::string tagFilterValue_; + std::string key_; + std::string queryType_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + std::string resourceType_; + std::string fuzzyType_; +}; +} // namespace Model +} // namespace Tag +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_TAG_MODEL_LISTTAGVALUESREQUEST_H_ diff --git a/tag/include/alibabacloud/tag/model/TagResourcesRequest.h b/tag/include/alibabacloud/tag/model/TagResourcesRequest.h index c32ca4995..1104e4e90 100644 --- a/tag/include/alibabacloud/tag/model/TagResourcesRequest.h +++ b/tag/include/alibabacloud/tag/model/TagResourcesRequest.h @@ -1,63 +1,57 @@ /* * 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_TAG_MODEL_TAGRESOURCESREQUEST_H_ -#define ALIBABACLOUD_TAG_MODEL_TAGRESOURCESREQUEST_H_ - -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Tag - { - namespace Model - { - class ALIBABACLOUD_TAG_EXPORT TagResourcesRequest : public RpcServiceRequest - { - - public: - TagResourcesRequest(); - ~TagResourcesRequest(); - - std::string getRegionId()const; - void setRegionId(const std::string& regionId); - std::vector getResourceARN()const; - void setResourceARN(const std::vector& resourceARN); - std::string getResourceOwnerAccount()const; - void setResourceOwnerAccount(const std::string& resourceOwnerAccount); - std::string getOwnerAccount()const; - void setOwnerAccount(const std::string& ownerAccount); - long getOwnerId()const; - void setOwnerId(long ownerId); - std::string getTags()const; - void setTags(const std::string& tags); - - private: - std::string regionId_; - std::vector resourceARN_; - std::string resourceOwnerAccount_; - std::string ownerAccount_; - long ownerId_; - std::string tags_; - - }; - } - } -} -#endif // !ALIBABACLOUD_TAG_MODEL_TAGRESOURCESREQUEST_H_ \ No newline at end of file + */ + +#ifndef ALIBABACLOUD_TAG_MODEL_TAGRESOURCESREQUEST_H_ +#define ALIBABACLOUD_TAG_MODEL_TAGRESOURCESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Tag { +namespace Model { +class ALIBABACLOUD_TAG_EXPORT TagResourcesRequest : public RpcServiceRequest { +public: + TagResourcesRequest(); + ~TagResourcesRequest(); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::vector getResourceARN() const; + void setResourceARN(const std::vector &resourceARN); + std::string getResourceOwnerAccount() const; + void setResourceOwnerAccount(const std::string &resourceOwnerAccount); + std::string getOwnerAccount() const; + void setOwnerAccount(const std::string &ownerAccount); + long getOwnerId() const; + void setOwnerId(long ownerId); + std::string getTags() const; + void setTags(const std::string &tags); + +private: + std::string regionId_; + std::vector resourceARN_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + std::string tags_; +}; +} // namespace Model +} // namespace Tag +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_TAG_MODEL_TAGRESOURCESREQUEST_H_ diff --git a/tag/include/alibabacloud/tag/model/UntagResourcesRequest.h b/tag/include/alibabacloud/tag/model/UntagResourcesRequest.h index ae231f33d..02205fb4a 100644 --- a/tag/include/alibabacloud/tag/model/UntagResourcesRequest.h +++ b/tag/include/alibabacloud/tag/model/UntagResourcesRequest.h @@ -1,63 +1,57 @@ /* * 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_TAG_MODEL_UNTAGRESOURCESREQUEST_H_ -#define ALIBABACLOUD_TAG_MODEL_UNTAGRESOURCESREQUEST_H_ - -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Tag - { - namespace Model - { - class ALIBABACLOUD_TAG_EXPORT UntagResourcesRequest : public RpcServiceRequest - { - - public: - UntagResourcesRequest(); - ~UntagResourcesRequest(); - - std::string getRegionId()const; - void setRegionId(const std::string& regionId); - std::vector getResourceARN()const; - void setResourceARN(const std::vector& resourceARN); - std::string getResourceOwnerAccount()const; - void setResourceOwnerAccount(const std::string& resourceOwnerAccount); - std::string getOwnerAccount()const; - void setOwnerAccount(const std::string& ownerAccount); - long getOwnerId()const; - void setOwnerId(long ownerId); - std::vector getTagKey()const; - void setTagKey(const std::vector& tagKey); - - private: - std::string regionId_; - std::vector resourceARN_; - std::string resourceOwnerAccount_; - std::string ownerAccount_; - long ownerId_; - std::vector tagKey_; - - }; - } - } -} -#endif // !ALIBABACLOUD_TAG_MODEL_UNTAGRESOURCESREQUEST_H_ \ No newline at end of file + */ + +#ifndef ALIBABACLOUD_TAG_MODEL_UNTAGRESOURCESREQUEST_H_ +#define ALIBABACLOUD_TAG_MODEL_UNTAGRESOURCESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Tag { +namespace Model { +class ALIBABACLOUD_TAG_EXPORT UntagResourcesRequest : public RpcServiceRequest { +public: + UntagResourcesRequest(); + ~UntagResourcesRequest(); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::vector getResourceARN() const; + void setResourceARN(const std::vector &resourceARN); + std::string getResourceOwnerAccount() const; + void setResourceOwnerAccount(const std::string &resourceOwnerAccount); + std::string getOwnerAccount() const; + void setOwnerAccount(const std::string &ownerAccount); + long getOwnerId() const; + void setOwnerId(long ownerId); + std::vector getTagKey() const; + void setTagKey(const std::vector &tagKey); + +private: + std::string regionId_; + std::vector resourceARN_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + std::vector tagKey_; +}; +} // namespace Model +} // namespace Tag +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_TAG_MODEL_UNTAGRESOURCESREQUEST_H_ diff --git a/tag/src/TagClient.cc b/tag/src/TagClient.cc index f8678c576..897cbe976 100644 --- a/tag/src/TagClient.cc +++ b/tag/src/TagClient.cc @@ -51,6 +51,150 @@ TagClient::TagClient(const std::string & accessKeyId, const std::string & access TagClient::~TagClient() {} +TagClient::CreateTagsOutcome TagClient::createTags(const CreateTagsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateTagsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateTagsOutcome(CreateTagsResult(outcome.result())); + else + return CreateTagsOutcome(outcome.error()); +} + +void TagClient::createTagsAsync(const CreateTagsRequest& request, const CreateTagsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createTags(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +TagClient::CreateTagsOutcomeCallable TagClient::createTagsCallable(const CreateTagsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createTags(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +TagClient::DeleteTagOutcome TagClient::deleteTag(const DeleteTagRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DeleteTagOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DeleteTagOutcome(DeleteTagResult(outcome.result())); + else + return DeleteTagOutcome(outcome.error()); +} + +void TagClient::deleteTagAsync(const DeleteTagRequest& request, const DeleteTagAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, deleteTag(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +TagClient::DeleteTagOutcomeCallable TagClient::deleteTagCallable(const DeleteTagRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->deleteTag(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +TagClient::DescribeRegionsOutcome TagClient::describeRegions(const DescribeRegionsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeRegionsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeRegionsOutcome(DescribeRegionsResult(outcome.result())); + else + return DescribeRegionsOutcome(outcome.error()); +} + +void TagClient::describeRegionsAsync(const DescribeRegionsRequest& request, const DescribeRegionsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeRegions(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +TagClient::DescribeRegionsOutcomeCallable TagClient::describeRegionsCallable(const DescribeRegionsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeRegions(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +TagClient::ListResourcesByTagOutcome TagClient::listResourcesByTag(const ListResourcesByTagRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListResourcesByTagOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListResourcesByTagOutcome(ListResourcesByTagResult(outcome.result())); + else + return ListResourcesByTagOutcome(outcome.error()); +} + +void TagClient::listResourcesByTagAsync(const ListResourcesByTagRequest& request, const ListResourcesByTagAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listResourcesByTag(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +TagClient::ListResourcesByTagOutcomeCallable TagClient::listResourcesByTagCallable(const ListResourcesByTagRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listResourcesByTag(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + TagClient::ListTagKeysOutcome TagClient::listTagKeys(const ListTagKeysRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/tag/src/model/CreateTagsRequest.cc b/tag/src/model/CreateTagsRequest.cc new file mode 100644 index 000000000..9b8ee30a5 --- /dev/null +++ b/tag/src/model/CreateTagsRequest.cc @@ -0,0 +1,83 @@ +/* + * 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::Tag::Model::CreateTagsRequest; + +CreateTagsRequest::CreateTagsRequest() + : RpcServiceRequest("tag", "2018-08-28", "CreateTags") { + setMethod(HttpRequest::Method::Post); +} + +CreateTagsRequest::~CreateTagsRequest() {} + +std::string CreateTagsRequest::getRegionId() const { + return regionId_; +} + +void CreateTagsRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + +std::string CreateTagsRequest::getResourceOwnerAccount() const { + return resourceOwnerAccount_; +} + +void CreateTagsRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) { + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount); +} + +std::string CreateTagsRequest::getOwnerAccount() const { + return ownerAccount_; +} + +void CreateTagsRequest::setOwnerAccount(const std::string &ownerAccount) { + ownerAccount_ = ownerAccount; + setParameter(std::string("OwnerAccount"), ownerAccount); +} + +long CreateTagsRequest::getOwnerId() const { + return ownerId_; +} + +void CreateTagsRequest::setOwnerId(long ownerId) { + ownerId_ = ownerId; + setParameter(std::string("OwnerId"), std::to_string(ownerId)); +} + +std::vector CreateTagsRequest::getTagKeyValueParamList() const { + return tagKeyValueParamList_; +} + +void CreateTagsRequest::setTagKeyValueParamList(const std::vector &tagKeyValueParamList) { + tagKeyValueParamList_ = tagKeyValueParamList; + for(int dep1 = 0; dep1 != tagKeyValueParamList.size(); dep1++) { + auto tagKeyValueParamListObj = tagKeyValueParamList.at(dep1); + std::string tagKeyValueParamListObjStr = std::string("TagKeyValueParamList") + "." + std::to_string(dep1 + 1); + setParameter(tagKeyValueParamListObjStr + ".Key", tagKeyValueParamListObj.key); + for(int dep2 = 0; dep2 != tagKeyValueParamListObj.tagValueParamList.size(); dep2++) { + auto tagValueParamListObj = tagKeyValueParamListObj.tagValueParamList.at(dep2); + std::string tagValueParamListObjStr = tagKeyValueParamListObjStr + ".TagValueParamList" + "." + std::to_string(dep2 + 1); + setParameter(tagValueParamListObjStr + ".Value", tagValueParamListObj.value); + setParameter(tagValueParamListObjStr + ".Description", tagValueParamListObj.description); + } + setParameter(tagKeyValueParamListObjStr + ".Description", tagKeyValueParamListObj.description); + } +} + diff --git a/tag/src/model/CreateTagsResult.cc b/tag/src/model/CreateTagsResult.cc new file mode 100644 index 000000000..27ce9232c --- /dev/null +++ b/tag/src/model/CreateTagsResult.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::Tag; +using namespace AlibabaCloud::Tag::Model; + +CreateTagsResult::CreateTagsResult() : + ServiceResult() +{} + +CreateTagsResult::CreateTagsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateTagsResult::~CreateTagsResult() +{} + +void CreateTagsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/tag/src/model/DeleteTagRequest.cc b/tag/src/model/DeleteTagRequest.cc new file mode 100644 index 000000000..a18a12d35 --- /dev/null +++ b/tag/src/model/DeleteTagRequest.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 + +using AlibabaCloud::Tag::Model::DeleteTagRequest; + +DeleteTagRequest::DeleteTagRequest() + : RpcServiceRequest("tag", "2018-08-28", "DeleteTag") { + setMethod(HttpRequest::Method::Post); +} + +DeleteTagRequest::~DeleteTagRequest() {} + +std::string DeleteTagRequest::getRegionId() const { + return regionId_; +} + +void DeleteTagRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + +std::string DeleteTagRequest::getValue() const { + return value_; +} + +void DeleteTagRequest::setValue(const std::string &value) { + value_ = value; + setParameter(std::string("Value"), value); +} + +std::string DeleteTagRequest::getKey() const { + return key_; +} + +void DeleteTagRequest::setKey(const std::string &key) { + key_ = key; + setParameter(std::string("Key"), key); +} + +std::string DeleteTagRequest::getResourceOwnerAccount() const { + return resourceOwnerAccount_; +} + +void DeleteTagRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) { + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount); +} + +std::string DeleteTagRequest::getOwnerAccount() const { + return ownerAccount_; +} + +void DeleteTagRequest::setOwnerAccount(const std::string &ownerAccount) { + ownerAccount_ = ownerAccount; + setParameter(std::string("OwnerAccount"), ownerAccount); +} + +long DeleteTagRequest::getOwnerId() const { + return ownerId_; +} + +void DeleteTagRequest::setOwnerId(long ownerId) { + ownerId_ = ownerId; + setParameter(std::string("OwnerId"), std::to_string(ownerId)); +} + diff --git a/tag/src/model/DeleteTagResult.cc b/tag/src/model/DeleteTagResult.cc new file mode 100644 index 000000000..8e075a540 --- /dev/null +++ b/tag/src/model/DeleteTagResult.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::Tag; +using namespace AlibabaCloud::Tag::Model; + +DeleteTagResult::DeleteTagResult() : + ServiceResult() +{} + +DeleteTagResult::DeleteTagResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DeleteTagResult::~DeleteTagResult() +{} + +void DeleteTagResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/tag/src/model/DescribeRegionsRequest.cc b/tag/src/model/DescribeRegionsRequest.cc new file mode 100644 index 000000000..5197d4015 --- /dev/null +++ b/tag/src/model/DescribeRegionsRequest.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 + +using AlibabaCloud::Tag::Model::DescribeRegionsRequest; + +DescribeRegionsRequest::DescribeRegionsRequest() + : RpcServiceRequest("tag", "2018-08-28", "DescribeRegions") { + setMethod(HttpRequest::Method::Post); +} + +DescribeRegionsRequest::~DescribeRegionsRequest() {} + +long DescribeRegionsRequest::getResourceOwnerId() const { + return resourceOwnerId_; +} + +void DescribeRegionsRequest::setResourceOwnerId(long resourceOwnerId) { + resourceOwnerId_ = resourceOwnerId; + setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId)); +} + +std::string DescribeRegionsRequest::getRegionId() const { + return regionId_; +} + +void DescribeRegionsRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + +std::string DescribeRegionsRequest::getResourceOwnerAccount() const { + return resourceOwnerAccount_; +} + +void DescribeRegionsRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) { + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount); +} + +std::string DescribeRegionsRequest::getOwnerAccount() const { + return ownerAccount_; +} + +void DescribeRegionsRequest::setOwnerAccount(const std::string &ownerAccount) { + ownerAccount_ = ownerAccount; + setParameter(std::string("OwnerAccount"), ownerAccount); +} + +long DescribeRegionsRequest::getOwnerId() const { + return ownerId_; +} + +void DescribeRegionsRequest::setOwnerId(long ownerId) { + ownerId_ = ownerId; + setParameter(std::string("OwnerId"), std::to_string(ownerId)); +} + +std::string DescribeRegionsRequest::getAcceptLanguage() const { + return acceptLanguage_; +} + +void DescribeRegionsRequest::setAcceptLanguage(const std::string &acceptLanguage) { + acceptLanguage_ = acceptLanguage; + setParameter(std::string("AcceptLanguage"), acceptLanguage); +} + diff --git a/tag/src/model/DescribeRegionsResult.cc b/tag/src/model/DescribeRegionsResult.cc new file mode 100644 index 000000000..290afad8a --- /dev/null +++ b/tag/src/model/DescribeRegionsResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Tag; +using namespace AlibabaCloud::Tag::Model; + +DescribeRegionsResult::DescribeRegionsResult() : + ServiceResult() +{} + +DescribeRegionsResult::DescribeRegionsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeRegionsResult::~DescribeRegionsResult() +{} + +void DescribeRegionsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allRegionsNode = value["Regions"]["Region"]; + for (auto valueRegionsRegion : allRegionsNode) + { + Region regionsObject; + if(!valueRegionsRegion["LocalName"].isNull()) + regionsObject.localName = valueRegionsRegion["LocalName"].asString(); + if(!valueRegionsRegion["RegionEndpoint"].isNull()) + regionsObject.regionEndpoint = valueRegionsRegion["RegionEndpoint"].asString(); + if(!valueRegionsRegion["RegionId"].isNull()) + regionsObject.regionId = valueRegionsRegion["RegionId"].asString(); + regions_.push_back(regionsObject); + } + +} + +std::vector DescribeRegionsResult::getRegions()const +{ + return regions_; +} + diff --git a/tag/src/model/ListResourcesByTagRequest.cc b/tag/src/model/ListResourcesByTagRequest.cc new file mode 100644 index 000000000..1ede05ead --- /dev/null +++ b/tag/src/model/ListResourcesByTagRequest.cc @@ -0,0 +1,126 @@ +/* + * 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::Tag::Model::ListResourcesByTagRequest; + +ListResourcesByTagRequest::ListResourcesByTagRequest() + : RpcServiceRequest("tag", "2018-08-28", "ListResourcesByTag") { + setMethod(HttpRequest::Method::Post); +} + +ListResourcesByTagRequest::~ListResourcesByTagRequest() {} + +std::string ListResourcesByTagRequest::getTagFilterKey() const { + return tagFilterKey_; +} + +void ListResourcesByTagRequest::setTagFilterKey(const std::string &tagFilterKey) { + tagFilterKey_ = tagFilterKey; + setParameter(std::string("TagFilter.Key"), tagFilterKey); +} + +std::string ListResourcesByTagRequest::getRegionId() const { + return regionId_; +} + +void ListResourcesByTagRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + +std::string ListResourcesByTagRequest::getNextToken() const { + return nextToken_; +} + +void ListResourcesByTagRequest::setNextToken(const std::string &nextToken) { + nextToken_ = nextToken; + setParameter(std::string("NextToken"), nextToken); +} + +bool ListResourcesByTagRequest::getIncludeAllTags() const { + return includeAllTags_; +} + +void ListResourcesByTagRequest::setIncludeAllTags(bool includeAllTags) { + includeAllTags_ = includeAllTags; + setParameter(std::string("IncludeAllTags"), includeAllTags ? "true" : "false"); +} + +std::string ListResourcesByTagRequest::getTagFilterValue() const { + return tagFilterValue_; +} + +void ListResourcesByTagRequest::setTagFilterValue(const std::string &tagFilterValue) { + tagFilterValue_ = tagFilterValue; + setParameter(std::string("TagFilter.Value"), tagFilterValue); +} + +std::string ListResourcesByTagRequest::getResourceOwnerAccount() const { + return resourceOwnerAccount_; +} + +void ListResourcesByTagRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) { + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount); +} + +std::string ListResourcesByTagRequest::getOwnerAccount() const { + return ownerAccount_; +} + +void ListResourcesByTagRequest::setOwnerAccount(const std::string &ownerAccount) { + ownerAccount_ = ownerAccount; + setParameter(std::string("OwnerAccount"), ownerAccount); +} + +long ListResourcesByTagRequest::getOwnerId() const { + return ownerId_; +} + +void ListResourcesByTagRequest::setOwnerId(long ownerId) { + ownerId_ = ownerId; + setParameter(std::string("OwnerId"), std::to_string(ownerId)); +} + +std::string ListResourcesByTagRequest::getResourceType() const { + return resourceType_; +} + +void ListResourcesByTagRequest::setResourceType(const std::string &resourceType) { + resourceType_ = resourceType; + setParameter(std::string("ResourceType"), resourceType); +} + +int ListResourcesByTagRequest::getMaxResult() const { + return maxResult_; +} + +void ListResourcesByTagRequest::setMaxResult(int maxResult) { + maxResult_ = maxResult; + setParameter(std::string("MaxResult"), std::to_string(maxResult)); +} + +std::string ListResourcesByTagRequest::getFuzzyType() const { + return fuzzyType_; +} + +void ListResourcesByTagRequest::setFuzzyType(const std::string &fuzzyType) { + fuzzyType_ = fuzzyType; + setParameter(std::string("FuzzyType"), fuzzyType); +} + diff --git a/tag/src/model/ListResourcesByTagResult.cc b/tag/src/model/ListResourcesByTagResult.cc new file mode 100644 index 000000000..cffacb36c --- /dev/null +++ b/tag/src/model/ListResourcesByTagResult.cc @@ -0,0 +1,76 @@ +/* + * 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::Tag; +using namespace AlibabaCloud::Tag::Model; + +ListResourcesByTagResult::ListResourcesByTagResult() : + ServiceResult() +{} + +ListResourcesByTagResult::ListResourcesByTagResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListResourcesByTagResult::~ListResourcesByTagResult() +{} + +void ListResourcesByTagResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allResourcesNode = value["Resources"]["TagResource"]; + for (auto valueResourcesTagResource : allResourcesNode) + { + TagResource resourcesObject; + if(!valueResourcesTagResource["ResourceId"].isNull()) + resourcesObject.resourceId = valueResourcesTagResource["ResourceId"].asString(); + auto allTagsNode = valueResourcesTagResource["Tags"]["Tag"]; + for (auto valueResourcesTagResourceTagsTag : allTagsNode) + { + TagResource::Tag tagsObject; + if(!valueResourcesTagResourceTagsTag["Key"].isNull()) + tagsObject.key = valueResourcesTagResourceTagsTag["Key"].asString(); + if(!valueResourcesTagResourceTagsTag["Value"].isNull()) + tagsObject.value = valueResourcesTagResourceTagsTag["Value"].asString(); + if(!valueResourcesTagResourceTagsTag["Category"].isNull()) + tagsObject.category = valueResourcesTagResourceTagsTag["Category"].asString(); + resourcesObject.tags.push_back(tagsObject); + } + resources_.push_back(resourcesObject); + } + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + +} + +std::string ListResourcesByTagResult::getNextToken()const +{ + return nextToken_; +} + +std::vector ListResourcesByTagResult::getResources()const +{ + return resources_; +} + diff --git a/tag/src/model/ListTagKeysRequest.cc b/tag/src/model/ListTagKeysRequest.cc index d7f0ee80b..a13891e52 100644 --- a/tag/src/model/ListTagKeysRequest.cc +++ b/tag/src/model/ListTagKeysRequest.cc @@ -1,117 +1,135 @@ /* * 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::Tag::Model::ListTagKeysRequest; - -ListTagKeysRequest::ListTagKeysRequest() : - RpcServiceRequest("tag", "2018-08-28", "ListTagKeys") -{ - setMethod(HttpRequest::Method::Post); -} - -ListTagKeysRequest::~ListTagKeysRequest() -{} - -std::string ListTagKeysRequest::getRegionId()const -{ - return regionId_; + */ + +#include + +using AlibabaCloud::Tag::Model::ListTagKeysRequest; + +ListTagKeysRequest::ListTagKeysRequest() + : RpcServiceRequest("tag", "2018-08-28", "ListTagKeys") { + setMethod(HttpRequest::Method::Post); } -void ListTagKeysRequest::setRegionId(const std::string& regionId) -{ - regionId_ = regionId; - setParameter("RegionId", regionId); +ListTagKeysRequest::~ListTagKeysRequest() {} + +std::string ListTagKeysRequest::getTagProduct() const { + return tagProduct_; } -std::string ListTagKeysRequest::getNextToken()const -{ - return nextToken_; +void ListTagKeysRequest::setTagProduct(const std::string &tagProduct) { + tagProduct_ = tagProduct; + setParameter(std::string("TagProduct"), tagProduct); } -void ListTagKeysRequest::setNextToken(const std::string& nextToken) -{ - nextToken_ = nextToken; - setParameter("NextToken", nextToken); +std::string ListTagKeysRequest::getTagFilterKey() const { + return tagFilterKey_; } -int ListTagKeysRequest::getPageSize()const -{ - return pageSize_; +void ListTagKeysRequest::setTagFilterKey(const std::string &tagFilterKey) { + tagFilterKey_ = tagFilterKey; + setParameter(std::string("TagFilter.Key"), tagFilterKey); } -void ListTagKeysRequest::setPageSize(int pageSize) -{ - pageSize_ = pageSize; - setParameter("PageSize", std::to_string(pageSize)); +std::string ListTagKeysRequest::getRegionId() const { + return regionId_; } -std::string ListTagKeysRequest::getResourceOwnerAccount()const -{ - return resourceOwnerAccount_; +void ListTagKeysRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); } -void ListTagKeysRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) -{ - resourceOwnerAccount_ = resourceOwnerAccount; - setParameter("ResourceOwnerAccount", resourceOwnerAccount); +std::string ListTagKeysRequest::getNextToken() const { + return nextToken_; } -std::string ListTagKeysRequest::getOwnerAccount()const -{ - return ownerAccount_; +void ListTagKeysRequest::setNextToken(const std::string &nextToken) { + nextToken_ = nextToken; + setParameter(std::string("NextToken"), nextToken); } -void ListTagKeysRequest::setOwnerAccount(const std::string& ownerAccount) -{ - ownerAccount_ = ownerAccount; - setParameter("OwnerAccount", ownerAccount); +int ListTagKeysRequest::getPageSize() const { + return pageSize_; } -long ListTagKeysRequest::getOwnerId()const -{ - return ownerId_; +void ListTagKeysRequest::setPageSize(int pageSize) { + pageSize_ = pageSize; + setParameter(std::string("PageSize"), std::to_string(pageSize)); } -void ListTagKeysRequest::setOwnerId(long ownerId) -{ - ownerId_ = ownerId; - setParameter("OwnerId", std::to_string(ownerId)); +std::string ListTagKeysRequest::getQueryType() const { + return queryType_; } -std::string ListTagKeysRequest::getResourceType()const -{ - return resourceType_; +void ListTagKeysRequest::setQueryType(const std::string &queryType) { + queryType_ = queryType; + setParameter(std::string("QueryType"), queryType); } -void ListTagKeysRequest::setResourceType(const std::string& resourceType) -{ - resourceType_ = resourceType; - setParameter("ResourceType", resourceType); +std::string ListTagKeysRequest::getResourceOwnerAccount() const { + return resourceOwnerAccount_; } -std::string ListTagKeysRequest::getCategory()const -{ - return category_; +void ListTagKeysRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) { + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount); } -void ListTagKeysRequest::setCategory(const std::string& category) -{ - category_ = category; - setParameter("Category", category); +std::string ListTagKeysRequest::getOwnerAccount() const { + return ownerAccount_; +} + +void ListTagKeysRequest::setOwnerAccount(const std::string &ownerAccount) { + ownerAccount_ = ownerAccount; + setParameter(std::string("OwnerAccount"), ownerAccount); +} + +long ListTagKeysRequest::getOwnerId() const { + return ownerId_; +} + +void ListTagKeysRequest::setOwnerId(long ownerId) { + ownerId_ = ownerId; + setParameter(std::string("OwnerId"), std::to_string(ownerId)); +} + +std::string ListTagKeysRequest::getResourceType() const { + return resourceType_; +} + +void ListTagKeysRequest::setResourceType(const std::string &resourceType) { + resourceType_ = resourceType; + setParameter(std::string("ResourceType"), resourceType); +} + +std::string ListTagKeysRequest::getFuzzyType() const { + return fuzzyType_; +} + +void ListTagKeysRequest::setFuzzyType(const std::string &fuzzyType) { + fuzzyType_ = fuzzyType; + setParameter(std::string("FuzzyType"), fuzzyType); +} + +std::string ListTagKeysRequest::getCategory() const { + return category_; +} + +void ListTagKeysRequest::setCategory(const std::string &category) { + category_ = category; + setParameter(std::string("Category"), category); } diff --git a/tag/src/model/ListTagKeysResult.cc b/tag/src/model/ListTagKeysResult.cc index 6130b0568..72243eb81 100644 --- a/tag/src/model/ListTagKeysResult.cc +++ b/tag/src/model/ListTagKeysResult.cc @@ -43,10 +43,12 @@ void ListTagKeysResult::parse(const std::string &payload) for (auto valueKeysKey : allKeysNode) { Key keysObject; - if(!valueKeysKey["Category"].isNull()) - keysObject.category = valueKeysKey["Category"].asString(); if(!valueKeysKey["Key"].isNull()) keysObject.key = valueKeysKey["Key"].asString(); + if(!valueKeysKey["Category"].isNull()) + keysObject.category = valueKeysKey["Category"].asString(); + if(!valueKeysKey["Description"].isNull()) + keysObject.description = valueKeysKey["Description"].asString(); keys_.push_back(keysObject); } if(!value["NextToken"].isNull()) diff --git a/tag/src/model/ListTagResourcesRequest.cc b/tag/src/model/ListTagResourcesRequest.cc index 3240d4670..1a202948e 100644 --- a/tag/src/model/ListTagResourcesRequest.cc +++ b/tag/src/model/ListTagResourcesRequest.cc @@ -1,130 +1,107 @@ /* * 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::Tag::Model::ListTagResourcesRequest; - -ListTagResourcesRequest::ListTagResourcesRequest() : - RpcServiceRequest("tag", "2018-08-28", "ListTagResources") -{ - setMethod(HttpRequest::Method::Post); -} - -ListTagResourcesRequest::~ListTagResourcesRequest() -{} - -std::string ListTagResourcesRequest::getRegionId()const -{ - return regionId_; + */ + +#include + +using AlibabaCloud::Tag::Model::ListTagResourcesRequest; + +ListTagResourcesRequest::ListTagResourcesRequest() + : RpcServiceRequest("tag", "2018-08-28", "ListTagResources") { + setMethod(HttpRequest::Method::Post); } -void ListTagResourcesRequest::setRegionId(const std::string& regionId) -{ - regionId_ = regionId; - setParameter("RegionId", regionId); +ListTagResourcesRequest::~ListTagResourcesRequest() {} + +std::string ListTagResourcesRequest::getRegionId() const { + return regionId_; } -std::string ListTagResourcesRequest::getNextToken()const -{ - return nextToken_; +void ListTagResourcesRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); } -void ListTagResourcesRequest::setNextToken(const std::string& nextToken) -{ - nextToken_ = nextToken; - setParameter("NextToken", nextToken); +std::string ListTagResourcesRequest::getNextToken() const { + return nextToken_; } -int ListTagResourcesRequest::getPageSize()const -{ - return pageSize_; +void ListTagResourcesRequest::setNextToken(const std::string &nextToken) { + nextToken_ = nextToken; + setParameter(std::string("NextToken"), nextToken); } -void ListTagResourcesRequest::setPageSize(int pageSize) -{ - pageSize_ = pageSize; - setParameter("PageSize", std::to_string(pageSize)); +int ListTagResourcesRequest::getPageSize() const { + return pageSize_; } -std::vector ListTagResourcesRequest::getResourceARN()const -{ - return resourceARN_; +void ListTagResourcesRequest::setPageSize(int pageSize) { + pageSize_ = pageSize; + setParameter(std::string("PageSize"), std::to_string(pageSize)); } -void ListTagResourcesRequest::setResourceARN(const std::vector& resourceARN) -{ - resourceARN_ = resourceARN; - for(int dep1 = 0; dep1!= resourceARN.size(); dep1++) { - setParameter("ResourceARN."+ std::to_string(dep1), resourceARN.at(dep1)); - } +std::vector ListTagResourcesRequest::getResourceARN() const { + return resourceARN_; } -std::string ListTagResourcesRequest::getResourceOwnerAccount()const -{ - return resourceOwnerAccount_; +void ListTagResourcesRequest::setResourceARN(const std::vector &resourceARN) { + resourceARN_ = resourceARN; } -void ListTagResourcesRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) -{ - resourceOwnerAccount_ = resourceOwnerAccount; - setParameter("ResourceOwnerAccount", resourceOwnerAccount); +std::string ListTagResourcesRequest::getResourceOwnerAccount() const { + return resourceOwnerAccount_; } -std::string ListTagResourcesRequest::getOwnerAccount()const -{ - return ownerAccount_; +void ListTagResourcesRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) { + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount); } -void ListTagResourcesRequest::setOwnerAccount(const std::string& ownerAccount) -{ - ownerAccount_ = ownerAccount; - setParameter("OwnerAccount", ownerAccount); +std::string ListTagResourcesRequest::getOwnerAccount() const { + return ownerAccount_; } -long ListTagResourcesRequest::getOwnerId()const -{ - return ownerId_; +void ListTagResourcesRequest::setOwnerAccount(const std::string &ownerAccount) { + ownerAccount_ = ownerAccount; + setParameter(std::string("OwnerAccount"), ownerAccount); } -void ListTagResourcesRequest::setOwnerId(long ownerId) -{ - ownerId_ = ownerId; - setParameter("OwnerId", std::to_string(ownerId)); +long ListTagResourcesRequest::getOwnerId() const { + return ownerId_; } -std::string ListTagResourcesRequest::getTags()const -{ - return tags_; +void ListTagResourcesRequest::setOwnerId(long ownerId) { + ownerId_ = ownerId; + setParameter(std::string("OwnerId"), std::to_string(ownerId)); } -void ListTagResourcesRequest::setTags(const std::string& tags) -{ - tags_ = tags; - setParameter("Tags", tags); +std::string ListTagResourcesRequest::getTags() const { + return tags_; } -std::string ListTagResourcesRequest::getCategory()const -{ - return category_; +void ListTagResourcesRequest::setTags(const std::string &tags) { + tags_ = tags; + setParameter(std::string("Tags"), tags); } -void ListTagResourcesRequest::setCategory(const std::string& category) -{ - category_ = category; - setParameter("Category", category); +std::string ListTagResourcesRequest::getCategory() const { + return category_; +} + +void ListTagResourcesRequest::setCategory(const std::string &category) { + category_ = category; + setParameter(std::string("Category"), category); } diff --git a/tag/src/model/ListTagResourcesResult.cc b/tag/src/model/ListTagResourcesResult.cc index a7104789e..75694f9a2 100644 --- a/tag/src/model/ListTagResourcesResult.cc +++ b/tag/src/model/ListTagResourcesResult.cc @@ -45,16 +45,16 @@ void ListTagResourcesResult::parse(const std::string &payload) TagResource tagResourcesObject; if(!valueTagResourcesTagResource["ResourceARN"].isNull()) tagResourcesObject.resourceARN = valueTagResourcesTagResource["ResourceARN"].asString(); - auto allTagsNode = allTagResourcesNode["Tags"]["Tag"]; - for (auto allTagResourcesNodeTagsTag : allTagsNode) + auto allTagsNode = valueTagResourcesTagResource["Tags"]["Tag"]; + for (auto valueTagResourcesTagResourceTagsTag : allTagsNode) { TagResource::Tag tagsObject; - if(!allTagResourcesNodeTagsTag["Key"].isNull()) - tagsObject.key = allTagResourcesNodeTagsTag["Key"].asString(); - if(!allTagResourcesNodeTagsTag["Value"].isNull()) - tagsObject.value = allTagResourcesNodeTagsTag["Value"].asString(); - if(!allTagResourcesNodeTagsTag["Category"].isNull()) - tagsObject.category = allTagResourcesNodeTagsTag["Category"].asString(); + if(!valueTagResourcesTagResourceTagsTag["Key"].isNull()) + tagsObject.key = valueTagResourcesTagResourceTagsTag["Key"].asString(); + if(!valueTagResourcesTagResourceTagsTag["Value"].isNull()) + tagsObject.value = valueTagResourcesTagResourceTagsTag["Value"].asString(); + if(!valueTagResourcesTagResourceTagsTag["Category"].isNull()) + tagsObject.category = valueTagResourcesTagResourceTagsTag["Category"].asString(); tagResourcesObject.tags.push_back(tagsObject); } tagResources_.push_back(tagResourcesObject); diff --git a/tag/src/model/ListTagValuesRequest.cc b/tag/src/model/ListTagValuesRequest.cc index 6a2a35d6c..bba25bb32 100644 --- a/tag/src/model/ListTagValuesRequest.cc +++ b/tag/src/model/ListTagValuesRequest.cc @@ -1,117 +1,135 @@ /* * 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::Tag::Model::ListTagValuesRequest; - -ListTagValuesRequest::ListTagValuesRequest() : - RpcServiceRequest("tag", "2018-08-28", "ListTagValues") -{ - setMethod(HttpRequest::Method::Post); -} - -ListTagValuesRequest::~ListTagValuesRequest() -{} - -std::string ListTagValuesRequest::getRegionId()const -{ - return regionId_; + */ + +#include + +using AlibabaCloud::Tag::Model::ListTagValuesRequest; + +ListTagValuesRequest::ListTagValuesRequest() + : RpcServiceRequest("tag", "2018-08-28", "ListTagValues") { + setMethod(HttpRequest::Method::Post); } -void ListTagValuesRequest::setRegionId(const std::string& regionId) -{ - regionId_ = regionId; - setParameter("RegionId", regionId); +ListTagValuesRequest::~ListTagValuesRequest() {} + +std::string ListTagValuesRequest::getTagProduct() const { + return tagProduct_; } -std::string ListTagValuesRequest::getNextToken()const -{ - return nextToken_; +void ListTagValuesRequest::setTagProduct(const std::string &tagProduct) { + tagProduct_ = tagProduct; + setParameter(std::string("TagProduct"), tagProduct); } -void ListTagValuesRequest::setNextToken(const std::string& nextToken) -{ - nextToken_ = nextToken; - setParameter("NextToken", nextToken); +std::string ListTagValuesRequest::getRegionId() const { + return regionId_; } -int ListTagValuesRequest::getPageSize()const -{ - return pageSize_; +void ListTagValuesRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); } -void ListTagValuesRequest::setPageSize(int pageSize) -{ - pageSize_ = pageSize; - setParameter("PageSize", std::to_string(pageSize)); +std::string ListTagValuesRequest::getNextToken() const { + return nextToken_; } -std::string ListTagValuesRequest::getKey()const -{ - return key_; +void ListTagValuesRequest::setNextToken(const std::string &nextToken) { + nextToken_ = nextToken; + setParameter(std::string("NextToken"), nextToken); } -void ListTagValuesRequest::setKey(const std::string& key) -{ - key_ = key; - setParameter("Key", key); +int ListTagValuesRequest::getPageSize() const { + return pageSize_; } -std::string ListTagValuesRequest::getResourceOwnerAccount()const -{ - return resourceOwnerAccount_; +void ListTagValuesRequest::setPageSize(int pageSize) { + pageSize_ = pageSize; + setParameter(std::string("PageSize"), std::to_string(pageSize)); } -void ListTagValuesRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) -{ - resourceOwnerAccount_ = resourceOwnerAccount; - setParameter("ResourceOwnerAccount", resourceOwnerAccount); +std::string ListTagValuesRequest::getTagFilterValue() const { + return tagFilterValue_; } -std::string ListTagValuesRequest::getOwnerAccount()const -{ - return ownerAccount_; +void ListTagValuesRequest::setTagFilterValue(const std::string &tagFilterValue) { + tagFilterValue_ = tagFilterValue; + setParameter(std::string("TagFilter.Value"), tagFilterValue); } -void ListTagValuesRequest::setOwnerAccount(const std::string& ownerAccount) -{ - ownerAccount_ = ownerAccount; - setParameter("OwnerAccount", ownerAccount); +std::string ListTagValuesRequest::getKey() const { + return key_; } -long ListTagValuesRequest::getOwnerId()const -{ - return ownerId_; +void ListTagValuesRequest::setKey(const std::string &key) { + key_ = key; + setParameter(std::string("Key"), key); } -void ListTagValuesRequest::setOwnerId(long ownerId) -{ - ownerId_ = ownerId; - setParameter("OwnerId", std::to_string(ownerId)); +std::string ListTagValuesRequest::getQueryType() const { + return queryType_; } -std::string ListTagValuesRequest::getResourceType()const -{ - return resourceType_; +void ListTagValuesRequest::setQueryType(const std::string &queryType) { + queryType_ = queryType; + setParameter(std::string("QueryType"), queryType); } -void ListTagValuesRequest::setResourceType(const std::string& resourceType) -{ - resourceType_ = resourceType; - setParameter("ResourceType", resourceType); +std::string ListTagValuesRequest::getResourceOwnerAccount() const { + return resourceOwnerAccount_; +} + +void ListTagValuesRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) { + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount); +} + +std::string ListTagValuesRequest::getOwnerAccount() const { + return ownerAccount_; +} + +void ListTagValuesRequest::setOwnerAccount(const std::string &ownerAccount) { + ownerAccount_ = ownerAccount; + setParameter(std::string("OwnerAccount"), ownerAccount); +} + +long ListTagValuesRequest::getOwnerId() const { + return ownerId_; +} + +void ListTagValuesRequest::setOwnerId(long ownerId) { + ownerId_ = ownerId; + setParameter(std::string("OwnerId"), std::to_string(ownerId)); +} + +std::string ListTagValuesRequest::getResourceType() const { + return resourceType_; +} + +void ListTagValuesRequest::setResourceType(const std::string &resourceType) { + resourceType_ = resourceType; + setParameter(std::string("ResourceType"), resourceType); +} + +std::string ListTagValuesRequest::getFuzzyType() const { + return fuzzyType_; +} + +void ListTagValuesRequest::setFuzzyType(const std::string &fuzzyType) { + fuzzyType_ = fuzzyType; + setParameter(std::string("FuzzyType"), fuzzyType); } diff --git a/tag/src/model/TagResourcesRequest.cc b/tag/src/model/TagResourcesRequest.cc index ef26cc498..7b8a299e5 100644 --- a/tag/src/model/TagResourcesRequest.cc +++ b/tag/src/model/TagResourcesRequest.cc @@ -1,97 +1,80 @@ /* * 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::Tag::Model::TagResourcesRequest; - -TagResourcesRequest::TagResourcesRequest() : - RpcServiceRequest("tag", "2018-08-28", "TagResources") -{ - setMethod(HttpRequest::Method::Post); -} - -TagResourcesRequest::~TagResourcesRequest() -{} - -std::string TagResourcesRequest::getRegionId()const -{ - return regionId_; + */ + +#include + +using AlibabaCloud::Tag::Model::TagResourcesRequest; + +TagResourcesRequest::TagResourcesRequest() + : RpcServiceRequest("tag", "2018-08-28", "TagResources") { + setMethod(HttpRequest::Method::Post); } -void TagResourcesRequest::setRegionId(const std::string& regionId) -{ - regionId_ = regionId; - setParameter("RegionId", regionId); +TagResourcesRequest::~TagResourcesRequest() {} + +std::string TagResourcesRequest::getRegionId() const { + return regionId_; } -std::vector TagResourcesRequest::getResourceARN()const -{ - return resourceARN_; +void TagResourcesRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); } -void TagResourcesRequest::setResourceARN(const std::vector& resourceARN) -{ - resourceARN_ = resourceARN; - for(int dep1 = 0; dep1!= resourceARN.size(); dep1++) { - setParameter("ResourceARN."+ std::to_string(dep1), resourceARN.at(dep1)); - } +std::vector TagResourcesRequest::getResourceARN() const { + return resourceARN_; } -std::string TagResourcesRequest::getResourceOwnerAccount()const -{ - return resourceOwnerAccount_; +void TagResourcesRequest::setResourceARN(const std::vector &resourceARN) { + resourceARN_ = resourceARN; } -void TagResourcesRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) -{ - resourceOwnerAccount_ = resourceOwnerAccount; - setParameter("ResourceOwnerAccount", resourceOwnerAccount); +std::string TagResourcesRequest::getResourceOwnerAccount() const { + return resourceOwnerAccount_; } -std::string TagResourcesRequest::getOwnerAccount()const -{ - return ownerAccount_; +void TagResourcesRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) { + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount); } -void TagResourcesRequest::setOwnerAccount(const std::string& ownerAccount) -{ - ownerAccount_ = ownerAccount; - setParameter("OwnerAccount", ownerAccount); +std::string TagResourcesRequest::getOwnerAccount() const { + return ownerAccount_; } -long TagResourcesRequest::getOwnerId()const -{ - return ownerId_; +void TagResourcesRequest::setOwnerAccount(const std::string &ownerAccount) { + ownerAccount_ = ownerAccount; + setParameter(std::string("OwnerAccount"), ownerAccount); } -void TagResourcesRequest::setOwnerId(long ownerId) -{ - ownerId_ = ownerId; - setParameter("OwnerId", std::to_string(ownerId)); +long TagResourcesRequest::getOwnerId() const { + return ownerId_; } -std::string TagResourcesRequest::getTags()const -{ - return tags_; +void TagResourcesRequest::setOwnerId(long ownerId) { + ownerId_ = ownerId; + setParameter(std::string("OwnerId"), std::to_string(ownerId)); } -void TagResourcesRequest::setTags(const std::string& tags) -{ - tags_ = tags; - setParameter("Tags", tags); +std::string TagResourcesRequest::getTags() const { + return tags_; +} + +void TagResourcesRequest::setTags(const std::string &tags) { + tags_ = tags; + setParameter(std::string("Tags"), tags); } diff --git a/tag/src/model/UntagResourcesRequest.cc b/tag/src/model/UntagResourcesRequest.cc index 042e1c3c9..3ec6b7b75 100644 --- a/tag/src/model/UntagResourcesRequest.cc +++ b/tag/src/model/UntagResourcesRequest.cc @@ -1,99 +1,79 @@ /* * 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::Tag::Model::UntagResourcesRequest; - -UntagResourcesRequest::UntagResourcesRequest() : - RpcServiceRequest("tag", "2018-08-28", "UntagResources") -{ - setMethod(HttpRequest::Method::Post); -} - -UntagResourcesRequest::~UntagResourcesRequest() -{} - -std::string UntagResourcesRequest::getRegionId()const -{ - return regionId_; + */ + +#include + +using AlibabaCloud::Tag::Model::UntagResourcesRequest; + +UntagResourcesRequest::UntagResourcesRequest() + : RpcServiceRequest("tag", "2018-08-28", "UntagResources") { + setMethod(HttpRequest::Method::Post); } -void UntagResourcesRequest::setRegionId(const std::string& regionId) -{ - regionId_ = regionId; - setParameter("RegionId", regionId); +UntagResourcesRequest::~UntagResourcesRequest() {} + +std::string UntagResourcesRequest::getRegionId() const { + return regionId_; } -std::vector UntagResourcesRequest::getResourceARN()const -{ - return resourceARN_; +void UntagResourcesRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); } -void UntagResourcesRequest::setResourceARN(const std::vector& resourceARN) -{ - resourceARN_ = resourceARN; - for(int dep1 = 0; dep1!= resourceARN.size(); dep1++) { - setParameter("ResourceARN."+ std::to_string(dep1), resourceARN.at(dep1)); - } +std::vector UntagResourcesRequest::getResourceARN() const { + return resourceARN_; } -std::string UntagResourcesRequest::getResourceOwnerAccount()const -{ - return resourceOwnerAccount_; +void UntagResourcesRequest::setResourceARN(const std::vector &resourceARN) { + resourceARN_ = resourceARN; } -void UntagResourcesRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) -{ - resourceOwnerAccount_ = resourceOwnerAccount; - setParameter("ResourceOwnerAccount", resourceOwnerAccount); +std::string UntagResourcesRequest::getResourceOwnerAccount() const { + return resourceOwnerAccount_; } -std::string UntagResourcesRequest::getOwnerAccount()const -{ - return ownerAccount_; +void UntagResourcesRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) { + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount); } -void UntagResourcesRequest::setOwnerAccount(const std::string& ownerAccount) -{ - ownerAccount_ = ownerAccount; - setParameter("OwnerAccount", ownerAccount); +std::string UntagResourcesRequest::getOwnerAccount() const { + return ownerAccount_; } -long UntagResourcesRequest::getOwnerId()const -{ - return ownerId_; +void UntagResourcesRequest::setOwnerAccount(const std::string &ownerAccount) { + ownerAccount_ = ownerAccount; + setParameter(std::string("OwnerAccount"), ownerAccount); } -void UntagResourcesRequest::setOwnerId(long ownerId) -{ - ownerId_ = ownerId; - setParameter("OwnerId", std::to_string(ownerId)); +long UntagResourcesRequest::getOwnerId() const { + return ownerId_; } -std::vector UntagResourcesRequest::getTagKey()const -{ - return tagKey_; +void UntagResourcesRequest::setOwnerId(long ownerId) { + ownerId_ = ownerId; + setParameter(std::string("OwnerId"), std::to_string(ownerId)); } -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)); - } +std::vector UntagResourcesRequest::getTagKey() const { + return tagKey_; +} + +void UntagResourcesRequest::setTagKey(const std::vector &tagKey) { + tagKey_ = tagKey; }