diff --git a/VERSION b/VERSION index 2d938cfdc..b687b8fa1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1875 \ No newline at end of file +1.36.1876 \ No newline at end of file diff --git a/swas-open/CMakeLists.txt b/swas-open/CMakeLists.txt index 9afee7a32..e7a34ba5e 100644 --- a/swas-open/CMakeLists.txt +++ b/swas-open/CMakeLists.txt @@ -49,6 +49,8 @@ set(swas-open_public_header_model include/alibabacloud/swas-open/model/DeleteSnapshotResult.h include/alibabacloud/swas-open/model/DeleteSnapshotsRequest.h include/alibabacloud/swas-open/model/DeleteSnapshotsResult.h + include/alibabacloud/swas-open/model/DescribeCloudAssistantAttributesRequest.h + include/alibabacloud/swas-open/model/DescribeCloudAssistantAttributesResult.h include/alibabacloud/swas-open/model/DescribeCloudAssistantStatusRequest.h include/alibabacloud/swas-open/model/DescribeCloudAssistantStatusResult.h include/alibabacloud/swas-open/model/DescribeCloudMonitorAgentStatusesRequest.h @@ -113,6 +115,8 @@ set(swas-open_public_header_model include/alibabacloud/swas-open/model/ListRegionsResult.h include/alibabacloud/swas-open/model/ListSnapshotsRequest.h include/alibabacloud/swas-open/model/ListSnapshotsResult.h + include/alibabacloud/swas-open/model/ListTagResourcesRequest.h + include/alibabacloud/swas-open/model/ListTagResourcesResult.h include/alibabacloud/swas-open/model/LoginInstanceRequest.h include/alibabacloud/swas-open/model/LoginInstanceResult.h include/alibabacloud/swas-open/model/ModifyDatabaseInstanceDescriptionRequest.h @@ -157,6 +161,10 @@ set(swas-open_public_header_model include/alibabacloud/swas-open/model/StopInstanceResult.h include/alibabacloud/swas-open/model/StopInstancesRequest.h include/alibabacloud/swas-open/model/StopInstancesResult.h + include/alibabacloud/swas-open/model/TagResourcesRequest.h + include/alibabacloud/swas-open/model/TagResourcesResult.h + include/alibabacloud/swas-open/model/UntagResourcesRequest.h + include/alibabacloud/swas-open/model/UntagResourcesResult.h include/alibabacloud/swas-open/model/UpdateCommandAttributeRequest.h include/alibabacloud/swas-open/model/UpdateCommandAttributeResult.h include/alibabacloud/swas-open/model/UpdateDiskAttributeRequest.h @@ -200,6 +208,8 @@ set(swas-open_src src/model/DeleteSnapshotResult.cc src/model/DeleteSnapshotsRequest.cc src/model/DeleteSnapshotsResult.cc + src/model/DescribeCloudAssistantAttributesRequest.cc + src/model/DescribeCloudAssistantAttributesResult.cc src/model/DescribeCloudAssistantStatusRequest.cc src/model/DescribeCloudAssistantStatusResult.cc src/model/DescribeCloudMonitorAgentStatusesRequest.cc @@ -264,6 +274,8 @@ set(swas-open_src src/model/ListRegionsResult.cc src/model/ListSnapshotsRequest.cc src/model/ListSnapshotsResult.cc + src/model/ListTagResourcesRequest.cc + src/model/ListTagResourcesResult.cc src/model/LoginInstanceRequest.cc src/model/LoginInstanceResult.cc src/model/ModifyDatabaseInstanceDescriptionRequest.cc @@ -308,6 +320,10 @@ set(swas-open_src src/model/StopInstanceResult.cc src/model/StopInstancesRequest.cc src/model/StopInstancesResult.cc + src/model/TagResourcesRequest.cc + src/model/TagResourcesResult.cc + src/model/UntagResourcesRequest.cc + src/model/UntagResourcesResult.cc src/model/UpdateCommandAttributeRequest.cc src/model/UpdateCommandAttributeResult.cc src/model/UpdateDiskAttributeRequest.cc diff --git a/swas-open/include/alibabacloud/swas-open/SWAS_OPENClient.h b/swas-open/include/alibabacloud/swas-open/SWAS_OPENClient.h index 54d4dfbcf..871e80977 100644 --- a/swas-open/include/alibabacloud/swas-open/SWAS_OPENClient.h +++ b/swas-open/include/alibabacloud/swas-open/SWAS_OPENClient.h @@ -50,6 +50,8 @@ #include "model/DeleteSnapshotResult.h" #include "model/DeleteSnapshotsRequest.h" #include "model/DeleteSnapshotsResult.h" +#include "model/DescribeCloudAssistantAttributesRequest.h" +#include "model/DescribeCloudAssistantAttributesResult.h" #include "model/DescribeCloudAssistantStatusRequest.h" #include "model/DescribeCloudAssistantStatusResult.h" #include "model/DescribeCloudMonitorAgentStatusesRequest.h" @@ -114,6 +116,8 @@ #include "model/ListRegionsResult.h" #include "model/ListSnapshotsRequest.h" #include "model/ListSnapshotsResult.h" +#include "model/ListTagResourcesRequest.h" +#include "model/ListTagResourcesResult.h" #include "model/LoginInstanceRequest.h" #include "model/LoginInstanceResult.h" #include "model/ModifyDatabaseInstanceDescriptionRequest.h" @@ -158,6 +162,10 @@ #include "model/StopInstanceResult.h" #include "model/StopInstancesRequest.h" #include "model/StopInstancesResult.h" +#include "model/TagResourcesRequest.h" +#include "model/TagResourcesResult.h" +#include "model/UntagResourcesRequest.h" +#include "model/UntagResourcesResult.h" #include "model/UpdateCommandAttributeRequest.h" #include "model/UpdateCommandAttributeResult.h" #include "model/UpdateDiskAttributeRequest.h" @@ -221,6 +229,9 @@ namespace AlibabaCloud typedef Outcome DeleteSnapshotsOutcome; typedef std::future DeleteSnapshotsOutcomeCallable; typedef std::function&)> DeleteSnapshotsAsyncHandler; + typedef Outcome DescribeCloudAssistantAttributesOutcome; + typedef std::future DescribeCloudAssistantAttributesOutcomeCallable; + typedef std::function&)> DescribeCloudAssistantAttributesAsyncHandler; typedef Outcome DescribeCloudAssistantStatusOutcome; typedef std::future DescribeCloudAssistantStatusOutcomeCallable; typedef std::function&)> DescribeCloudAssistantStatusAsyncHandler; @@ -317,6 +328,9 @@ namespace AlibabaCloud typedef Outcome ListSnapshotsOutcome; typedef std::future ListSnapshotsOutcomeCallable; typedef std::function&)> ListSnapshotsAsyncHandler; + typedef Outcome ListTagResourcesOutcome; + typedef std::future ListTagResourcesOutcomeCallable; + typedef std::function&)> ListTagResourcesAsyncHandler; typedef Outcome LoginInstanceOutcome; typedef std::future LoginInstanceOutcomeCallable; typedef std::function&)> LoginInstanceAsyncHandler; @@ -383,6 +397,12 @@ namespace AlibabaCloud typedef Outcome StopInstancesOutcome; typedef std::future StopInstancesOutcomeCallable; typedef std::function&)> StopInstancesAsyncHandler; + typedef Outcome TagResourcesOutcome; + typedef std::future TagResourcesOutcomeCallable; + typedef std::function&)> TagResourcesAsyncHandler; + typedef Outcome UntagResourcesOutcome; + typedef std::future UntagResourcesOutcomeCallable; + typedef std::function&)> UntagResourcesAsyncHandler; typedef Outcome UpdateCommandAttributeOutcome; typedef std::future UpdateCommandAttributeOutcomeCallable; typedef std::function&)> UpdateCommandAttributeAsyncHandler; @@ -448,6 +468,9 @@ namespace AlibabaCloud DeleteSnapshotsOutcome deleteSnapshots(const Model::DeleteSnapshotsRequest &request)const; void deleteSnapshotsAsync(const Model::DeleteSnapshotsRequest& request, const DeleteSnapshotsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DeleteSnapshotsOutcomeCallable deleteSnapshotsCallable(const Model::DeleteSnapshotsRequest& request) const; + DescribeCloudAssistantAttributesOutcome describeCloudAssistantAttributes(const Model::DescribeCloudAssistantAttributesRequest &request)const; + void describeCloudAssistantAttributesAsync(const Model::DescribeCloudAssistantAttributesRequest& request, const DescribeCloudAssistantAttributesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeCloudAssistantAttributesOutcomeCallable describeCloudAssistantAttributesCallable(const Model::DescribeCloudAssistantAttributesRequest& request) const; DescribeCloudAssistantStatusOutcome describeCloudAssistantStatus(const Model::DescribeCloudAssistantStatusRequest &request)const; void describeCloudAssistantStatusAsync(const Model::DescribeCloudAssistantStatusRequest& request, const DescribeCloudAssistantStatusAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeCloudAssistantStatusOutcomeCallable describeCloudAssistantStatusCallable(const Model::DescribeCloudAssistantStatusRequest& request) const; @@ -544,6 +567,9 @@ namespace AlibabaCloud ListSnapshotsOutcome listSnapshots(const Model::ListSnapshotsRequest &request)const; void listSnapshotsAsync(const Model::ListSnapshotsRequest& request, const ListSnapshotsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListSnapshotsOutcomeCallable listSnapshotsCallable(const Model::ListSnapshotsRequest& request) const; + ListTagResourcesOutcome listTagResources(const Model::ListTagResourcesRequest &request)const; + void listTagResourcesAsync(const Model::ListTagResourcesRequest& request, const ListTagResourcesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListTagResourcesOutcomeCallable listTagResourcesCallable(const Model::ListTagResourcesRequest& request) const; LoginInstanceOutcome loginInstance(const Model::LoginInstanceRequest &request)const; void loginInstanceAsync(const Model::LoginInstanceRequest& request, const LoginInstanceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; LoginInstanceOutcomeCallable loginInstanceCallable(const Model::LoginInstanceRequest& request) const; @@ -610,6 +636,12 @@ namespace AlibabaCloud StopInstancesOutcome stopInstances(const Model::StopInstancesRequest &request)const; void stopInstancesAsync(const Model::StopInstancesRequest& request, const StopInstancesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; StopInstancesOutcomeCallable stopInstancesCallable(const Model::StopInstancesRequest& request) const; + TagResourcesOutcome tagResources(const Model::TagResourcesRequest &request)const; + void tagResourcesAsync(const Model::TagResourcesRequest& request, const TagResourcesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + TagResourcesOutcomeCallable tagResourcesCallable(const Model::TagResourcesRequest& request) const; + UntagResourcesOutcome untagResources(const Model::UntagResourcesRequest &request)const; + void untagResourcesAsync(const Model::UntagResourcesRequest& request, const UntagResourcesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UntagResourcesOutcomeCallable untagResourcesCallable(const Model::UntagResourcesRequest& request) const; UpdateCommandAttributeOutcome updateCommandAttribute(const Model::UpdateCommandAttributeRequest &request)const; void updateCommandAttributeAsync(const Model::UpdateCommandAttributeRequest& request, const UpdateCommandAttributeAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; UpdateCommandAttributeOutcomeCallable updateCommandAttributeCallable(const Model::UpdateCommandAttributeRequest& request) const; diff --git a/swas-open/include/alibabacloud/swas-open/model/CreateCommandRequest.h b/swas-open/include/alibabacloud/swas-open/model/CreateCommandRequest.h index 682174cbd..cb8ba389d 100644 --- a/swas-open/include/alibabacloud/swas-open/model/CreateCommandRequest.h +++ b/swas-open/include/alibabacloud/swas-open/model/CreateCommandRequest.h @@ -28,6 +28,10 @@ namespace SWAS_OPEN { namespace Model { class ALIBABACLOUD_SWAS_OPEN_EXPORT CreateCommandRequest : public RpcServiceRequest { public: + struct Tag { + std::string key; + std::string value; + }; CreateCommandRequest(); ~CreateCommandRequest(); std::string getWorkingDir() const; @@ -42,6 +46,8 @@ public: void setTimeout(long timeout); std::string getRegionId() const; void setRegionId(const std::string ®ionId); + std::vector getTag() const; + void setTag(const std::vector &tag); std::string getName() const; void setName(const std::string &name); bool getEnableParameter() const; @@ -54,6 +60,7 @@ private: std::string commandContent_; long timeout_; std::string regionId_; + std::vector tag_; std::string name_; bool enableParameter_; }; diff --git a/swas-open/include/alibabacloud/swas-open/model/CreateCustomImageRequest.h b/swas-open/include/alibabacloud/swas-open/model/CreateCustomImageRequest.h index 061736626..f7190054e 100644 --- a/swas-open/include/alibabacloud/swas-open/model/CreateCustomImageRequest.h +++ b/swas-open/include/alibabacloud/swas-open/model/CreateCustomImageRequest.h @@ -28,6 +28,10 @@ namespace SWAS_OPEN { namespace Model { class ALIBABACLOUD_SWAS_OPEN_EXPORT CreateCustomImageRequest : public RpcServiceRequest { public: + struct Tag { + std::string key; + std::string value; + }; CreateCustomImageRequest(); ~CreateCustomImageRequest(); std::string getSystemSnapshotId() const; @@ -44,6 +48,8 @@ public: void setRegionId(const std::string ®ionId); std::string getImageName() const; void setImageName(const std::string &imageName); + std::vector getTag() const; + void setTag(const std::vector &tag); std::string getInstanceId() const; void setInstanceId(const std::string &instanceId); @@ -55,6 +61,7 @@ private: std::string platform_; std::string regionId_; std::string imageName_; + std::vector tag_; std::string instanceId_; }; } // namespace Model diff --git a/swas-open/include/alibabacloud/swas-open/model/CreateFirewallRulesRequest.h b/swas-open/include/alibabacloud/swas-open/model/CreateFirewallRulesRequest.h index 20047f906..20decfbe4 100644 --- a/swas-open/include/alibabacloud/swas-open/model/CreateFirewallRulesRequest.h +++ b/swas-open/include/alibabacloud/swas-open/model/CreateFirewallRulesRequest.h @@ -34,6 +34,10 @@ public: std::string sourceCidrIp; std::string remark; }; + struct Tag { + std::string key; + std::string value; + }; CreateFirewallRulesRequest(); ~CreateFirewallRulesRequest(); std::string getClientToken() const; @@ -44,12 +48,15 @@ public: void setRegionId(const std::string ®ionId); std::vector getFirewallRules() const; void setFirewallRules(const std::vector &firewallRules); + std::vector getTag() const; + void setTag(const std::vector &tag); private: std::string clientToken_; std::string instanceId_; std::string regionId_; std::vector firewallRules_; + std::vector tag_; }; } // namespace Model } // namespace SWAS_OPEN diff --git a/swas-open/include/alibabacloud/swas-open/model/CreateFirewallRulesResult.h b/swas-open/include/alibabacloud/swas-open/model/CreateFirewallRulesResult.h index 7adc5b23f..04c25bf85 100644 --- a/swas-open/include/alibabacloud/swas-open/model/CreateFirewallRulesResult.h +++ b/swas-open/include/alibabacloud/swas-open/model/CreateFirewallRulesResult.h @@ -37,10 +37,12 @@ namespace AlibabaCloud CreateFirewallRulesResult(); explicit CreateFirewallRulesResult(const std::string &payload); ~CreateFirewallRulesResult(); + std::vector getFirewallRuleIds()const; protected: void parse(const std::string &payload); private: + std::vector firewallRuleIds_; }; } diff --git a/swas-open/include/alibabacloud/swas-open/model/CreateSnapshotRequest.h b/swas-open/include/alibabacloud/swas-open/model/CreateSnapshotRequest.h index 71f0e9249..d3a27565f 100644 --- a/swas-open/include/alibabacloud/swas-open/model/CreateSnapshotRequest.h +++ b/swas-open/include/alibabacloud/swas-open/model/CreateSnapshotRequest.h @@ -28,6 +28,10 @@ namespace SWAS_OPEN { namespace Model { class ALIBABACLOUD_SWAS_OPEN_EXPORT CreateSnapshotRequest : public RpcServiceRequest { public: + struct Tag { + std::string key; + std::string value; + }; CreateSnapshotRequest(); ~CreateSnapshotRequest(); std::string getClientToken() const; @@ -38,12 +42,15 @@ public: void setRegionId(const std::string ®ionId); std::string getDiskId() const; void setDiskId(const std::string &diskId); + std::vector getTag() const; + void setTag(const std::vector &tag); private: std::string clientToken_; std::string snapshotName_; std::string regionId_; std::string diskId_; + std::vector tag_; }; } // namespace Model } // namespace SWAS_OPEN diff --git a/swas-open/include/alibabacloud/swas-open/model/DescribeCloudAssistantAttributesRequest.h b/swas-open/include/alibabacloud/swas-open/model/DescribeCloudAssistantAttributesRequest.h new file mode 100644 index 000000000..b4aef72f4 --- /dev/null +++ b/swas-open/include/alibabacloud/swas-open/model/DescribeCloudAssistantAttributesRequest.h @@ -0,0 +1,51 @@ +/* + * 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_SWAS_OPEN_MODEL_DESCRIBECLOUDASSISTANTATTRIBUTESREQUEST_H_ +#define ALIBABACLOUD_SWAS_OPEN_MODEL_DESCRIBECLOUDASSISTANTATTRIBUTESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace SWAS_OPEN { +namespace Model { +class ALIBABACLOUD_SWAS_OPEN_EXPORT DescribeCloudAssistantAttributesRequest : public RpcServiceRequest { +public: + DescribeCloudAssistantAttributesRequest(); + ~DescribeCloudAssistantAttributesRequest(); + int getPageNumber() const; + void setPageNumber(int pageNumber); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::vector getInstanceIds() const; + void setInstanceIds(const std::vector &instanceIds); + int getPageSize() const; + void setPageSize(int pageSize); + +private: + int pageNumber_; + std::string regionId_; + std::vector instanceIds_; + int pageSize_; +}; +} // namespace Model +} // namespace SWAS_OPEN +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_DESCRIBECLOUDASSISTANTATTRIBUTESREQUEST_H_ diff --git a/swas-open/include/alibabacloud/swas-open/model/DescribeCloudAssistantAttributesResult.h b/swas-open/include/alibabacloud/swas-open/model/DescribeCloudAssistantAttributesResult.h new file mode 100644 index 000000000..b0fbf120d --- /dev/null +++ b/swas-open/include/alibabacloud/swas-open/model/DescribeCloudAssistantAttributesResult.h @@ -0,0 +1,69 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_SWAS_OPEN_MODEL_DESCRIBECLOUDASSISTANTATTRIBUTESRESULT_H_ +#define ALIBABACLOUD_SWAS_OPEN_MODEL_DESCRIBECLOUDASSISTANTATTRIBUTESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace SWAS_OPEN + { + namespace Model + { + class ALIBABACLOUD_SWAS_OPEN_EXPORT DescribeCloudAssistantAttributesResult : public ServiceResult + { + public: + struct Status + { + std::string cloudAssistantVersion; + bool supportSessionManager; + std::string instanceId; + long invocationCount; + std::string oSType; + std::string cloudAssistantStatus; + std::string lastHeartbeatTime; + std::string lastInvokedTime; + long activeTaskCount; + }; + + + DescribeCloudAssistantAttributesResult(); + explicit DescribeCloudAssistantAttributesResult(const std::string &payload); + ~DescribeCloudAssistantAttributesResult(); + int getTotalCount()const; + std::vector getCloudAssistant()const; + int getPageSize()const; + int getPageNumber()const; + + protected: + void parse(const std::string &payload); + private: + int totalCount_; + std::vector cloudAssistant_; + int pageSize_; + int pageNumber_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_DESCRIBECLOUDASSISTANTATTRIBUTESRESULT_H_ \ No newline at end of file diff --git a/swas-open/include/alibabacloud/swas-open/model/DescribeCommandsRequest.h b/swas-open/include/alibabacloud/swas-open/model/DescribeCommandsRequest.h index ebb238aed..d408db6f5 100644 --- a/swas-open/include/alibabacloud/swas-open/model/DescribeCommandsRequest.h +++ b/swas-open/include/alibabacloud/swas-open/model/DescribeCommandsRequest.h @@ -28,6 +28,10 @@ namespace SWAS_OPEN { namespace Model { class ALIBABACLOUD_SWAS_OPEN_EXPORT DescribeCommandsRequest : public RpcServiceRequest { public: + struct Tag { + std::string key; + std::string value; + }; DescribeCommandsRequest(); ~DescribeCommandsRequest(); std::string getType() const; @@ -40,10 +44,12 @@ public: void setRegionId(const std::string ®ionId); std::string getProvider() const; void setProvider(const std::string &provider); - std::string getName() const; - void setName(const std::string &name); std::string getPageSize() const; void setPageSize(const std::string &pageSize); + std::vector getTag() const; + void setTag(const std::vector &tag); + std::string getName() const; + void setName(const std::string &name); private: std::string type_; @@ -51,8 +57,9 @@ private: std::string pageNumber_; std::string regionId_; std::string provider_; - std::string name_; std::string pageSize_; + std::vector tag_; + std::string name_; }; } // namespace Model } // namespace SWAS_OPEN diff --git a/swas-open/include/alibabacloud/swas-open/model/DescribeCommandsResult.h b/swas-open/include/alibabacloud/swas-open/model/DescribeCommandsResult.h index 240545a6d..cbae7e156 100644 --- a/swas-open/include/alibabacloud/swas-open/model/DescribeCommandsResult.h +++ b/swas-open/include/alibabacloud/swas-open/model/DescribeCommandsResult.h @@ -34,6 +34,11 @@ namespace AlibabaCloud public: struct Command { + struct Tag + { + std::string value; + std::string key; + }; struct ParameterDefinition { std::string defaultValue; @@ -42,18 +47,19 @@ namespace AlibabaCloud std::string parameterName; std::vector possibleValues; }; - std::string workingDir; - std::string commandContent; std::vector parameterDefinitions; - std::string type; std::string description; std::vector parameterNames; long timeout; + std::string name; + std::string provider; + std::string workingDir; + std::string commandContent; + std::string type; std::string creationTime; bool enableParameter; std::string commandId; - std::string name; - std::string provider; + std::vector tags; }; diff --git a/swas-open/include/alibabacloud/swas-open/model/ListCustomImagesRequest.h b/swas-open/include/alibabacloud/swas-open/model/ListCustomImagesRequest.h index 16d6680a6..00129015d 100644 --- a/swas-open/include/alibabacloud/swas-open/model/ListCustomImagesRequest.h +++ b/swas-open/include/alibabacloud/swas-open/model/ListCustomImagesRequest.h @@ -28,6 +28,10 @@ namespace SWAS_OPEN { namespace Model { class ALIBABACLOUD_SWAS_OPEN_EXPORT ListCustomImagesRequest : public RpcServiceRequest { public: + struct Tag { + std::string key; + std::string value; + }; ListCustomImagesRequest(); ~ListCustomImagesRequest(); std::string getSystemSnapshotId() const; @@ -40,10 +44,14 @@ public: void setImageNames(const std::string &imageNames); int getPageNumber() const; void setPageNumber(int pageNumber); + std::string getResourceGroupId() const; + void setResourceGroupId(const std::string &resourceGroupId); std::string getRegionId() const; void setRegionId(const std::string ®ionId); int getPageSize() const; void setPageSize(int pageSize); + std::vector getTag() const; + void setTag(const std::vector &tag); std::string getImageIds() const; void setImageIds(const std::string &imageIds); @@ -53,8 +61,10 @@ private: std::string clientToken_; std::string imageNames_; int pageNumber_; + std::string resourceGroupId_; std::string regionId_; int pageSize_; + std::vector tag_; std::string imageIds_; }; } // namespace Model diff --git a/swas-open/include/alibabacloud/swas-open/model/ListCustomImagesResult.h b/swas-open/include/alibabacloud/swas-open/model/ListCustomImagesResult.h index 0a5e4d827..2f6fa5156 100644 --- a/swas-open/include/alibabacloud/swas-open/model/ListCustomImagesResult.h +++ b/swas-open/include/alibabacloud/swas-open/model/ListCustomImagesResult.h @@ -34,9 +34,15 @@ namespace AlibabaCloud public: struct CustomImage { + struct Tag + { + std::string value; + std::string key; + }; std::string status; std::string description; bool inShare; + std::string resourceGroupId; std::string instanceId; std::string systemSnapshotId; std::string systemSnapshotName; @@ -47,6 +53,7 @@ namespace AlibabaCloud std::string creationTime; std::string imageId; std::string regionId; + std::vector tags; }; diff --git a/swas-open/include/alibabacloud/swas-open/model/ListDisksRequest.h b/swas-open/include/alibabacloud/swas-open/model/ListDisksRequest.h index a82aa762a..e47a19354 100644 --- a/swas-open/include/alibabacloud/swas-open/model/ListDisksRequest.h +++ b/swas-open/include/alibabacloud/swas-open/model/ListDisksRequest.h @@ -28,6 +28,10 @@ namespace SWAS_OPEN { namespace Model { class ALIBABACLOUD_SWAS_OPEN_EXPORT ListDisksRequest : public RpcServiceRequest { public: + struct Tag { + std::string key; + std::string value; + }; ListDisksRequest(); ~ListDisksRequest(); std::string getDiskType() const; @@ -42,6 +46,8 @@ public: void setPageSize(int pageSize); std::string getDiskIds() const; void setDiskIds(const std::string &diskIds); + std::vector getTag() const; + void setTag(const std::vector &tag); private: std::string diskType_; @@ -50,6 +56,7 @@ private: std::string regionId_; int pageSize_; std::string diskIds_; + std::vector tag_; }; } // namespace Model } // namespace SWAS_OPEN diff --git a/swas-open/include/alibabacloud/swas-open/model/ListDisksResult.h b/swas-open/include/alibabacloud/swas-open/model/ListDisksResult.h index 895c86f06..4e769a8e9 100644 --- a/swas-open/include/alibabacloud/swas-open/model/ListDisksResult.h +++ b/swas-open/include/alibabacloud/swas-open/model/ListDisksResult.h @@ -34,6 +34,11 @@ namespace AlibabaCloud public: struct Disk { + struct Tag + { + std::string value; + std::string key; + }; std::string status; std::string category; std::string instanceId; @@ -46,6 +51,7 @@ namespace AlibabaCloud std::string instanceName; std::string creationTime; std::string regionId; + std::vector tags; std::string diskId; }; diff --git a/swas-open/include/alibabacloud/swas-open/model/ListFirewallRulesRequest.h b/swas-open/include/alibabacloud/swas-open/model/ListFirewallRulesRequest.h index e720a2aab..a1f79638c 100644 --- a/swas-open/include/alibabacloud/swas-open/model/ListFirewallRulesRequest.h +++ b/swas-open/include/alibabacloud/swas-open/model/ListFirewallRulesRequest.h @@ -28,6 +28,10 @@ namespace SWAS_OPEN { namespace Model { class ALIBABACLOUD_SWAS_OPEN_EXPORT ListFirewallRulesRequest : public RpcServiceRequest { public: + struct Tag { + std::string key; + std::string value; + }; ListFirewallRulesRequest(); ~ListFirewallRulesRequest(); int getPageNumber() const; @@ -38,12 +42,18 @@ public: void setRegionId(const std::string ®ionId); int getPageSize() const; void setPageSize(int pageSize); + std::string getFirewallRuleId() const; + void setFirewallRuleId(const std::string &firewallRuleId); + std::vector getTag() const; + void setTag(const std::vector &tag); private: int pageNumber_; std::string instanceId_; std::string regionId_; int pageSize_; + std::string firewallRuleId_; + std::vector tag_; }; } // namespace Model } // namespace SWAS_OPEN diff --git a/swas-open/include/alibabacloud/swas-open/model/ListFirewallRulesResult.h b/swas-open/include/alibabacloud/swas-open/model/ListFirewallRulesResult.h index 3b5bb25c9..e06932301 100644 --- a/swas-open/include/alibabacloud/swas-open/model/ListFirewallRulesResult.h +++ b/swas-open/include/alibabacloud/swas-open/model/ListFirewallRulesResult.h @@ -34,11 +34,17 @@ namespace AlibabaCloud public: struct FirewallRule { + struct Tag + { + std::string value; + std::string key; + }; std::string policy; std::string port; std::string ruleId; std::string sourceCidrIp; std::string ruleProtocol; + std::vector tags; std::string remark; }; diff --git a/swas-open/include/alibabacloud/swas-open/model/ListInstancesRequest.h b/swas-open/include/alibabacloud/swas-open/model/ListInstancesRequest.h index 224b45c5c..508f13a16 100644 --- a/swas-open/include/alibabacloud/swas-open/model/ListInstancesRequest.h +++ b/swas-open/include/alibabacloud/swas-open/model/ListInstancesRequest.h @@ -28,18 +28,24 @@ namespace SWAS_OPEN { namespace Model { class ALIBABACLOUD_SWAS_OPEN_EXPORT ListInstancesRequest : public RpcServiceRequest { public: + struct Tag { + std::string key; + std::string value; + }; ListInstancesRequest(); ~ListInstancesRequest(); int getPageNumber() const; void setPageNumber(int pageNumber); std::string getRegionId() const; void setRegionId(const std::string ®ionId); - std::string getInstanceIds() const; - void setInstanceIds(const std::string &instanceIds); int getPageSize() const; void setPageSize(int pageSize); std::string getPublicIpAddresses() const; void setPublicIpAddresses(const std::string &publicIpAddresses); + std::vector getTag() const; + void setTag(const std::vector &tag); + std::string getInstanceIds() const; + void setInstanceIds(const std::string &instanceIds); std::string getChargeType() const; void setChargeType(const std::string &chargeType); std::string getStatus() const; @@ -48,9 +54,10 @@ public: private: int pageNumber_; std::string regionId_; - std::string instanceIds_; int pageSize_; std::string publicIpAddresses_; + std::vector tag_; + std::string instanceIds_; std::string chargeType_; std::string status_; }; diff --git a/swas-open/include/alibabacloud/swas-open/model/ListInstancesResult.h b/swas-open/include/alibabacloud/swas-open/model/ListInstancesResult.h index aea2cc084..f37e625be 100644 --- a/swas-open/include/alibabacloud/swas-open/model/ListInstancesResult.h +++ b/swas-open/include/alibabacloud/swas-open/model/ListInstancesResult.h @@ -52,6 +52,31 @@ namespace AlibabaCloud std::string imageContact; std::string imageType; }; + struct Tag + { + std::string value; + std::string key; + }; + struct Disk + { + struct Tag1 + { + std::string value; + std::string key; + }; + std::string status; + std::string diskType; + std::vector diskTags; + std::string category; + std::string device; + int size; + std::string creationTime; + std::string diskChargeType; + std::string regionId; + std::string diskName; + std::string diskId; + std::string remark; + }; std::string status; std::string disableReason; std::string instanceId; @@ -70,7 +95,9 @@ namespace AlibabaCloud std::string expiredTime; std::string creationTime; std::string imageId; + std::vector disks; std::string regionId; + std::vector tags; }; diff --git a/swas-open/include/alibabacloud/swas-open/model/ListRegionsRequest.h b/swas-open/include/alibabacloud/swas-open/model/ListRegionsRequest.h index fcbb9bb06..d097bb614 100644 --- a/swas-open/include/alibabacloud/swas-open/model/ListRegionsRequest.h +++ b/swas-open/include/alibabacloud/swas-open/model/ListRegionsRequest.h @@ -30,8 +30,11 @@ class ALIBABACLOUD_SWAS_OPEN_EXPORT ListRegionsRequest : public RpcServiceReques public: ListRegionsRequest(); ~ListRegionsRequest(); + std::string getAcceptLanguage() const; + void setAcceptLanguage(const std::string &acceptLanguage); private: + std::string acceptLanguage_; }; } // namespace Model } // namespace SWAS_OPEN diff --git a/swas-open/include/alibabacloud/swas-open/model/ListSnapshotsRequest.h b/swas-open/include/alibabacloud/swas-open/model/ListSnapshotsRequest.h index e5af84d3d..a45b45dda 100644 --- a/swas-open/include/alibabacloud/swas-open/model/ListSnapshotsRequest.h +++ b/swas-open/include/alibabacloud/swas-open/model/ListSnapshotsRequest.h @@ -28,31 +28,38 @@ namespace SWAS_OPEN { namespace Model { class ALIBABACLOUD_SWAS_OPEN_EXPORT ListSnapshotsRequest : public RpcServiceRequest { public: + struct Tag { + std::string key; + std::string value; + }; ListSnapshotsRequest(); ~ListSnapshotsRequest(); std::string getSnapshotIds() const; void setSnapshotIds(const std::string &snapshotIds); - std::string getSourceDiskType() const; - void setSourceDiskType(const std::string &sourceDiskType); int getPageNumber() const; void setPageNumber(int pageNumber); - std::string getInstanceId() const; - void setInstanceId(const std::string &instanceId); std::string getRegionId() const; void setRegionId(const std::string ®ionId); int getPageSize() const; void setPageSize(int pageSize); std::string getDiskId() const; void setDiskId(const std::string &diskId); + std::vector getTag() const; + void setTag(const std::vector &tag); + std::string getSourceDiskType() const; + void setSourceDiskType(const std::string &sourceDiskType); + std::string getInstanceId() const; + void setInstanceId(const std::string &instanceId); private: std::string snapshotIds_; - std::string sourceDiskType_; int pageNumber_; - std::string instanceId_; std::string regionId_; int pageSize_; std::string diskId_; + std::vector tag_; + std::string sourceDiskType_; + std::string instanceId_; }; } // namespace Model } // namespace SWAS_OPEN diff --git a/swas-open/include/alibabacloud/swas-open/model/ListSnapshotsResult.h b/swas-open/include/alibabacloud/swas-open/model/ListSnapshotsResult.h index eca17aac7..d46a2aa29 100644 --- a/swas-open/include/alibabacloud/swas-open/model/ListSnapshotsResult.h +++ b/swas-open/include/alibabacloud/swas-open/model/ListSnapshotsResult.h @@ -34,6 +34,11 @@ namespace AlibabaCloud public: struct Snapshot { + struct Tag + { + std::string value; + std::string key; + }; std::string status; std::string snapshotId; std::string progress; @@ -43,6 +48,7 @@ namespace AlibabaCloud std::string regionId; std::string sourceDiskType; std::string snapshotName; + std::vector tags; std::string sourceDiskId; std::string remark; }; diff --git a/swas-open/include/alibabacloud/swas-open/model/ListTagResourcesRequest.h b/swas-open/include/alibabacloud/swas-open/model/ListTagResourcesRequest.h new file mode 100644 index 000000000..94a175577 --- /dev/null +++ b/swas-open/include/alibabacloud/swas-open/model/ListTagResourcesRequest.h @@ -0,0 +1,61 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_SWAS_OPEN_MODEL_LISTTAGRESOURCESREQUEST_H_ +#define ALIBABACLOUD_SWAS_OPEN_MODEL_LISTTAGRESOURCESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace SWAS_OPEN { +namespace Model { +class ALIBABACLOUD_SWAS_OPEN_EXPORT ListTagResourcesRequest : public RpcServiceRequest { +public: + struct Tag { + std::string key; + std::string value; + }; + ListTagResourcesRequest(); + ~ListTagResourcesRequest(); + std::vector getResourceId() const; + void setResourceId(const std::vector &resourceId); + std::string getClientToken() const; + void setClientToken(const std::string &clientToken); + std::string getResourceType() const; + void setResourceType(const std::string &resourceType); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::string getNextToken() const; + void setNextToken(const std::string &nextToken); + std::vector getTag() const; + void setTag(const std::vector &tag); + +private: + std::vector resourceId_; + std::string clientToken_; + std::string resourceType_; + std::string regionId_; + std::string nextToken_; + std::vector tag_; +}; +} // namespace Model +} // namespace SWAS_OPEN +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_LISTTAGRESOURCESREQUEST_H_ diff --git a/swas-open/include/alibabacloud/swas-open/model/ListTagResourcesResult.h b/swas-open/include/alibabacloud/swas-open/model/ListTagResourcesResult.h new file mode 100644 index 000000000..1eeacf39c --- /dev/null +++ b/swas-open/include/alibabacloud/swas-open/model/ListTagResourcesResult.h @@ -0,0 +1,60 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_SWAS_OPEN_MODEL_LISTTAGRESOURCESRESULT_H_ +#define ALIBABACLOUD_SWAS_OPEN_MODEL_LISTTAGRESOURCESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace SWAS_OPEN + { + namespace Model + { + class ALIBABACLOUD_SWAS_OPEN_EXPORT ListTagResourcesResult : public ServiceResult + { + public: + struct TagResource + { + std::string resourceId; + std::string tagKey; + std::string resourceType; + std::string tagValue; + }; + + + ListTagResourcesResult(); + explicit ListTagResourcesResult(const std::string &payload); + ~ListTagResourcesResult(); + std::string getNextToken()const; + std::vector getTagResources()const; + + protected: + void parse(const std::string &payload); + private: + std::string nextToken_; + std::vector tagResources_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_LISTTAGRESOURCESRESULT_H_ \ No newline at end of file diff --git a/swas-open/include/alibabacloud/swas-open/model/TagResourcesRequest.h b/swas-open/include/alibabacloud/swas-open/model/TagResourcesRequest.h new file mode 100644 index 000000000..2767890ed --- /dev/null +++ b/swas-open/include/alibabacloud/swas-open/model/TagResourcesRequest.h @@ -0,0 +1,58 @@ +/* + * 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_SWAS_OPEN_MODEL_TAGRESOURCESREQUEST_H_ +#define ALIBABACLOUD_SWAS_OPEN_MODEL_TAGRESOURCESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace SWAS_OPEN { +namespace Model { +class ALIBABACLOUD_SWAS_OPEN_EXPORT TagResourcesRequest : public RpcServiceRequest { +public: + struct Tag { + std::string key; + std::string value; + }; + TagResourcesRequest(); + ~TagResourcesRequest(); + std::vector getResourceId() const; + void setResourceId(const std::vector &resourceId); + std::string getClientToken() const; + void setClientToken(const std::string &clientToken); + std::string getResourceType() const; + void setResourceType(const std::string &resourceType); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::vector getTag() const; + void setTag(const std::vector &tag); + +private: + std::vector resourceId_; + std::string clientToken_; + std::string resourceType_; + std::string regionId_; + std::vector tag_; +}; +} // namespace Model +} // namespace SWAS_OPEN +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_TAGRESOURCESREQUEST_H_ diff --git a/swas-open/include/alibabacloud/swas-open/model/TagResourcesResult.h b/swas-open/include/alibabacloud/swas-open/model/TagResourcesResult.h new file mode 100644 index 000000000..2f0c6e25c --- /dev/null +++ b/swas-open/include/alibabacloud/swas-open/model/TagResourcesResult.h @@ -0,0 +1,49 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_SWAS_OPEN_MODEL_TAGRESOURCESRESULT_H_ +#define ALIBABACLOUD_SWAS_OPEN_MODEL_TAGRESOURCESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace SWAS_OPEN + { + namespace Model + { + class ALIBABACLOUD_SWAS_OPEN_EXPORT TagResourcesResult : public ServiceResult + { + public: + + + TagResourcesResult(); + explicit TagResourcesResult(const std::string &payload); + ~TagResourcesResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_TAGRESOURCESRESULT_H_ \ No newline at end of file diff --git a/swas-open/include/alibabacloud/swas-open/model/UntagResourcesRequest.h b/swas-open/include/alibabacloud/swas-open/model/UntagResourcesRequest.h new file mode 100644 index 000000000..2b453f9cf --- /dev/null +++ b/swas-open/include/alibabacloud/swas-open/model/UntagResourcesRequest.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_SWAS_OPEN_MODEL_UNTAGRESOURCESREQUEST_H_ +#define ALIBABACLOUD_SWAS_OPEN_MODEL_UNTAGRESOURCESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace SWAS_OPEN { +namespace Model { +class ALIBABACLOUD_SWAS_OPEN_EXPORT UntagResourcesRequest : public RpcServiceRequest { +public: + UntagResourcesRequest(); + ~UntagResourcesRequest(); + bool getAll() const; + void setAll(bool all); + std::vector getResourceId() const; + void setResourceId(const std::vector &resourceId); + std::string getClientToken() const; + void setClientToken(const std::string &clientToken); + std::string getResourceType() const; + void setResourceType(const std::string &resourceType); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::vector getTagKey() const; + void setTagKey(const std::vector &tagKey); + +private: + bool all_; + std::vector resourceId_; + std::string clientToken_; + std::string resourceType_; + std::string regionId_; + std::vector tagKey_; +}; +} // namespace Model +} // namespace SWAS_OPEN +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_UNTAGRESOURCESREQUEST_H_ diff --git a/swas-open/include/alibabacloud/swas-open/model/UntagResourcesResult.h b/swas-open/include/alibabacloud/swas-open/model/UntagResourcesResult.h new file mode 100644 index 000000000..b01075cd2 --- /dev/null +++ b/swas-open/include/alibabacloud/swas-open/model/UntagResourcesResult.h @@ -0,0 +1,49 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_SWAS_OPEN_MODEL_UNTAGRESOURCESRESULT_H_ +#define ALIBABACLOUD_SWAS_OPEN_MODEL_UNTAGRESOURCESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace SWAS_OPEN + { + namespace Model + { + class ALIBABACLOUD_SWAS_OPEN_EXPORT UntagResourcesResult : public ServiceResult + { + public: + + + UntagResourcesResult(); + explicit UntagResourcesResult(const std::string &payload); + ~UntagResourcesResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_UNTAGRESOURCESRESULT_H_ \ No newline at end of file diff --git a/swas-open/src/SWAS-OPENClient.cc b/swas-open/src/SWAS-OPENClient.cc index 82844a798..55f93f271 100644 --- a/swas-open/src/SWAS-OPENClient.cc +++ b/swas-open/src/SWAS-OPENClient.cc @@ -555,6 +555,42 @@ SWAS_OPENClient::DeleteSnapshotsOutcomeCallable SWAS_OPENClient::deleteSnapshots return task->get_future(); } +SWAS_OPENClient::DescribeCloudAssistantAttributesOutcome SWAS_OPENClient::describeCloudAssistantAttributes(const DescribeCloudAssistantAttributesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeCloudAssistantAttributesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeCloudAssistantAttributesOutcome(DescribeCloudAssistantAttributesResult(outcome.result())); + else + return DescribeCloudAssistantAttributesOutcome(outcome.error()); +} + +void SWAS_OPENClient::describeCloudAssistantAttributesAsync(const DescribeCloudAssistantAttributesRequest& request, const DescribeCloudAssistantAttributesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeCloudAssistantAttributes(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +SWAS_OPENClient::DescribeCloudAssistantAttributesOutcomeCallable SWAS_OPENClient::describeCloudAssistantAttributesCallable(const DescribeCloudAssistantAttributesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeCloudAssistantAttributes(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + SWAS_OPENClient::DescribeCloudAssistantStatusOutcome SWAS_OPENClient::describeCloudAssistantStatus(const DescribeCloudAssistantStatusRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -1707,6 +1743,42 @@ SWAS_OPENClient::ListSnapshotsOutcomeCallable SWAS_OPENClient::listSnapshotsCall return task->get_future(); } +SWAS_OPENClient::ListTagResourcesOutcome SWAS_OPENClient::listTagResources(const ListTagResourcesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListTagResourcesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListTagResourcesOutcome(ListTagResourcesResult(outcome.result())); + else + return ListTagResourcesOutcome(outcome.error()); +} + +void SWAS_OPENClient::listTagResourcesAsync(const ListTagResourcesRequest& request, const ListTagResourcesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listTagResources(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +SWAS_OPENClient::ListTagResourcesOutcomeCallable SWAS_OPENClient::listTagResourcesCallable(const ListTagResourcesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listTagResources(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + SWAS_OPENClient::LoginInstanceOutcome SWAS_OPENClient::loginInstance(const LoginInstanceRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -2499,6 +2571,78 @@ SWAS_OPENClient::StopInstancesOutcomeCallable SWAS_OPENClient::stopInstancesCall return task->get_future(); } +SWAS_OPENClient::TagResourcesOutcome SWAS_OPENClient::tagResources(const TagResourcesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return TagResourcesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return TagResourcesOutcome(TagResourcesResult(outcome.result())); + else + return TagResourcesOutcome(outcome.error()); +} + +void SWAS_OPENClient::tagResourcesAsync(const TagResourcesRequest& request, const TagResourcesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, tagResources(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +SWAS_OPENClient::TagResourcesOutcomeCallable SWAS_OPENClient::tagResourcesCallable(const TagResourcesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->tagResources(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +SWAS_OPENClient::UntagResourcesOutcome SWAS_OPENClient::untagResources(const UntagResourcesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UntagResourcesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UntagResourcesOutcome(UntagResourcesResult(outcome.result())); + else + return UntagResourcesOutcome(outcome.error()); +} + +void SWAS_OPENClient::untagResourcesAsync(const UntagResourcesRequest& request, const UntagResourcesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, untagResources(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +SWAS_OPENClient::UntagResourcesOutcomeCallable SWAS_OPENClient::untagResourcesCallable(const UntagResourcesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->untagResources(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + SWAS_OPENClient::UpdateCommandAttributeOutcome SWAS_OPENClient::updateCommandAttribute(const UpdateCommandAttributeRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/swas-open/src/model/CreateCommandRequest.cc b/swas-open/src/model/CreateCommandRequest.cc index 6b2c4c6b3..c326be4f1 100644 --- a/swas-open/src/model/CreateCommandRequest.cc +++ b/swas-open/src/model/CreateCommandRequest.cc @@ -79,6 +79,20 @@ void CreateCommandRequest::setRegionId(const std::string ®ionId) { setParameter(std::string("RegionId"), regionId); } +std::vector CreateCommandRequest::getTag() const { + return tag_; +} + +void CreateCommandRequest::setTag(const std::vector &tag) { + tag_ = tag; + for(int dep1 = 0; dep1 != tag.size(); dep1++) { + auto tagObj = tag.at(dep1); + std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1); + setParameter(tagObjStr + ".Key", tagObj.key); + setParameter(tagObjStr + ".Value", tagObj.value); + } +} + std::string CreateCommandRequest::getName() const { return name_; } diff --git a/swas-open/src/model/CreateCustomImageRequest.cc b/swas-open/src/model/CreateCustomImageRequest.cc index 4d27ff963..d5e7e2fdd 100644 --- a/swas-open/src/model/CreateCustomImageRequest.cc +++ b/swas-open/src/model/CreateCustomImageRequest.cc @@ -88,6 +88,20 @@ void CreateCustomImageRequest::setImageName(const std::string &imageName) { setParameter(std::string("ImageName"), imageName); } +std::vector CreateCustomImageRequest::getTag() const { + return tag_; +} + +void CreateCustomImageRequest::setTag(const std::vector &tag) { + tag_ = tag; + for(int dep1 = 0; dep1 != tag.size(); dep1++) { + auto tagObj = tag.at(dep1); + std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1); + setParameter(tagObjStr + ".Key", tagObj.key); + setParameter(tagObjStr + ".Value", tagObj.value); + } +} + std::string CreateCustomImageRequest::getInstanceId() const { return instanceId_; } diff --git a/swas-open/src/model/CreateFirewallRulesRequest.cc b/swas-open/src/model/CreateFirewallRulesRequest.cc index f525e1115..bffd4bee4 100644 --- a/swas-open/src/model/CreateFirewallRulesRequest.cc +++ b/swas-open/src/model/CreateFirewallRulesRequest.cc @@ -66,3 +66,17 @@ void CreateFirewallRulesRequest::setFirewallRules(const std::vector CreateFirewallRulesRequest::getTag() const { + return tag_; +} + +void CreateFirewallRulesRequest::setTag(const std::vector &tag) { + tag_ = tag; + for(int dep1 = 0; dep1 != tag.size(); dep1++) { + auto tagObj = tag.at(dep1); + std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1); + setParameter(tagObjStr + ".Key", tagObj.key); + setParameter(tagObjStr + ".Value", tagObj.value); + } +} + diff --git a/swas-open/src/model/CreateFirewallRulesResult.cc b/swas-open/src/model/CreateFirewallRulesResult.cc index 918235287..26c52e0d6 100644 --- a/swas-open/src/model/CreateFirewallRulesResult.cc +++ b/swas-open/src/model/CreateFirewallRulesResult.cc @@ -39,6 +39,14 @@ void CreateFirewallRulesResult::parse(const std::string &payload) Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); + auto allFirewallRuleIds = value["FirewallRuleIds"]["FirewallRuleIds"]; + for (const auto &item : allFirewallRuleIds) + firewallRuleIds_.push_back(item.asString()); } +std::vector CreateFirewallRulesResult::getFirewallRuleIds()const +{ + return firewallRuleIds_; +} + diff --git a/swas-open/src/model/CreateSnapshotRequest.cc b/swas-open/src/model/CreateSnapshotRequest.cc index c93eae901..d6e57f4a3 100644 --- a/swas-open/src/model/CreateSnapshotRequest.cc +++ b/swas-open/src/model/CreateSnapshotRequest.cc @@ -61,3 +61,17 @@ void CreateSnapshotRequest::setDiskId(const std::string &diskId) { setParameter(std::string("DiskId"), diskId); } +std::vector CreateSnapshotRequest::getTag() const { + return tag_; +} + +void CreateSnapshotRequest::setTag(const std::vector &tag) { + tag_ = tag; + for(int dep1 = 0; dep1 != tag.size(); dep1++) { + auto tagObj = tag.at(dep1); + std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1); + setParameter(tagObjStr + ".Key", tagObj.key); + setParameter(tagObjStr + ".Value", tagObj.value); + } +} + diff --git a/swas-open/src/model/DescribeCloudAssistantAttributesRequest.cc b/swas-open/src/model/DescribeCloudAssistantAttributesRequest.cc new file mode 100644 index 000000000..6bd572f4f --- /dev/null +++ b/swas-open/src/model/DescribeCloudAssistantAttributesRequest.cc @@ -0,0 +1,65 @@ +/* + * 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::SWAS_OPEN::Model::DescribeCloudAssistantAttributesRequest; + +DescribeCloudAssistantAttributesRequest::DescribeCloudAssistantAttributesRequest() + : RpcServiceRequest("swas-open", "2020-06-01", "DescribeCloudAssistantAttributes") { + setMethod(HttpRequest::Method::Post); +} + +DescribeCloudAssistantAttributesRequest::~DescribeCloudAssistantAttributesRequest() {} + +int DescribeCloudAssistantAttributesRequest::getPageNumber() const { + return pageNumber_; +} + +void DescribeCloudAssistantAttributesRequest::setPageNumber(int pageNumber) { + pageNumber_ = pageNumber; + setParameter(std::string("PageNumber"), std::to_string(pageNumber)); +} + +std::string DescribeCloudAssistantAttributesRequest::getRegionId() const { + return regionId_; +} + +void DescribeCloudAssistantAttributesRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + +std::vector DescribeCloudAssistantAttributesRequest::getInstanceIds() const { + return instanceIds_; +} + +void DescribeCloudAssistantAttributesRequest::setInstanceIds(const std::vector &instanceIds) { + instanceIds_ = instanceIds; + for(int dep1 = 0; dep1 != instanceIds.size(); dep1++) { + setParameter(std::string("InstanceIds") + "." + std::to_string(dep1 + 1), instanceIds[dep1]); + } +} + +int DescribeCloudAssistantAttributesRequest::getPageSize() const { + return pageSize_; +} + +void DescribeCloudAssistantAttributesRequest::setPageSize(int pageSize) { + pageSize_ = pageSize; + setParameter(std::string("PageSize"), std::to_string(pageSize)); +} + diff --git a/swas-open/src/model/DescribeCloudAssistantAttributesResult.cc b/swas-open/src/model/DescribeCloudAssistantAttributesResult.cc new file mode 100644 index 000000000..e5b2aa2b5 --- /dev/null +++ b/swas-open/src/model/DescribeCloudAssistantAttributesResult.cc @@ -0,0 +1,94 @@ +/* + * 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::SWAS_OPEN; +using namespace AlibabaCloud::SWAS_OPEN::Model; + +DescribeCloudAssistantAttributesResult::DescribeCloudAssistantAttributesResult() : + ServiceResult() +{} + +DescribeCloudAssistantAttributesResult::DescribeCloudAssistantAttributesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeCloudAssistantAttributesResult::~DescribeCloudAssistantAttributesResult() +{} + +void DescribeCloudAssistantAttributesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allCloudAssistantNode = value["CloudAssistant"]["status"]; + for (auto valueCloudAssistantstatus : allCloudAssistantNode) + { + Status cloudAssistantObject; + if(!valueCloudAssistantstatus["InstanceId"].isNull()) + cloudAssistantObject.instanceId = valueCloudAssistantstatus["InstanceId"].asString(); + if(!valueCloudAssistantstatus["CloudAssistantStatus"].isNull()) + cloudAssistantObject.cloudAssistantStatus = valueCloudAssistantstatus["CloudAssistantStatus"].asString(); + if(!valueCloudAssistantstatus["LastInvokedTime"].isNull()) + cloudAssistantObject.lastInvokedTime = valueCloudAssistantstatus["LastInvokedTime"].asString(); + if(!valueCloudAssistantstatus["CloudAssistantVersion"].isNull()) + cloudAssistantObject.cloudAssistantVersion = valueCloudAssistantstatus["CloudAssistantVersion"].asString(); + if(!valueCloudAssistantstatus["ActiveTaskCount"].isNull()) + cloudAssistantObject.activeTaskCount = std::stol(valueCloudAssistantstatus["ActiveTaskCount"].asString()); + if(!valueCloudAssistantstatus["InvocationCount"].isNull()) + cloudAssistantObject.invocationCount = std::stol(valueCloudAssistantstatus["InvocationCount"].asString()); + if(!valueCloudAssistantstatus["LastHeartbeatTime"].isNull()) + cloudAssistantObject.lastHeartbeatTime = valueCloudAssistantstatus["LastHeartbeatTime"].asString(); + if(!valueCloudAssistantstatus["OSType"].isNull()) + cloudAssistantObject.oSType = valueCloudAssistantstatus["OSType"].asString(); + if(!valueCloudAssistantstatus["SupportSessionManager"].isNull()) + cloudAssistantObject.supportSessionManager = valueCloudAssistantstatus["SupportSessionManager"].asString() == "true"; + cloudAssistant_.push_back(cloudAssistantObject); + } + if(!value["TotalCount"].isNull()) + totalCount_ = std::stoi(value["TotalCount"].asString()); + if(!value["PageSize"].isNull()) + pageSize_ = std::stoi(value["PageSize"].asString()); + if(!value["PageNumber"].isNull()) + pageNumber_ = std::stoi(value["PageNumber"].asString()); + +} + +int DescribeCloudAssistantAttributesResult::getTotalCount()const +{ + return totalCount_; +} + +std::vector DescribeCloudAssistantAttributesResult::getCloudAssistant()const +{ + return cloudAssistant_; +} + +int DescribeCloudAssistantAttributesResult::getPageSize()const +{ + return pageSize_; +} + +int DescribeCloudAssistantAttributesResult::getPageNumber()const +{ + return pageNumber_; +} + diff --git a/swas-open/src/model/DescribeCommandsRequest.cc b/swas-open/src/model/DescribeCommandsRequest.cc index 24b71e4eb..e7ecd4991 100644 --- a/swas-open/src/model/DescribeCommandsRequest.cc +++ b/swas-open/src/model/DescribeCommandsRequest.cc @@ -70,15 +70,6 @@ void DescribeCommandsRequest::setProvider(const std::string &provider) { setParameter(std::string("Provider"), provider); } -std::string DescribeCommandsRequest::getName() const { - return name_; -} - -void DescribeCommandsRequest::setName(const std::string &name) { - name_ = name; - setParameter(std::string("Name"), name); -} - std::string DescribeCommandsRequest::getPageSize() const { return pageSize_; } @@ -88,3 +79,26 @@ void DescribeCommandsRequest::setPageSize(const std::string &pageSize) { setParameter(std::string("PageSize"), pageSize); } +std::vector DescribeCommandsRequest::getTag() const { + return tag_; +} + +void DescribeCommandsRequest::setTag(const std::vector &tag) { + tag_ = tag; + for(int dep1 = 0; dep1 != tag.size(); dep1++) { + auto tagObj = tag.at(dep1); + std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1); + setParameter(tagObjStr + ".Key", tagObj.key); + setParameter(tagObjStr + ".Value", tagObj.value); + } +} + +std::string DescribeCommandsRequest::getName() const { + return name_; +} + +void DescribeCommandsRequest::setName(const std::string &name) { + name_ = name; + setParameter(std::string("Name"), name); +} + diff --git a/swas-open/src/model/DescribeCommandsResult.cc b/swas-open/src/model/DescribeCommandsResult.cc index d593c65b2..8823d76b0 100644 --- a/swas-open/src/model/DescribeCommandsResult.cc +++ b/swas-open/src/model/DescribeCommandsResult.cc @@ -63,6 +63,16 @@ void DescribeCommandsResult::parse(const std::string &payload) commandsObject.commandContent = valueCommandscommand["CommandContent"].asString(); if(!valueCommandscommand["EnableParameter"].isNull()) commandsObject.enableParameter = valueCommandscommand["EnableParameter"].asString() == "true"; + auto allTagsNode = valueCommandscommand["Tags"]["tag"]; + for (auto valueCommandscommandTagstag : allTagsNode) + { + Command::Tag tagsObject; + if(!valueCommandscommandTagstag["Key"].isNull()) + tagsObject.key = valueCommandscommandTagstag["Key"].asString(); + if(!valueCommandscommandTagstag["Value"].isNull()) + tagsObject.value = valueCommandscommandTagstag["Value"].asString(); + commandsObject.tags.push_back(tagsObject); + } auto allParameterDefinitionsNode = valueCommandscommand["ParameterDefinitions"]["parameterDefinition"]; for (auto valueCommandscommandParameterDefinitionsparameterDefinition : allParameterDefinitionsNode) { diff --git a/swas-open/src/model/ListCustomImagesRequest.cc b/swas-open/src/model/ListCustomImagesRequest.cc index cf4b5c072..12981ea18 100644 --- a/swas-open/src/model/ListCustomImagesRequest.cc +++ b/swas-open/src/model/ListCustomImagesRequest.cc @@ -70,6 +70,15 @@ void ListCustomImagesRequest::setPageNumber(int pageNumber) { setParameter(std::string("PageNumber"), std::to_string(pageNumber)); } +std::string ListCustomImagesRequest::getResourceGroupId() const { + return resourceGroupId_; +} + +void ListCustomImagesRequest::setResourceGroupId(const std::string &resourceGroupId) { + resourceGroupId_ = resourceGroupId; + setParameter(std::string("ResourceGroupId"), resourceGroupId); +} + std::string ListCustomImagesRequest::getRegionId() const { return regionId_; } @@ -88,6 +97,20 @@ void ListCustomImagesRequest::setPageSize(int pageSize) { setParameter(std::string("PageSize"), std::to_string(pageSize)); } +std::vector ListCustomImagesRequest::getTag() const { + return tag_; +} + +void ListCustomImagesRequest::setTag(const std::vector &tag) { + tag_ = tag; + for(int dep1 = 0; dep1 != tag.size(); dep1++) { + auto tagObj = tag.at(dep1); + std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1); + setParameter(tagObjStr + ".Key", tagObj.key); + setParameter(tagObjStr + ".Value", tagObj.value); + } +} + std::string ListCustomImagesRequest::getImageIds() const { return imageIds_; } diff --git a/swas-open/src/model/ListCustomImagesResult.cc b/swas-open/src/model/ListCustomImagesResult.cc index 88abff3f6..1e2ab45b3 100644 --- a/swas-open/src/model/ListCustomImagesResult.cc +++ b/swas-open/src/model/ListCustomImagesResult.cc @@ -69,6 +69,18 @@ void ListCustomImagesResult::parse(const std::string &payload) customImagesObject.status = valueCustomImagesCustomImage["Status"].asString(); if(!valueCustomImagesCustomImage["InstanceName"].isNull()) customImagesObject.instanceName = valueCustomImagesCustomImage["InstanceName"].asString(); + if(!valueCustomImagesCustomImage["ResourceGroupId"].isNull()) + customImagesObject.resourceGroupId = valueCustomImagesCustomImage["ResourceGroupId"].asString(); + auto allTagsNode = valueCustomImagesCustomImage["Tags"]["tag"]; + for (auto valueCustomImagesCustomImageTagstag : allTagsNode) + { + CustomImage::Tag tagsObject; + if(!valueCustomImagesCustomImageTagstag["Key"].isNull()) + tagsObject.key = valueCustomImagesCustomImageTagstag["Key"].asString(); + if(!valueCustomImagesCustomImageTagstag["Value"].isNull()) + tagsObject.value = valueCustomImagesCustomImageTagstag["Value"].asString(); + customImagesObject.tags.push_back(tagsObject); + } customImages_.push_back(customImagesObject); } if(!value["TotalCount"].isNull()) diff --git a/swas-open/src/model/ListDisksRequest.cc b/swas-open/src/model/ListDisksRequest.cc index 642ac4966..9c8607f16 100644 --- a/swas-open/src/model/ListDisksRequest.cc +++ b/swas-open/src/model/ListDisksRequest.cc @@ -79,3 +79,17 @@ void ListDisksRequest::setDiskIds(const std::string &diskIds) { setParameter(std::string("DiskIds"), diskIds); } +std::vector ListDisksRequest::getTag() const { + return tag_; +} + +void ListDisksRequest::setTag(const std::vector &tag) { + tag_ = tag; + for(int dep1 = 0; dep1 != tag.size(); dep1++) { + auto tagObj = tag.at(dep1); + std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1); + setParameter(tagObjStr + ".Key", tagObj.key); + setParameter(tagObjStr + ".Value", tagObj.value); + } +} + diff --git a/swas-open/src/model/ListDisksResult.cc b/swas-open/src/model/ListDisksResult.cc index b918723ba..63a052def 100644 --- a/swas-open/src/model/ListDisksResult.cc +++ b/swas-open/src/model/ListDisksResult.cc @@ -69,6 +69,16 @@ void ListDisksResult::parse(const std::string &payload) disksObject.remark = valueDisksDisk["Remark"].asString(); if(!valueDisksDisk["InstanceName"].isNull()) disksObject.instanceName = valueDisksDisk["InstanceName"].asString(); + auto allTagsNode = valueDisksDisk["Tags"]["tag"]; + for (auto valueDisksDiskTagstag : allTagsNode) + { + Disk::Tag tagsObject; + if(!valueDisksDiskTagstag["Key"].isNull()) + tagsObject.key = valueDisksDiskTagstag["Key"].asString(); + if(!valueDisksDiskTagstag["Value"].isNull()) + tagsObject.value = valueDisksDiskTagstag["Value"].asString(); + disksObject.tags.push_back(tagsObject); + } disks_.push_back(disksObject); } if(!value["TotalCount"].isNull()) diff --git a/swas-open/src/model/ListFirewallRulesRequest.cc b/swas-open/src/model/ListFirewallRulesRequest.cc index 578a8127a..bea20cd73 100644 --- a/swas-open/src/model/ListFirewallRulesRequest.cc +++ b/swas-open/src/model/ListFirewallRulesRequest.cc @@ -61,3 +61,26 @@ void ListFirewallRulesRequest::setPageSize(int pageSize) { setParameter(std::string("PageSize"), std::to_string(pageSize)); } +std::string ListFirewallRulesRequest::getFirewallRuleId() const { + return firewallRuleId_; +} + +void ListFirewallRulesRequest::setFirewallRuleId(const std::string &firewallRuleId) { + firewallRuleId_ = firewallRuleId; + setParameter(std::string("FirewallRuleId"), firewallRuleId); +} + +std::vector ListFirewallRulesRequest::getTag() const { + return tag_; +} + +void ListFirewallRulesRequest::setTag(const std::vector &tag) { + tag_ = tag; + for(int dep1 = 0; dep1 != tag.size(); dep1++) { + auto tagObj = tag.at(dep1); + std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1); + setParameter(tagObjStr + ".Key", tagObj.key); + setParameter(tagObjStr + ".Value", tagObj.value); + } +} + diff --git a/swas-open/src/model/ListFirewallRulesResult.cc b/swas-open/src/model/ListFirewallRulesResult.cc index ae8e075f6..0e4286728 100644 --- a/swas-open/src/model/ListFirewallRulesResult.cc +++ b/swas-open/src/model/ListFirewallRulesResult.cc @@ -55,6 +55,16 @@ void ListFirewallRulesResult::parse(const std::string &payload) firewallRulesObject.policy = valueFirewallRulesFirewallRule["Policy"].asString(); if(!valueFirewallRulesFirewallRule["SourceCidrIp"].isNull()) firewallRulesObject.sourceCidrIp = valueFirewallRulesFirewallRule["SourceCidrIp"].asString(); + auto allTagsNode = valueFirewallRulesFirewallRule["Tags"]["tag"]; + for (auto valueFirewallRulesFirewallRuleTagstag : allTagsNode) + { + FirewallRule::Tag tagsObject; + if(!valueFirewallRulesFirewallRuleTagstag["Key"].isNull()) + tagsObject.key = valueFirewallRulesFirewallRuleTagstag["Key"].asString(); + if(!valueFirewallRulesFirewallRuleTagstag["Value"].isNull()) + tagsObject.value = valueFirewallRulesFirewallRuleTagstag["Value"].asString(); + firewallRulesObject.tags.push_back(tagsObject); + } firewallRules_.push_back(firewallRulesObject); } if(!value["TotalCount"].isNull()) diff --git a/swas-open/src/model/ListInstancesRequest.cc b/swas-open/src/model/ListInstancesRequest.cc index 31eaff403..36234eeac 100644 --- a/swas-open/src/model/ListInstancesRequest.cc +++ b/swas-open/src/model/ListInstancesRequest.cc @@ -43,15 +43,6 @@ void ListInstancesRequest::setRegionId(const std::string ®ionId) { setParameter(std::string("RegionId"), regionId); } -std::string ListInstancesRequest::getInstanceIds() const { - return instanceIds_; -} - -void ListInstancesRequest::setInstanceIds(const std::string &instanceIds) { - instanceIds_ = instanceIds; - setParameter(std::string("InstanceIds"), instanceIds); -} - int ListInstancesRequest::getPageSize() const { return pageSize_; } @@ -70,6 +61,29 @@ void ListInstancesRequest::setPublicIpAddresses(const std::string &publicIpAddre setParameter(std::string("PublicIpAddresses"), publicIpAddresses); } +std::vector ListInstancesRequest::getTag() const { + return tag_; +} + +void ListInstancesRequest::setTag(const std::vector &tag) { + tag_ = tag; + for(int dep1 = 0; dep1 != tag.size(); dep1++) { + auto tagObj = tag.at(dep1); + std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1); + setParameter(tagObjStr + ".Key", tagObj.key); + setParameter(tagObjStr + ".Value", tagObj.value); + } +} + +std::string ListInstancesRequest::getInstanceIds() const { + return instanceIds_; +} + +void ListInstancesRequest::setInstanceIds(const std::string &instanceIds) { + instanceIds_ = instanceIds; + setParameter(std::string("InstanceIds"), instanceIds); +} + std::string ListInstancesRequest::getChargeType() const { return chargeType_; } diff --git a/swas-open/src/model/ListInstancesResult.cc b/swas-open/src/model/ListInstancesResult.cc index df0981675..5e99a0da6 100644 --- a/swas-open/src/model/ListInstancesResult.cc +++ b/swas-open/src/model/ListInstancesResult.cc @@ -77,6 +77,54 @@ void ListInstancesResult::parse(const std::string &payload) instancesObject.combinationInstanceId = valueInstancesInstance["CombinationInstanceId"].asString(); if(!valueInstancesInstance["Uuid"].isNull()) instancesObject.uuid = valueInstancesInstance["Uuid"].asString(); + auto allTagsNode = valueInstancesInstance["Tags"]["tag"]; + for (auto valueInstancesInstanceTagstag : allTagsNode) + { + Instance::Tag tagsObject; + if(!valueInstancesInstanceTagstag["Key"].isNull()) + tagsObject.key = valueInstancesInstanceTagstag["Key"].asString(); + if(!valueInstancesInstanceTagstag["Value"].isNull()) + tagsObject.value = valueInstancesInstanceTagstag["Value"].asString(); + instancesObject.tags.push_back(tagsObject); + } + auto allDisksNode = valueInstancesInstance["Disks"]["disk"]; + for (auto valueInstancesInstanceDisksdisk : allDisksNode) + { + Instance::Disk disksObject; + if(!valueInstancesInstanceDisksdisk["CreationTime"].isNull()) + disksObject.creationTime = valueInstancesInstanceDisksdisk["CreationTime"].asString(); + if(!valueInstancesInstanceDisksdisk["Status"].isNull()) + disksObject.status = valueInstancesInstanceDisksdisk["Status"].asString(); + if(!valueInstancesInstanceDisksdisk["Device"].isNull()) + disksObject.device = valueInstancesInstanceDisksdisk["Device"].asString(); + if(!valueInstancesInstanceDisksdisk["Size"].isNull()) + disksObject.size = std::stoi(valueInstancesInstanceDisksdisk["Size"].asString()); + if(!valueInstancesInstanceDisksdisk["DiskName"].isNull()) + disksObject.diskName = valueInstancesInstanceDisksdisk["DiskName"].asString(); + if(!valueInstancesInstanceDisksdisk["DiskChargeType"].isNull()) + disksObject.diskChargeType = valueInstancesInstanceDisksdisk["DiskChargeType"].asString(); + if(!valueInstancesInstanceDisksdisk["DiskType"].isNull()) + disksObject.diskType = valueInstancesInstanceDisksdisk["DiskType"].asString(); + if(!valueInstancesInstanceDisksdisk["Category"].isNull()) + disksObject.category = valueInstancesInstanceDisksdisk["Category"].asString(); + if(!valueInstancesInstanceDisksdisk["DiskId"].isNull()) + disksObject.diskId = valueInstancesInstanceDisksdisk["DiskId"].asString(); + if(!valueInstancesInstanceDisksdisk["RegionId"].isNull()) + disksObject.regionId = valueInstancesInstanceDisksdisk["RegionId"].asString(); + if(!valueInstancesInstanceDisksdisk["Remark"].isNull()) + disksObject.remark = valueInstancesInstanceDisksdisk["Remark"].asString(); + auto allDiskTagsNode = valueInstancesInstanceDisksdisk["DiskTags"]["tag"]; + for (auto valueInstancesInstanceDisksdiskDiskTagstag : allDiskTagsNode) + { + Instance::Disk::Tag1 diskTagsObject; + if(!valueInstancesInstanceDisksdiskDiskTagstag["Key"].isNull()) + diskTagsObject.key = valueInstancesInstanceDisksdiskDiskTagstag["Key"].asString(); + if(!valueInstancesInstanceDisksdiskDiskTagstag["Value"].isNull()) + diskTagsObject.value = valueInstancesInstanceDisksdiskDiskTagstag["Value"].asString(); + disksObject.diskTags.push_back(diskTagsObject); + } + instancesObject.disks.push_back(disksObject); + } auto resourceSpecNode = value["ResourceSpec"]; if(!resourceSpecNode["DiskCategory"].isNull()) instancesObject.resourceSpec.diskCategory = resourceSpecNode["DiskCategory"].asString(); diff --git a/swas-open/src/model/ListRegionsRequest.cc b/swas-open/src/model/ListRegionsRequest.cc index 586b018fa..7dbd70e3a 100644 --- a/swas-open/src/model/ListRegionsRequest.cc +++ b/swas-open/src/model/ListRegionsRequest.cc @@ -25,3 +25,12 @@ ListRegionsRequest::ListRegionsRequest() ListRegionsRequest::~ListRegionsRequest() {} +std::string ListRegionsRequest::getAcceptLanguage() const { + return acceptLanguage_; +} + +void ListRegionsRequest::setAcceptLanguage(const std::string &acceptLanguage) { + acceptLanguage_ = acceptLanguage; + setParameter(std::string("AcceptLanguage"), acceptLanguage); +} + diff --git a/swas-open/src/model/ListSnapshotsRequest.cc b/swas-open/src/model/ListSnapshotsRequest.cc index f10104d06..b1de336ff 100644 --- a/swas-open/src/model/ListSnapshotsRequest.cc +++ b/swas-open/src/model/ListSnapshotsRequest.cc @@ -34,15 +34,6 @@ void ListSnapshotsRequest::setSnapshotIds(const std::string &snapshotIds) { setParameter(std::string("SnapshotIds"), snapshotIds); } -std::string ListSnapshotsRequest::getSourceDiskType() const { - return sourceDiskType_; -} - -void ListSnapshotsRequest::setSourceDiskType(const std::string &sourceDiskType) { - sourceDiskType_ = sourceDiskType; - setParameter(std::string("SourceDiskType"), sourceDiskType); -} - int ListSnapshotsRequest::getPageNumber() const { return pageNumber_; } @@ -52,15 +43,6 @@ void ListSnapshotsRequest::setPageNumber(int pageNumber) { setParameter(std::string("PageNumber"), std::to_string(pageNumber)); } -std::string ListSnapshotsRequest::getInstanceId() const { - return instanceId_; -} - -void ListSnapshotsRequest::setInstanceId(const std::string &instanceId) { - instanceId_ = instanceId; - setParameter(std::string("InstanceId"), instanceId); -} - std::string ListSnapshotsRequest::getRegionId() const { return regionId_; } @@ -88,3 +70,35 @@ void ListSnapshotsRequest::setDiskId(const std::string &diskId) { setParameter(std::string("DiskId"), diskId); } +std::vector ListSnapshotsRequest::getTag() const { + return tag_; +} + +void ListSnapshotsRequest::setTag(const std::vector &tag) { + tag_ = tag; + for(int dep1 = 0; dep1 != tag.size(); dep1++) { + auto tagObj = tag.at(dep1); + std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1); + setParameter(tagObjStr + ".Key", tagObj.key); + setParameter(tagObjStr + ".Value", tagObj.value); + } +} + +std::string ListSnapshotsRequest::getSourceDiskType() const { + return sourceDiskType_; +} + +void ListSnapshotsRequest::setSourceDiskType(const std::string &sourceDiskType) { + sourceDiskType_ = sourceDiskType; + setParameter(std::string("SourceDiskType"), sourceDiskType); +} + +std::string ListSnapshotsRequest::getInstanceId() const { + return instanceId_; +} + +void ListSnapshotsRequest::setInstanceId(const std::string &instanceId) { + instanceId_ = instanceId; + setParameter(std::string("InstanceId"), instanceId); +} + diff --git a/swas-open/src/model/ListSnapshotsResult.cc b/swas-open/src/model/ListSnapshotsResult.cc index 0c1d57ae7..1a5be4317 100644 --- a/swas-open/src/model/ListSnapshotsResult.cc +++ b/swas-open/src/model/ListSnapshotsResult.cc @@ -65,6 +65,16 @@ void ListSnapshotsResult::parse(const std::string &payload) snapshotsObject.instanceId = valueSnapshotsSnapshot["InstanceId"].asString(); if(!valueSnapshotsSnapshot["RollbackTime"].isNull()) snapshotsObject.rollbackTime = valueSnapshotsSnapshot["RollbackTime"].asString(); + auto allTagsNode = valueSnapshotsSnapshot["Tags"]["tag"]; + for (auto valueSnapshotsSnapshotTagstag : allTagsNode) + { + Snapshot::Tag tagsObject; + if(!valueSnapshotsSnapshotTagstag["Key"].isNull()) + tagsObject.key = valueSnapshotsSnapshotTagstag["Key"].asString(); + if(!valueSnapshotsSnapshotTagstag["Value"].isNull()) + tagsObject.value = valueSnapshotsSnapshotTagstag["Value"].asString(); + snapshotsObject.tags.push_back(tagsObject); + } snapshots_.push_back(snapshotsObject); } if(!value["TotalCount"].isNull()) diff --git a/swas-open/src/model/ListTagResourcesRequest.cc b/swas-open/src/model/ListTagResourcesRequest.cc new file mode 100644 index 000000000..2d7219214 --- /dev/null +++ b/swas-open/src/model/ListTagResourcesRequest.cc @@ -0,0 +1,85 @@ +/* + * 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::SWAS_OPEN::Model::ListTagResourcesRequest; + +ListTagResourcesRequest::ListTagResourcesRequest() + : RpcServiceRequest("swas-open", "2020-06-01", "ListTagResources") { + setMethod(HttpRequest::Method::Post); +} + +ListTagResourcesRequest::~ListTagResourcesRequest() {} + +std::vector ListTagResourcesRequest::getResourceId() const { + return resourceId_; +} + +void ListTagResourcesRequest::setResourceId(const std::vector &resourceId) { + resourceId_ = resourceId; +} + +std::string ListTagResourcesRequest::getClientToken() const { + return clientToken_; +} + +void ListTagResourcesRequest::setClientToken(const std::string &clientToken) { + clientToken_ = clientToken; + setParameter(std::string("ClientToken"), clientToken); +} + +std::string ListTagResourcesRequest::getResourceType() const { + return resourceType_; +} + +void ListTagResourcesRequest::setResourceType(const std::string &resourceType) { + resourceType_ = resourceType; + setParameter(std::string("ResourceType"), resourceType); +} + +std::string ListTagResourcesRequest::getRegionId() const { + return regionId_; +} + +void ListTagResourcesRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + +std::string ListTagResourcesRequest::getNextToken() const { + return nextToken_; +} + +void ListTagResourcesRequest::setNextToken(const std::string &nextToken) { + nextToken_ = nextToken; + setParameter(std::string("NextToken"), nextToken); +} + +std::vector ListTagResourcesRequest::getTag() const { + return tag_; +} + +void ListTagResourcesRequest::setTag(const std::vector &tag) { + tag_ = tag; + for(int dep1 = 0; dep1 != tag.size(); dep1++) { + auto tagObj = tag.at(dep1); + std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1); + setParameter(tagObjStr + ".Key", tagObj.key); + setParameter(tagObjStr + ".Value", tagObj.value); + } +} + diff --git a/swas-open/src/model/ListTagResourcesResult.cc b/swas-open/src/model/ListTagResourcesResult.cc new file mode 100644 index 000000000..1329052ab --- /dev/null +++ b/swas-open/src/model/ListTagResourcesResult.cc @@ -0,0 +1,70 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::SWAS_OPEN; +using namespace AlibabaCloud::SWAS_OPEN::Model; + +ListTagResourcesResult::ListTagResourcesResult() : + ServiceResult() +{} + +ListTagResourcesResult::ListTagResourcesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListTagResourcesResult::~ListTagResourcesResult() +{} + +void ListTagResourcesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allTagResourcesNode = value["TagResources"]["TagResource"]; + for (auto valueTagResourcesTagResource : allTagResourcesNode) + { + TagResource tagResourcesObject; + if(!valueTagResourcesTagResource["ResourceType"].isNull()) + tagResourcesObject.resourceType = valueTagResourcesTagResource["ResourceType"].asString(); + if(!valueTagResourcesTagResource["TagValue"].isNull()) + tagResourcesObject.tagValue = valueTagResourcesTagResource["TagValue"].asString(); + if(!valueTagResourcesTagResource["ResourceId"].isNull()) + tagResourcesObject.resourceId = valueTagResourcesTagResource["ResourceId"].asString(); + if(!valueTagResourcesTagResource["TagKey"].isNull()) + tagResourcesObject.tagKey = valueTagResourcesTagResource["TagKey"].asString(); + tagResources_.push_back(tagResourcesObject); + } + if(!value["NextToken"].isNull()) + nextToken_ = value["NextToken"].asString(); + +} + +std::string ListTagResourcesResult::getNextToken()const +{ + return nextToken_; +} + +std::vector ListTagResourcesResult::getTagResources()const +{ + return tagResources_; +} + diff --git a/swas-open/src/model/TagResourcesRequest.cc b/swas-open/src/model/TagResourcesRequest.cc new file mode 100644 index 000000000..efab4198b --- /dev/null +++ b/swas-open/src/model/TagResourcesRequest.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 + +using AlibabaCloud::SWAS_OPEN::Model::TagResourcesRequest; + +TagResourcesRequest::TagResourcesRequest() + : RpcServiceRequest("swas-open", "2020-06-01", "TagResources") { + setMethod(HttpRequest::Method::Post); +} + +TagResourcesRequest::~TagResourcesRequest() {} + +std::vector TagResourcesRequest::getResourceId() const { + return resourceId_; +} + +void TagResourcesRequest::setResourceId(const std::vector &resourceId) { + resourceId_ = resourceId; +} + +std::string TagResourcesRequest::getClientToken() const { + return clientToken_; +} + +void TagResourcesRequest::setClientToken(const std::string &clientToken) { + clientToken_ = clientToken; + setParameter(std::string("ClientToken"), clientToken); +} + +std::string TagResourcesRequest::getResourceType() const { + return resourceType_; +} + +void TagResourcesRequest::setResourceType(const std::string &resourceType) { + resourceType_ = resourceType; + setParameter(std::string("ResourceType"), resourceType); +} + +std::string TagResourcesRequest::getRegionId() const { + return regionId_; +} + +void TagResourcesRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + +std::vector TagResourcesRequest::getTag() const { + return tag_; +} + +void TagResourcesRequest::setTag(const std::vector &tag) { + tag_ = tag; + for(int dep1 = 0; dep1 != tag.size(); dep1++) { + auto tagObj = tag.at(dep1); + std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1); + setParameter(tagObjStr + ".Key", tagObj.key); + setParameter(tagObjStr + ".Value", tagObj.value); + } +} + diff --git a/swas-open/src/model/TagResourcesResult.cc b/swas-open/src/model/TagResourcesResult.cc new file mode 100644 index 000000000..4703515fd --- /dev/null +++ b/swas-open/src/model/TagResourcesResult.cc @@ -0,0 +1,44 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::SWAS_OPEN; +using namespace AlibabaCloud::SWAS_OPEN::Model; + +TagResourcesResult::TagResourcesResult() : + ServiceResult() +{} + +TagResourcesResult::TagResourcesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +TagResourcesResult::~TagResourcesResult() +{} + +void TagResourcesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/swas-open/src/model/UntagResourcesRequest.cc b/swas-open/src/model/UntagResourcesRequest.cc new file mode 100644 index 000000000..82acaa7a5 --- /dev/null +++ b/swas-open/src/model/UntagResourcesRequest.cc @@ -0,0 +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::SWAS_OPEN::Model::UntagResourcesRequest; + +UntagResourcesRequest::UntagResourcesRequest() + : RpcServiceRequest("swas-open", "2020-06-01", "UntagResources") { + setMethod(HttpRequest::Method::Post); +} + +UntagResourcesRequest::~UntagResourcesRequest() {} + +bool UntagResourcesRequest::getAll() const { + return all_; +} + +void UntagResourcesRequest::setAll(bool all) { + all_ = all; + setParameter(std::string("All"), all ? "true" : "false"); +} + +std::vector UntagResourcesRequest::getResourceId() const { + return resourceId_; +} + +void UntagResourcesRequest::setResourceId(const std::vector &resourceId) { + resourceId_ = resourceId; +} + +std::string UntagResourcesRequest::getClientToken() const { + return clientToken_; +} + +void UntagResourcesRequest::setClientToken(const std::string &clientToken) { + clientToken_ = clientToken; + setParameter(std::string("ClientToken"), clientToken); +} + +std::string UntagResourcesRequest::getResourceType() const { + return resourceType_; +} + +void UntagResourcesRequest::setResourceType(const std::string &resourceType) { + resourceType_ = resourceType; + setParameter(std::string("ResourceType"), resourceType); +} + +std::string UntagResourcesRequest::getRegionId() const { + return regionId_; +} + +void UntagResourcesRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + +std::vector UntagResourcesRequest::getTagKey() const { + return tagKey_; +} + +void UntagResourcesRequest::setTagKey(const std::vector &tagKey) { + tagKey_ = tagKey; +} + diff --git a/swas-open/src/model/UntagResourcesResult.cc b/swas-open/src/model/UntagResourcesResult.cc new file mode 100644 index 000000000..ea29a129c --- /dev/null +++ b/swas-open/src/model/UntagResourcesResult.cc @@ -0,0 +1,44 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::SWAS_OPEN; +using namespace AlibabaCloud::SWAS_OPEN::Model; + +UntagResourcesResult::UntagResourcesResult() : + ServiceResult() +{} + +UntagResourcesResult::UntagResourcesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UntagResourcesResult::~UntagResourcesResult() +{} + +void UntagResourcesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} +