diff --git a/VERSION b/VERSION index 4877f6df2..e00002c62 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1932 \ No newline at end of file +1.36.1933 \ No newline at end of file diff --git a/swas-open/CMakeLists.txt b/swas-open/CMakeLists.txt index b43e040a4..9bc2d4308 100644 --- a/swas-open/CMakeLists.txt +++ b/swas-open/CMakeLists.txt @@ -23,6 +23,8 @@ set(swas-open_public_header set(swas-open_public_header_model include/alibabacloud/swas-open/model/AllocatePublicConnectionRequest.h include/alibabacloud/swas-open/model/AllocatePublicConnectionResult.h + include/alibabacloud/swas-open/model/AttachKeyPairRequest.h + include/alibabacloud/swas-open/model/AttachKeyPairResult.h include/alibabacloud/swas-open/model/CreateCommandRequest.h include/alibabacloud/swas-open/model/CreateCommandResult.h include/alibabacloud/swas-open/model/CreateCustomImageRequest.h @@ -35,6 +37,8 @@ set(swas-open_public_header_model include/alibabacloud/swas-open/model/CreateInstanceKeyPairResult.h include/alibabacloud/swas-open/model/CreateInstancesRequest.h include/alibabacloud/swas-open/model/CreateInstancesResult.h + include/alibabacloud/swas-open/model/CreateKeyPairRequest.h + include/alibabacloud/swas-open/model/CreateKeyPairResult.h include/alibabacloud/swas-open/model/CreateSnapshotRequest.h include/alibabacloud/swas-open/model/CreateSnapshotResult.h include/alibabacloud/swas-open/model/DeleteCommandRequest.h @@ -49,6 +53,8 @@ set(swas-open_public_header_model include/alibabacloud/swas-open/model/DeleteFirewallRulesResult.h include/alibabacloud/swas-open/model/DeleteInstanceKeyPairRequest.h include/alibabacloud/swas-open/model/DeleteInstanceKeyPairResult.h + include/alibabacloud/swas-open/model/DeleteKeyPairsRequest.h + include/alibabacloud/swas-open/model/DeleteKeyPairsResult.h include/alibabacloud/swas-open/model/DeleteSnapshotRequest.h include/alibabacloud/swas-open/model/DeleteSnapshotResult.h include/alibabacloud/swas-open/model/DeleteSnapshotsRequest.h @@ -87,10 +93,14 @@ set(swas-open_public_header_model include/alibabacloud/swas-open/model/DescribeMonitorDataResult.h include/alibabacloud/swas-open/model/DescribeSecurityAgentStatusRequest.h include/alibabacloud/swas-open/model/DescribeSecurityAgentStatusResult.h + include/alibabacloud/swas-open/model/DetachKeyPairRequest.h + include/alibabacloud/swas-open/model/DetachKeyPairResult.h include/alibabacloud/swas-open/model/DisableFirewallRuleRequest.h include/alibabacloud/swas-open/model/DisableFirewallRuleResult.h include/alibabacloud/swas-open/model/EnableFirewallRuleRequest.h include/alibabacloud/swas-open/model/EnableFirewallRuleResult.h + include/alibabacloud/swas-open/model/ImportKeyPairRequest.h + include/alibabacloud/swas-open/model/ImportKeyPairResult.h include/alibabacloud/swas-open/model/InstallCloudAssistantRequest.h include/alibabacloud/swas-open/model/InstallCloudAssistantResult.h include/alibabacloud/swas-open/model/InstallCloudMonitorAgentRequest.h @@ -113,6 +123,8 @@ set(swas-open_public_header_model include/alibabacloud/swas-open/model/ListInstancesResult.h include/alibabacloud/swas-open/model/ListInstancesTrafficPackagesRequest.h include/alibabacloud/swas-open/model/ListInstancesTrafficPackagesResult.h + include/alibabacloud/swas-open/model/ListKeyPairsRequest.h + include/alibabacloud/swas-open/model/ListKeyPairsResult.h include/alibabacloud/swas-open/model/ListPlansRequest.h include/alibabacloud/swas-open/model/ListPlansResult.h include/alibabacloud/swas-open/model/ListRegionsRequest.h @@ -186,6 +198,8 @@ set(swas-open_src src/SWAS-OPENClient.cc src/model/AllocatePublicConnectionRequest.cc src/model/AllocatePublicConnectionResult.cc + src/model/AttachKeyPairRequest.cc + src/model/AttachKeyPairResult.cc src/model/CreateCommandRequest.cc src/model/CreateCommandResult.cc src/model/CreateCustomImageRequest.cc @@ -198,6 +212,8 @@ set(swas-open_src src/model/CreateInstanceKeyPairResult.cc src/model/CreateInstancesRequest.cc src/model/CreateInstancesResult.cc + src/model/CreateKeyPairRequest.cc + src/model/CreateKeyPairResult.cc src/model/CreateSnapshotRequest.cc src/model/CreateSnapshotResult.cc src/model/DeleteCommandRequest.cc @@ -212,6 +228,8 @@ set(swas-open_src src/model/DeleteFirewallRulesResult.cc src/model/DeleteInstanceKeyPairRequest.cc src/model/DeleteInstanceKeyPairResult.cc + src/model/DeleteKeyPairsRequest.cc + src/model/DeleteKeyPairsResult.cc src/model/DeleteSnapshotRequest.cc src/model/DeleteSnapshotResult.cc src/model/DeleteSnapshotsRequest.cc @@ -250,10 +268,14 @@ set(swas-open_src src/model/DescribeMonitorDataResult.cc src/model/DescribeSecurityAgentStatusRequest.cc src/model/DescribeSecurityAgentStatusResult.cc + src/model/DetachKeyPairRequest.cc + src/model/DetachKeyPairResult.cc src/model/DisableFirewallRuleRequest.cc src/model/DisableFirewallRuleResult.cc src/model/EnableFirewallRuleRequest.cc src/model/EnableFirewallRuleResult.cc + src/model/ImportKeyPairRequest.cc + src/model/ImportKeyPairResult.cc src/model/InstallCloudAssistantRequest.cc src/model/InstallCloudAssistantResult.cc src/model/InstallCloudMonitorAgentRequest.cc @@ -276,6 +298,8 @@ set(swas-open_src src/model/ListInstancesResult.cc src/model/ListInstancesTrafficPackagesRequest.cc src/model/ListInstancesTrafficPackagesResult.cc + src/model/ListKeyPairsRequest.cc + src/model/ListKeyPairsResult.cc src/model/ListPlansRequest.cc src/model/ListPlansResult.cc src/model/ListRegionsRequest.cc diff --git a/swas-open/include/alibabacloud/swas-open/SWAS_OPENClient.h b/swas-open/include/alibabacloud/swas-open/SWAS_OPENClient.h index 1697412db..f7c023d9d 100644 --- a/swas-open/include/alibabacloud/swas-open/SWAS_OPENClient.h +++ b/swas-open/include/alibabacloud/swas-open/SWAS_OPENClient.h @@ -24,6 +24,8 @@ #include "SWAS_OPENExport.h" #include "model/AllocatePublicConnectionRequest.h" #include "model/AllocatePublicConnectionResult.h" +#include "model/AttachKeyPairRequest.h" +#include "model/AttachKeyPairResult.h" #include "model/CreateCommandRequest.h" #include "model/CreateCommandResult.h" #include "model/CreateCustomImageRequest.h" @@ -36,6 +38,8 @@ #include "model/CreateInstanceKeyPairResult.h" #include "model/CreateInstancesRequest.h" #include "model/CreateInstancesResult.h" +#include "model/CreateKeyPairRequest.h" +#include "model/CreateKeyPairResult.h" #include "model/CreateSnapshotRequest.h" #include "model/CreateSnapshotResult.h" #include "model/DeleteCommandRequest.h" @@ -50,6 +54,8 @@ #include "model/DeleteFirewallRulesResult.h" #include "model/DeleteInstanceKeyPairRequest.h" #include "model/DeleteInstanceKeyPairResult.h" +#include "model/DeleteKeyPairsRequest.h" +#include "model/DeleteKeyPairsResult.h" #include "model/DeleteSnapshotRequest.h" #include "model/DeleteSnapshotResult.h" #include "model/DeleteSnapshotsRequest.h" @@ -88,10 +94,14 @@ #include "model/DescribeMonitorDataResult.h" #include "model/DescribeSecurityAgentStatusRequest.h" #include "model/DescribeSecurityAgentStatusResult.h" +#include "model/DetachKeyPairRequest.h" +#include "model/DetachKeyPairResult.h" #include "model/DisableFirewallRuleRequest.h" #include "model/DisableFirewallRuleResult.h" #include "model/EnableFirewallRuleRequest.h" #include "model/EnableFirewallRuleResult.h" +#include "model/ImportKeyPairRequest.h" +#include "model/ImportKeyPairResult.h" #include "model/InstallCloudAssistantRequest.h" #include "model/InstallCloudAssistantResult.h" #include "model/InstallCloudMonitorAgentRequest.h" @@ -114,6 +124,8 @@ #include "model/ListInstancesResult.h" #include "model/ListInstancesTrafficPackagesRequest.h" #include "model/ListInstancesTrafficPackagesResult.h" +#include "model/ListKeyPairsRequest.h" +#include "model/ListKeyPairsResult.h" #include "model/ListPlansRequest.h" #include "model/ListPlansResult.h" #include "model/ListRegionsRequest.h" @@ -194,6 +206,9 @@ namespace AlibabaCloud typedef Outcome AllocatePublicConnectionOutcome; typedef std::future AllocatePublicConnectionOutcomeCallable; typedef std::function&)> AllocatePublicConnectionAsyncHandler; + typedef Outcome AttachKeyPairOutcome; + typedef std::future AttachKeyPairOutcomeCallable; + typedef std::function&)> AttachKeyPairAsyncHandler; typedef Outcome CreateCommandOutcome; typedef std::future CreateCommandOutcomeCallable; typedef std::function&)> CreateCommandAsyncHandler; @@ -212,6 +227,9 @@ namespace AlibabaCloud typedef Outcome CreateInstancesOutcome; typedef std::future CreateInstancesOutcomeCallable; typedef std::function&)> CreateInstancesAsyncHandler; + typedef Outcome CreateKeyPairOutcome; + typedef std::future CreateKeyPairOutcomeCallable; + typedef std::function&)> CreateKeyPairAsyncHandler; typedef Outcome CreateSnapshotOutcome; typedef std::future CreateSnapshotOutcomeCallable; typedef std::function&)> CreateSnapshotAsyncHandler; @@ -233,6 +251,9 @@ namespace AlibabaCloud typedef Outcome DeleteInstanceKeyPairOutcome; typedef std::future DeleteInstanceKeyPairOutcomeCallable; typedef std::function&)> DeleteInstanceKeyPairAsyncHandler; + typedef Outcome DeleteKeyPairsOutcome; + typedef std::future DeleteKeyPairsOutcomeCallable; + typedef std::function&)> DeleteKeyPairsAsyncHandler; typedef Outcome DeleteSnapshotOutcome; typedef std::future DeleteSnapshotOutcomeCallable; typedef std::function&)> DeleteSnapshotAsyncHandler; @@ -290,12 +311,18 @@ namespace AlibabaCloud typedef Outcome DescribeSecurityAgentStatusOutcome; typedef std::future DescribeSecurityAgentStatusOutcomeCallable; typedef std::function&)> DescribeSecurityAgentStatusAsyncHandler; + typedef Outcome DetachKeyPairOutcome; + typedef std::future DetachKeyPairOutcomeCallable; + typedef std::function&)> DetachKeyPairAsyncHandler; typedef Outcome DisableFirewallRuleOutcome; typedef std::future DisableFirewallRuleOutcomeCallable; typedef std::function&)> DisableFirewallRuleAsyncHandler; typedef Outcome EnableFirewallRuleOutcome; typedef std::future EnableFirewallRuleOutcomeCallable; typedef std::function&)> EnableFirewallRuleAsyncHandler; + typedef Outcome ImportKeyPairOutcome; + typedef std::future ImportKeyPairOutcomeCallable; + typedef std::function&)> ImportKeyPairAsyncHandler; typedef Outcome InstallCloudAssistantOutcome; typedef std::future InstallCloudAssistantOutcomeCallable; typedef std::function&)> InstallCloudAssistantAsyncHandler; @@ -329,6 +356,9 @@ namespace AlibabaCloud typedef Outcome ListInstancesTrafficPackagesOutcome; typedef std::future ListInstancesTrafficPackagesOutcomeCallable; typedef std::function&)> ListInstancesTrafficPackagesAsyncHandler; + typedef Outcome ListKeyPairsOutcome; + typedef std::future ListKeyPairsOutcomeCallable; + typedef std::function&)> ListKeyPairsAsyncHandler; typedef Outcome ListPlansOutcome; typedef std::future ListPlansOutcomeCallable; typedef std::function&)> ListPlansAsyncHandler; @@ -439,6 +469,9 @@ namespace AlibabaCloud AllocatePublicConnectionOutcome allocatePublicConnection(const Model::AllocatePublicConnectionRequest &request)const; void allocatePublicConnectionAsync(const Model::AllocatePublicConnectionRequest& request, const AllocatePublicConnectionAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; AllocatePublicConnectionOutcomeCallable allocatePublicConnectionCallable(const Model::AllocatePublicConnectionRequest& request) const; + AttachKeyPairOutcome attachKeyPair(const Model::AttachKeyPairRequest &request)const; + void attachKeyPairAsync(const Model::AttachKeyPairRequest& request, const AttachKeyPairAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + AttachKeyPairOutcomeCallable attachKeyPairCallable(const Model::AttachKeyPairRequest& request) const; CreateCommandOutcome createCommand(const Model::CreateCommandRequest &request)const; void createCommandAsync(const Model::CreateCommandRequest& request, const CreateCommandAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateCommandOutcomeCallable createCommandCallable(const Model::CreateCommandRequest& request) const; @@ -457,6 +490,9 @@ namespace AlibabaCloud CreateInstancesOutcome createInstances(const Model::CreateInstancesRequest &request)const; void createInstancesAsync(const Model::CreateInstancesRequest& request, const CreateInstancesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateInstancesOutcomeCallable createInstancesCallable(const Model::CreateInstancesRequest& request) const; + CreateKeyPairOutcome createKeyPair(const Model::CreateKeyPairRequest &request)const; + void createKeyPairAsync(const Model::CreateKeyPairRequest& request, const CreateKeyPairAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateKeyPairOutcomeCallable createKeyPairCallable(const Model::CreateKeyPairRequest& request) const; CreateSnapshotOutcome createSnapshot(const Model::CreateSnapshotRequest &request)const; void createSnapshotAsync(const Model::CreateSnapshotRequest& request, const CreateSnapshotAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateSnapshotOutcomeCallable createSnapshotCallable(const Model::CreateSnapshotRequest& request) const; @@ -478,6 +514,9 @@ namespace AlibabaCloud DeleteInstanceKeyPairOutcome deleteInstanceKeyPair(const Model::DeleteInstanceKeyPairRequest &request)const; void deleteInstanceKeyPairAsync(const Model::DeleteInstanceKeyPairRequest& request, const DeleteInstanceKeyPairAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DeleteInstanceKeyPairOutcomeCallable deleteInstanceKeyPairCallable(const Model::DeleteInstanceKeyPairRequest& request) const; + DeleteKeyPairsOutcome deleteKeyPairs(const Model::DeleteKeyPairsRequest &request)const; + void deleteKeyPairsAsync(const Model::DeleteKeyPairsRequest& request, const DeleteKeyPairsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DeleteKeyPairsOutcomeCallable deleteKeyPairsCallable(const Model::DeleteKeyPairsRequest& request) const; DeleteSnapshotOutcome deleteSnapshot(const Model::DeleteSnapshotRequest &request)const; void deleteSnapshotAsync(const Model::DeleteSnapshotRequest& request, const DeleteSnapshotAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DeleteSnapshotOutcomeCallable deleteSnapshotCallable(const Model::DeleteSnapshotRequest& request) const; @@ -535,12 +574,18 @@ namespace AlibabaCloud DescribeSecurityAgentStatusOutcome describeSecurityAgentStatus(const Model::DescribeSecurityAgentStatusRequest &request)const; void describeSecurityAgentStatusAsync(const Model::DescribeSecurityAgentStatusRequest& request, const DescribeSecurityAgentStatusAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeSecurityAgentStatusOutcomeCallable describeSecurityAgentStatusCallable(const Model::DescribeSecurityAgentStatusRequest& request) const; + DetachKeyPairOutcome detachKeyPair(const Model::DetachKeyPairRequest &request)const; + void detachKeyPairAsync(const Model::DetachKeyPairRequest& request, const DetachKeyPairAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DetachKeyPairOutcomeCallable detachKeyPairCallable(const Model::DetachKeyPairRequest& request) const; DisableFirewallRuleOutcome disableFirewallRule(const Model::DisableFirewallRuleRequest &request)const; void disableFirewallRuleAsync(const Model::DisableFirewallRuleRequest& request, const DisableFirewallRuleAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DisableFirewallRuleOutcomeCallable disableFirewallRuleCallable(const Model::DisableFirewallRuleRequest& request) const; EnableFirewallRuleOutcome enableFirewallRule(const Model::EnableFirewallRuleRequest &request)const; void enableFirewallRuleAsync(const Model::EnableFirewallRuleRequest& request, const EnableFirewallRuleAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; EnableFirewallRuleOutcomeCallable enableFirewallRuleCallable(const Model::EnableFirewallRuleRequest& request) const; + ImportKeyPairOutcome importKeyPair(const Model::ImportKeyPairRequest &request)const; + void importKeyPairAsync(const Model::ImportKeyPairRequest& request, const ImportKeyPairAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ImportKeyPairOutcomeCallable importKeyPairCallable(const Model::ImportKeyPairRequest& request) const; InstallCloudAssistantOutcome installCloudAssistant(const Model::InstallCloudAssistantRequest &request)const; void installCloudAssistantAsync(const Model::InstallCloudAssistantRequest& request, const InstallCloudAssistantAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; InstallCloudAssistantOutcomeCallable installCloudAssistantCallable(const Model::InstallCloudAssistantRequest& request) const; @@ -574,6 +619,9 @@ namespace AlibabaCloud ListInstancesTrafficPackagesOutcome listInstancesTrafficPackages(const Model::ListInstancesTrafficPackagesRequest &request)const; void listInstancesTrafficPackagesAsync(const Model::ListInstancesTrafficPackagesRequest& request, const ListInstancesTrafficPackagesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListInstancesTrafficPackagesOutcomeCallable listInstancesTrafficPackagesCallable(const Model::ListInstancesTrafficPackagesRequest& request) const; + ListKeyPairsOutcome listKeyPairs(const Model::ListKeyPairsRequest &request)const; + void listKeyPairsAsync(const Model::ListKeyPairsRequest& request, const ListKeyPairsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListKeyPairsOutcomeCallable listKeyPairsCallable(const Model::ListKeyPairsRequest& request) const; ListPlansOutcome listPlans(const Model::ListPlansRequest &request)const; void listPlansAsync(const Model::ListPlansRequest& request, const ListPlansAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListPlansOutcomeCallable listPlansCallable(const Model::ListPlansRequest& request) const; diff --git a/swas-open/include/alibabacloud/swas-open/model/AttachKeyPairRequest.h b/swas-open/include/alibabacloud/swas-open/model/AttachKeyPairRequest.h new file mode 100644 index 000000000..44f4ff402 --- /dev/null +++ b/swas-open/include/alibabacloud/swas-open/model/AttachKeyPairRequest.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_ATTACHKEYPAIRREQUEST_H_ +#define ALIBABACLOUD_SWAS_OPEN_MODEL_ATTACHKEYPAIRREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace SWAS_OPEN { +namespace Model { +class ALIBABACLOUD_SWAS_OPEN_EXPORT AttachKeyPairRequest : public RpcServiceRequest { +public: + AttachKeyPairRequest(); + ~AttachKeyPairRequest(); + std::string getClientToken() const; + void setClientToken(const std::string &clientToken); + std::string getKeyPairName() const; + void setKeyPairName(const std::string &keyPairName); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::vector getInstanceIds() const; + void setInstanceIds(const std::vector &instanceIds); + +private: + std::string clientToken_; + std::string keyPairName_; + std::string regionId_; + std::vector instanceIds_; +}; +} // namespace Model +} // namespace SWAS_OPEN +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_ATTACHKEYPAIRREQUEST_H_ diff --git a/swas-open/include/alibabacloud/swas-open/model/AttachKeyPairResult.h b/swas-open/include/alibabacloud/swas-open/model/AttachKeyPairResult.h new file mode 100644 index 000000000..00f0eded2 --- /dev/null +++ b/swas-open/include/alibabacloud/swas-open/model/AttachKeyPairResult.h @@ -0,0 +1,62 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_SWAS_OPEN_MODEL_ATTACHKEYPAIRRESULT_H_ +#define ALIBABACLOUD_SWAS_OPEN_MODEL_ATTACHKEYPAIRRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace SWAS_OPEN + { + namespace Model + { + class ALIBABACLOUD_SWAS_OPEN_EXPORT AttachKeyPairResult : public ServiceResult + { + public: + struct Result + { + std::string message; + std::string instanceId; + std::string code; + std::string success; + }; + + + AttachKeyPairResult(); + explicit AttachKeyPairResult(const std::string &payload); + ~AttachKeyPairResult(); + int getTotalCount()const; + std::vector getResults()const; + int getFailCount()const; + + protected: + void parse(const std::string &payload); + private: + int totalCount_; + std::vector results_; + int failCount_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_ATTACHKEYPAIRRESULT_H_ \ No newline at end of file diff --git a/swas-open/include/alibabacloud/swas-open/model/CreateCommandRequest.h b/swas-open/include/alibabacloud/swas-open/model/CreateCommandRequest.h index cb8ba389d..16182e5dd 100644 --- a/swas-open/include/alibabacloud/swas-open/model/CreateCommandRequest.h +++ b/swas-open/include/alibabacloud/swas-open/model/CreateCommandRequest.h @@ -44,6 +44,8 @@ public: void setCommandContent(const std::string &commandContent); long getTimeout() const; void setTimeout(long timeout); + std::string getResourceGroupId() const; + void setResourceGroupId(const std::string &resourceGroupId); std::string getRegionId() const; void setRegionId(const std::string ®ionId); std::vector getTag() const; @@ -59,6 +61,7 @@ private: std::string type_; std::string commandContent_; long timeout_; + std::string resourceGroupId_; std::string regionId_; std::vector tag_; std::string name_; diff --git a/swas-open/include/alibabacloud/swas-open/model/CreateCustomImageRequest.h b/swas-open/include/alibabacloud/swas-open/model/CreateCustomImageRequest.h index f7190054e..7333c3df9 100644 --- a/swas-open/include/alibabacloud/swas-open/model/CreateCustomImageRequest.h +++ b/swas-open/include/alibabacloud/swas-open/model/CreateCustomImageRequest.h @@ -42,6 +42,8 @@ public: void setClientToken(const std::string &clientToken); std::string getDescription() const; void setDescription(const std::string &description); + std::string getResoureGroupId() const; + void setResoureGroupId(const std::string &resoureGroupId); std::string getPlatform() const; void setPlatform(const std::string &platform); std::string getRegionId() const; @@ -58,6 +60,7 @@ private: std::string dataSnapshotId_; std::string clientToken_; std::string description_; + std::string resoureGroupId_; std::string platform_; std::string regionId_; std::string imageName_; diff --git a/swas-open/include/alibabacloud/swas-open/model/CreateKeyPairRequest.h b/swas-open/include/alibabacloud/swas-open/model/CreateKeyPairRequest.h new file mode 100644 index 000000000..19328b315 --- /dev/null +++ b/swas-open/include/alibabacloud/swas-open/model/CreateKeyPairRequest.h @@ -0,0 +1,48 @@ +/* + * 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_CREATEKEYPAIRREQUEST_H_ +#define ALIBABACLOUD_SWAS_OPEN_MODEL_CREATEKEYPAIRREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace SWAS_OPEN { +namespace Model { +class ALIBABACLOUD_SWAS_OPEN_EXPORT CreateKeyPairRequest : public RpcServiceRequest { +public: + CreateKeyPairRequest(); + ~CreateKeyPairRequest(); + std::string getClientToken() const; + void setClientToken(const std::string &clientToken); + std::string getKeyPairName() const; + void setKeyPairName(const std::string &keyPairName); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + +private: + std::string clientToken_; + std::string keyPairName_; + std::string regionId_; +}; +} // namespace Model +} // namespace SWAS_OPEN +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_CREATEKEYPAIRREQUEST_H_ diff --git a/swas-open/include/alibabacloud/swas-open/model/CreateKeyPairResult.h b/swas-open/include/alibabacloud/swas-open/model/CreateKeyPairResult.h new file mode 100644 index 000000000..9a1b42b17 --- /dev/null +++ b/swas-open/include/alibabacloud/swas-open/model/CreateKeyPairResult.h @@ -0,0 +1,53 @@ +/* + * 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_CREATEKEYPAIRRESULT_H_ +#define ALIBABACLOUD_SWAS_OPEN_MODEL_CREATEKEYPAIRRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace SWAS_OPEN + { + namespace Model + { + class ALIBABACLOUD_SWAS_OPEN_EXPORT CreateKeyPairResult : public ServiceResult + { + public: + + + CreateKeyPairResult(); + explicit CreateKeyPairResult(const std::string &payload); + ~CreateKeyPairResult(); + std::string getKeyPairName()const; + std::string getPrivateKeyBody()const; + + protected: + void parse(const std::string &payload); + private: + std::string keyPairName_; + std::string privateKeyBody_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_CREATEKEYPAIRRESULT_H_ \ No newline at end of file diff --git a/swas-open/include/alibabacloud/swas-open/model/CreateSnapshotRequest.h b/swas-open/include/alibabacloud/swas-open/model/CreateSnapshotRequest.h index d3a27565f..9be99455e 100644 --- a/swas-open/include/alibabacloud/swas-open/model/CreateSnapshotRequest.h +++ b/swas-open/include/alibabacloud/swas-open/model/CreateSnapshotRequest.h @@ -38,6 +38,8 @@ public: void setClientToken(const std::string &clientToken); std::string getSnapshotName() const; void setSnapshotName(const std::string &snapshotName); + std::string getResourceGroupId() const; + void setResourceGroupId(const std::string &resourceGroupId); std::string getRegionId() const; void setRegionId(const std::string ®ionId); std::string getDiskId() const; @@ -48,6 +50,7 @@ public: private: std::string clientToken_; std::string snapshotName_; + std::string resourceGroupId_; std::string regionId_; std::string diskId_; std::vector tag_; diff --git a/swas-open/include/alibabacloud/swas-open/model/DeleteKeyPairsRequest.h b/swas-open/include/alibabacloud/swas-open/model/DeleteKeyPairsRequest.h new file mode 100644 index 000000000..cdfe56e9e --- /dev/null +++ b/swas-open/include/alibabacloud/swas-open/model/DeleteKeyPairsRequest.h @@ -0,0 +1,48 @@ +/* + * 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_DELETEKEYPAIRSREQUEST_H_ +#define ALIBABACLOUD_SWAS_OPEN_MODEL_DELETEKEYPAIRSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace SWAS_OPEN { +namespace Model { +class ALIBABACLOUD_SWAS_OPEN_EXPORT DeleteKeyPairsRequest : public RpcServiceRequest { +public: + DeleteKeyPairsRequest(); + ~DeleteKeyPairsRequest(); + std::string getClientToken() const; + void setClientToken(const std::string &clientToken); + std::vector getKeyPairNames() const; + void setKeyPairNames(const std::vector &keyPairNames); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + +private: + std::string clientToken_; + std::vector keyPairNames_; + std::string regionId_; +}; +} // namespace Model +} // namespace SWAS_OPEN +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_DELETEKEYPAIRSREQUEST_H_ diff --git a/swas-open/include/alibabacloud/swas-open/model/DeleteKeyPairsResult.h b/swas-open/include/alibabacloud/swas-open/model/DeleteKeyPairsResult.h new file mode 100644 index 000000000..dea7cb00d --- /dev/null +++ b/swas-open/include/alibabacloud/swas-open/model/DeleteKeyPairsResult.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_DELETEKEYPAIRSRESULT_H_ +#define ALIBABACLOUD_SWAS_OPEN_MODEL_DELETEKEYPAIRSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace SWAS_OPEN + { + namespace Model + { + class ALIBABACLOUD_SWAS_OPEN_EXPORT DeleteKeyPairsResult : public ServiceResult + { + public: + + + DeleteKeyPairsResult(); + explicit DeleteKeyPairsResult(const std::string &payload); + ~DeleteKeyPairsResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_DELETEKEYPAIRSRESULT_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 d408db6f5..ec4c1480f 100644 --- a/swas-open/include/alibabacloud/swas-open/model/DescribeCommandsRequest.h +++ b/swas-open/include/alibabacloud/swas-open/model/DescribeCommandsRequest.h @@ -40,6 +40,8 @@ public: void setCommandId(const std::string &commandId); std::string getPageNumber() const; void setPageNumber(const std::string &pageNumber); + std::string getResourceGroupId() const; + void setResourceGroupId(const std::string &resourceGroupId); std::string getRegionId() const; void setRegionId(const std::string ®ionId); std::string getProvider() const; @@ -55,6 +57,7 @@ private: std::string type_; std::string commandId_; std::string pageNumber_; + std::string resourceGroupId_; std::string regionId_; std::string provider_; std::string pageSize_; diff --git a/swas-open/include/alibabacloud/swas-open/model/DescribeCommandsResult.h b/swas-open/include/alibabacloud/swas-open/model/DescribeCommandsResult.h index cbae7e156..f615031ed 100644 --- a/swas-open/include/alibabacloud/swas-open/model/DescribeCommandsResult.h +++ b/swas-open/include/alibabacloud/swas-open/model/DescribeCommandsResult.h @@ -49,6 +49,7 @@ namespace AlibabaCloud }; std::vector parameterDefinitions; std::string description; + std::string resourceGroupId; std::vector parameterNames; long timeout; std::string name; diff --git a/swas-open/include/alibabacloud/swas-open/model/DetachKeyPairRequest.h b/swas-open/include/alibabacloud/swas-open/model/DetachKeyPairRequest.h new file mode 100644 index 000000000..0729cf394 --- /dev/null +++ b/swas-open/include/alibabacloud/swas-open/model/DetachKeyPairRequest.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_DETACHKEYPAIRREQUEST_H_ +#define ALIBABACLOUD_SWAS_OPEN_MODEL_DETACHKEYPAIRREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace SWAS_OPEN { +namespace Model { +class ALIBABACLOUD_SWAS_OPEN_EXPORT DetachKeyPairRequest : public RpcServiceRequest { +public: + DetachKeyPairRequest(); + ~DetachKeyPairRequest(); + std::string getClientToken() const; + void setClientToken(const std::string &clientToken); + std::string getKeyPairName() const; + void setKeyPairName(const std::string &keyPairName); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + std::vector getInstanceIds() const; + void setInstanceIds(const std::vector &instanceIds); + +private: + std::string clientToken_; + std::string keyPairName_; + std::string regionId_; + std::vector instanceIds_; +}; +} // namespace Model +} // namespace SWAS_OPEN +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_DETACHKEYPAIRREQUEST_H_ diff --git a/swas-open/include/alibabacloud/swas-open/model/DetachKeyPairResult.h b/swas-open/include/alibabacloud/swas-open/model/DetachKeyPairResult.h new file mode 100644 index 000000000..5d8d99d92 --- /dev/null +++ b/swas-open/include/alibabacloud/swas-open/model/DetachKeyPairResult.h @@ -0,0 +1,62 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_SWAS_OPEN_MODEL_DETACHKEYPAIRRESULT_H_ +#define ALIBABACLOUD_SWAS_OPEN_MODEL_DETACHKEYPAIRRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace SWAS_OPEN + { + namespace Model + { + class ALIBABACLOUD_SWAS_OPEN_EXPORT DetachKeyPairResult : public ServiceResult + { + public: + struct Result + { + std::string message; + std::string instanceId; + std::string code; + std::string success; + }; + + + DetachKeyPairResult(); + explicit DetachKeyPairResult(const std::string &payload); + ~DetachKeyPairResult(); + int getTotalCount()const; + std::vector getResults()const; + int getFailCount()const; + + protected: + void parse(const std::string &payload); + private: + int totalCount_; + std::vector results_; + int failCount_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_DETACHKEYPAIRRESULT_H_ \ No newline at end of file diff --git a/swas-open/include/alibabacloud/swas-open/model/ImportKeyPairRequest.h b/swas-open/include/alibabacloud/swas-open/model/ImportKeyPairRequest.h new file mode 100644 index 000000000..759501f72 --- /dev/null +++ b/swas-open/include/alibabacloud/swas-open/model/ImportKeyPairRequest.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_IMPORTKEYPAIRREQUEST_H_ +#define ALIBABACLOUD_SWAS_OPEN_MODEL_IMPORTKEYPAIRREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace SWAS_OPEN { +namespace Model { +class ALIBABACLOUD_SWAS_OPEN_EXPORT ImportKeyPairRequest : public RpcServiceRequest { +public: + ImportKeyPairRequest(); + ~ImportKeyPairRequest(); + std::string getClientToken() const; + void setClientToken(const std::string &clientToken); + std::string getPublicKeyBody() const; + void setPublicKeyBody(const std::string &publicKeyBody); + std::string getKeyPairName() const; + void setKeyPairName(const std::string &keyPairName); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + +private: + std::string clientToken_; + std::string publicKeyBody_; + std::string keyPairName_; + std::string regionId_; +}; +} // namespace Model +} // namespace SWAS_OPEN +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_IMPORTKEYPAIRREQUEST_H_ diff --git a/swas-open/include/alibabacloud/swas-open/model/ImportKeyPairResult.h b/swas-open/include/alibabacloud/swas-open/model/ImportKeyPairResult.h new file mode 100644 index 000000000..606db916a --- /dev/null +++ b/swas-open/include/alibabacloud/swas-open/model/ImportKeyPairResult.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_IMPORTKEYPAIRRESULT_H_ +#define ALIBABACLOUD_SWAS_OPEN_MODEL_IMPORTKEYPAIRRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace SWAS_OPEN + { + namespace Model + { + class ALIBABACLOUD_SWAS_OPEN_EXPORT ImportKeyPairResult : public ServiceResult + { + public: + + + ImportKeyPairResult(); + explicit ImportKeyPairResult(const std::string &payload); + ~ImportKeyPairResult(); + std::string getKeyPairName()const; + + protected: + void parse(const std::string &payload); + private: + std::string keyPairName_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_IMPORTKEYPAIRRESULT_H_ \ No newline at end of file diff --git a/swas-open/include/alibabacloud/swas-open/model/ListDisksRequest.h b/swas-open/include/alibabacloud/swas-open/model/ListDisksRequest.h index e47a19354..2dd956a35 100644 --- a/swas-open/include/alibabacloud/swas-open/model/ListDisksRequest.h +++ b/swas-open/include/alibabacloud/swas-open/model/ListDisksRequest.h @@ -34,12 +34,10 @@ public: }; ListDisksRequest(); ~ListDisksRequest(); - std::string getDiskType() const; - void setDiskType(const std::string &diskType); int getPageNumber() const; void setPageNumber(int pageNumber); - std::string getInstanceId() const; - void setInstanceId(const std::string &instanceId); + std::string getResourceGroupId() const; + void setResourceGroupId(const std::string &resourceGroupId); std::string getRegionId() const; void setRegionId(const std::string ®ionId); int getPageSize() const; @@ -48,15 +46,20 @@ public: void setDiskIds(const std::string &diskIds); std::vector getTag() const; void setTag(const std::vector &tag); + std::string getDiskType() const; + void setDiskType(const std::string &diskType); + std::string getInstanceId() const; + void setInstanceId(const std::string &instanceId); private: - std::string diskType_; int pageNumber_; - std::string instanceId_; + std::string resourceGroupId_; std::string regionId_; int pageSize_; std::string diskIds_; std::vector tag_; + std::string diskType_; + std::string instanceId_; }; } // 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 4e769a8e9..775222564 100644 --- a/swas-open/include/alibabacloud/swas-open/model/ListDisksResult.h +++ b/swas-open/include/alibabacloud/swas-open/model/ListDisksResult.h @@ -41,6 +41,7 @@ namespace AlibabaCloud }; std::string status; std::string category; + std::string resourceGroupId; std::string instanceId; std::string device; int size; diff --git a/swas-open/include/alibabacloud/swas-open/model/ListInstancesRequest.h b/swas-open/include/alibabacloud/swas-open/model/ListInstancesRequest.h index 508f13a16..e094a8ff3 100644 --- a/swas-open/include/alibabacloud/swas-open/model/ListInstancesRequest.h +++ b/swas-open/include/alibabacloud/swas-open/model/ListInstancesRequest.h @@ -36,6 +36,8 @@ public: ~ListInstancesRequest(); 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; @@ -44,6 +46,8 @@ public: void setPublicIpAddresses(const std::string &publicIpAddresses); std::vector getTag() const; void setTag(const std::vector &tag); + std::string getInstanceName() const; + void setInstanceName(const std::string &instanceName); std::string getInstanceIds() const; void setInstanceIds(const std::string &instanceIds); std::string getChargeType() const; @@ -53,10 +57,12 @@ public: private: int pageNumber_; + std::string resourceGroupId_; std::string regionId_; int pageSize_; std::string publicIpAddresses_; std::vector tag_; + std::string instanceName_; 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 f37e625be..830804ab0 100644 --- a/swas-open/include/alibabacloud/swas-open/model/ListInstancesResult.h +++ b/swas-open/include/alibabacloud/swas-open/model/ListInstancesResult.h @@ -65,20 +65,22 @@ namespace AlibabaCloud std::string key; }; std::string status; - std::string diskType; - std::vector diskTags; std::string category; + std::string resourceGroupId; 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 diskType; + std::vector diskTags; + std::string creationTime; + std::string regionId; + std::string diskId; }; std::string status; std::string disableReason; + std::string resourceGroupId; std::string instanceId; std::string planId; ResourceSpec resourceSpec; diff --git a/swas-open/include/alibabacloud/swas-open/model/ListKeyPairsRequest.h b/swas-open/include/alibabacloud/swas-open/model/ListKeyPairsRequest.h new file mode 100644 index 000000000..fbf860372 --- /dev/null +++ b/swas-open/include/alibabacloud/swas-open/model/ListKeyPairsRequest.h @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_SWAS_OPEN_MODEL_LISTKEYPAIRSREQUEST_H_ +#define ALIBABACLOUD_SWAS_OPEN_MODEL_LISTKEYPAIRSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace SWAS_OPEN { +namespace Model { +class ALIBABACLOUD_SWAS_OPEN_EXPORT ListKeyPairsRequest : public RpcServiceRequest { +public: + ListKeyPairsRequest(); + ~ListKeyPairsRequest(); + std::string getClientToken() const; + void setClientToken(const std::string &clientToken); + std::string getKeyPairName() const; + void setKeyPairName(const std::string &keyPairName); + int getPageNumber() const; + void setPageNumber(int pageNumber); + std::string getRegionId() const; + void setRegionId(const std::string ®ionId); + int getPageSize() const; + void setPageSize(int pageSize); + +private: + std::string clientToken_; + std::string keyPairName_; + int pageNumber_; + std::string regionId_; + int pageSize_; +}; +} // namespace Model +} // namespace SWAS_OPEN +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_LISTKEYPAIRSREQUEST_H_ diff --git a/swas-open/include/alibabacloud/swas-open/model/ListKeyPairsResult.h b/swas-open/include/alibabacloud/swas-open/model/ListKeyPairsResult.h new file mode 100644 index 000000000..bf697094e --- /dev/null +++ b/swas-open/include/alibabacloud/swas-open/model/ListKeyPairsResult.h @@ -0,0 +1,64 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_SWAS_OPEN_MODEL_LISTKEYPAIRSRESULT_H_ +#define ALIBABACLOUD_SWAS_OPEN_MODEL_LISTKEYPAIRSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace SWAS_OPEN + { + namespace Model + { + class ALIBABACLOUD_SWAS_OPEN_EXPORT ListKeyPairsResult : public ServiceResult + { + public: + struct KeyPair + { + std::string keyPairName; + std::string publicKey; + std::string creationTime; + std::vector instanceIds; + }; + + + ListKeyPairsResult(); + explicit ListKeyPairsResult(const std::string &payload); + ~ListKeyPairsResult(); + int getTotalCount()const; + int getPageSize()const; + int getPageNumber()const; + std::vector getKeyPairs()const; + + protected: + void parse(const std::string &payload); + private: + int totalCount_; + int pageSize_; + int pageNumber_; + std::vector keyPairs_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_LISTKEYPAIRSRESULT_H_ \ No newline at end of file diff --git a/swas-open/include/alibabacloud/swas-open/model/ListSnapshotsRequest.h b/swas-open/include/alibabacloud/swas-open/model/ListSnapshotsRequest.h index a45b45dda..4fab5acb6 100644 --- a/swas-open/include/alibabacloud/swas-open/model/ListSnapshotsRequest.h +++ b/swas-open/include/alibabacloud/swas-open/model/ListSnapshotsRequest.h @@ -38,6 +38,8 @@ public: void setSnapshotIds(const std::string &snapshotIds); 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; @@ -54,6 +56,7 @@ public: private: std::string snapshotIds_; int pageNumber_; + std::string resourceGroupId_; std::string regionId_; int pageSize_; std::string diskId_; diff --git a/swas-open/include/alibabacloud/swas-open/model/ListSnapshotsResult.h b/swas-open/include/alibabacloud/swas-open/model/ListSnapshotsResult.h index d46a2aa29..574fe165a 100644 --- a/swas-open/include/alibabacloud/swas-open/model/ListSnapshotsResult.h +++ b/swas-open/include/alibabacloud/swas-open/model/ListSnapshotsResult.h @@ -40,17 +40,18 @@ namespace AlibabaCloud std::string key; }; std::string status; - std::string snapshotId; std::string progress; + std::string resourceGroupId; std::string instanceId; std::string rollbackTime; + std::string snapshotName; + std::string sourceDiskId; + std::string remark; + std::string snapshotId; std::string creationTime; std::string regionId; std::string sourceDiskType; - std::string snapshotName; std::vector tags; - std::string sourceDiskId; - std::string remark; }; diff --git a/swas-open/src/SWAS-OPENClient.cc b/swas-open/src/SWAS-OPENClient.cc index 0afac5e51..444bf164d 100644 --- a/swas-open/src/SWAS-OPENClient.cc +++ b/swas-open/src/SWAS-OPENClient.cc @@ -87,6 +87,42 @@ SWAS_OPENClient::AllocatePublicConnectionOutcomeCallable SWAS_OPENClient::alloca return task->get_future(); } +SWAS_OPENClient::AttachKeyPairOutcome SWAS_OPENClient::attachKeyPair(const AttachKeyPairRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return AttachKeyPairOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return AttachKeyPairOutcome(AttachKeyPairResult(outcome.result())); + else + return AttachKeyPairOutcome(outcome.error()); +} + +void SWAS_OPENClient::attachKeyPairAsync(const AttachKeyPairRequest& request, const AttachKeyPairAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, attachKeyPair(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +SWAS_OPENClient::AttachKeyPairOutcomeCallable SWAS_OPENClient::attachKeyPairCallable(const AttachKeyPairRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->attachKeyPair(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + SWAS_OPENClient::CreateCommandOutcome SWAS_OPENClient::createCommand(const CreateCommandRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -303,6 +339,42 @@ SWAS_OPENClient::CreateInstancesOutcomeCallable SWAS_OPENClient::createInstances return task->get_future(); } +SWAS_OPENClient::CreateKeyPairOutcome SWAS_OPENClient::createKeyPair(const CreateKeyPairRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateKeyPairOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateKeyPairOutcome(CreateKeyPairResult(outcome.result())); + else + return CreateKeyPairOutcome(outcome.error()); +} + +void SWAS_OPENClient::createKeyPairAsync(const CreateKeyPairRequest& request, const CreateKeyPairAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createKeyPair(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +SWAS_OPENClient::CreateKeyPairOutcomeCallable SWAS_OPENClient::createKeyPairCallable(const CreateKeyPairRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createKeyPair(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + SWAS_OPENClient::CreateSnapshotOutcome SWAS_OPENClient::createSnapshot(const CreateSnapshotRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -555,6 +627,42 @@ SWAS_OPENClient::DeleteInstanceKeyPairOutcomeCallable SWAS_OPENClient::deleteIns return task->get_future(); } +SWAS_OPENClient::DeleteKeyPairsOutcome SWAS_OPENClient::deleteKeyPairs(const DeleteKeyPairsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DeleteKeyPairsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DeleteKeyPairsOutcome(DeleteKeyPairsResult(outcome.result())); + else + return DeleteKeyPairsOutcome(outcome.error()); +} + +void SWAS_OPENClient::deleteKeyPairsAsync(const DeleteKeyPairsRequest& request, const DeleteKeyPairsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, deleteKeyPairs(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +SWAS_OPENClient::DeleteKeyPairsOutcomeCallable SWAS_OPENClient::deleteKeyPairsCallable(const DeleteKeyPairsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->deleteKeyPairs(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + SWAS_OPENClient::DeleteSnapshotOutcome SWAS_OPENClient::deleteSnapshot(const DeleteSnapshotRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -1239,6 +1347,42 @@ SWAS_OPENClient::DescribeSecurityAgentStatusOutcomeCallable SWAS_OPENClient::des return task->get_future(); } +SWAS_OPENClient::DetachKeyPairOutcome SWAS_OPENClient::detachKeyPair(const DetachKeyPairRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DetachKeyPairOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DetachKeyPairOutcome(DetachKeyPairResult(outcome.result())); + else + return DetachKeyPairOutcome(outcome.error()); +} + +void SWAS_OPENClient::detachKeyPairAsync(const DetachKeyPairRequest& request, const DetachKeyPairAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, detachKeyPair(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +SWAS_OPENClient::DetachKeyPairOutcomeCallable SWAS_OPENClient::detachKeyPairCallable(const DetachKeyPairRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->detachKeyPair(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + SWAS_OPENClient::DisableFirewallRuleOutcome SWAS_OPENClient::disableFirewallRule(const DisableFirewallRuleRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -1311,6 +1455,42 @@ SWAS_OPENClient::EnableFirewallRuleOutcomeCallable SWAS_OPENClient::enableFirewa return task->get_future(); } +SWAS_OPENClient::ImportKeyPairOutcome SWAS_OPENClient::importKeyPair(const ImportKeyPairRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ImportKeyPairOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ImportKeyPairOutcome(ImportKeyPairResult(outcome.result())); + else + return ImportKeyPairOutcome(outcome.error()); +} + +void SWAS_OPENClient::importKeyPairAsync(const ImportKeyPairRequest& request, const ImportKeyPairAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, importKeyPair(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +SWAS_OPENClient::ImportKeyPairOutcomeCallable SWAS_OPENClient::importKeyPairCallable(const ImportKeyPairRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->importKeyPair(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + SWAS_OPENClient::InstallCloudAssistantOutcome SWAS_OPENClient::installCloudAssistant(const InstallCloudAssistantRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -1707,6 +1887,42 @@ SWAS_OPENClient::ListInstancesTrafficPackagesOutcomeCallable SWAS_OPENClient::li return task->get_future(); } +SWAS_OPENClient::ListKeyPairsOutcome SWAS_OPENClient::listKeyPairs(const ListKeyPairsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListKeyPairsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListKeyPairsOutcome(ListKeyPairsResult(outcome.result())); + else + return ListKeyPairsOutcome(outcome.error()); +} + +void SWAS_OPENClient::listKeyPairsAsync(const ListKeyPairsRequest& request, const ListKeyPairsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listKeyPairs(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +SWAS_OPENClient::ListKeyPairsOutcomeCallable SWAS_OPENClient::listKeyPairsCallable(const ListKeyPairsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listKeyPairs(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + SWAS_OPENClient::ListPlansOutcome SWAS_OPENClient::listPlans(const ListPlansRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/swas-open/src/model/AttachKeyPairRequest.cc b/swas-open/src/model/AttachKeyPairRequest.cc new file mode 100644 index 000000000..a840a9371 --- /dev/null +++ b/swas-open/src/model/AttachKeyPairRequest.cc @@ -0,0 +1,62 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::SWAS_OPEN::Model::AttachKeyPairRequest; + +AttachKeyPairRequest::AttachKeyPairRequest() + : RpcServiceRequest("swas-open", "2020-06-01", "AttachKeyPair") { + setMethod(HttpRequest::Method::Post); +} + +AttachKeyPairRequest::~AttachKeyPairRequest() {} + +std::string AttachKeyPairRequest::getClientToken() const { + return clientToken_; +} + +void AttachKeyPairRequest::setClientToken(const std::string &clientToken) { + clientToken_ = clientToken; + setParameter(std::string("ClientToken"), clientToken); +} + +std::string AttachKeyPairRequest::getKeyPairName() const { + return keyPairName_; +} + +void AttachKeyPairRequest::setKeyPairName(const std::string &keyPairName) { + keyPairName_ = keyPairName; + setParameter(std::string("KeyPairName"), keyPairName); +} + +std::string AttachKeyPairRequest::getRegionId() const { + return regionId_; +} + +void AttachKeyPairRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + +std::vector AttachKeyPairRequest::getInstanceIds() const { + return instanceIds_; +} + +void AttachKeyPairRequest::setInstanceIds(const std::vector &instanceIds) { + instanceIds_ = instanceIds; +} + diff --git a/swas-open/src/model/AttachKeyPairResult.cc b/swas-open/src/model/AttachKeyPairResult.cc new file mode 100644 index 000000000..82f612f93 --- /dev/null +++ b/swas-open/src/model/AttachKeyPairResult.cc @@ -0,0 +1,77 @@ +/* + * 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; + +AttachKeyPairResult::AttachKeyPairResult() : + ServiceResult() +{} + +AttachKeyPairResult::AttachKeyPairResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +AttachKeyPairResult::~AttachKeyPairResult() +{} + +void AttachKeyPairResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allResultsNode = value["Results"]["Result"]; + for (auto valueResultsResult : allResultsNode) + { + Result resultsObject; + if(!valueResultsResult["Code"].isNull()) + resultsObject.code = valueResultsResult["Code"].asString(); + if(!valueResultsResult["Message"].isNull()) + resultsObject.message = valueResultsResult["Message"].asString(); + if(!valueResultsResult["Success"].isNull()) + resultsObject.success = valueResultsResult["Success"].asString(); + if(!valueResultsResult["InstanceId"].isNull()) + resultsObject.instanceId = valueResultsResult["InstanceId"].asString(); + results_.push_back(resultsObject); + } + if(!value["TotalCount"].isNull()) + totalCount_ = std::stoi(value["TotalCount"].asString()); + if(!value["FailCount"].isNull()) + failCount_ = std::stoi(value["FailCount"].asString()); + +} + +int AttachKeyPairResult::getTotalCount()const +{ + return totalCount_; +} + +std::vector AttachKeyPairResult::getResults()const +{ + return results_; +} + +int AttachKeyPairResult::getFailCount()const +{ + return failCount_; +} + diff --git a/swas-open/src/model/CreateCommandRequest.cc b/swas-open/src/model/CreateCommandRequest.cc index c326be4f1..9e68cd0a1 100644 --- a/swas-open/src/model/CreateCommandRequest.cc +++ b/swas-open/src/model/CreateCommandRequest.cc @@ -70,6 +70,15 @@ void CreateCommandRequest::setTimeout(long timeout) { setParameter(std::string("Timeout"), std::to_string(timeout)); } +std::string CreateCommandRequest::getResourceGroupId() const { + return resourceGroupId_; +} + +void CreateCommandRequest::setResourceGroupId(const std::string &resourceGroupId) { + resourceGroupId_ = resourceGroupId; + setParameter(std::string("ResourceGroupId"), resourceGroupId); +} + std::string CreateCommandRequest::getRegionId() const { return regionId_; } diff --git a/swas-open/src/model/CreateCustomImageRequest.cc b/swas-open/src/model/CreateCustomImageRequest.cc index d5e7e2fdd..a1534326b 100644 --- a/swas-open/src/model/CreateCustomImageRequest.cc +++ b/swas-open/src/model/CreateCustomImageRequest.cc @@ -61,6 +61,15 @@ void CreateCustomImageRequest::setDescription(const std::string &description) { setParameter(std::string("Description"), description); } +std::string CreateCustomImageRequest::getResoureGroupId() const { + return resoureGroupId_; +} + +void CreateCustomImageRequest::setResoureGroupId(const std::string &resoureGroupId) { + resoureGroupId_ = resoureGroupId; + setParameter(std::string("ResoureGroupId"), resoureGroupId); +} + std::string CreateCustomImageRequest::getPlatform() const { return platform_; } diff --git a/swas-open/src/model/CreateKeyPairRequest.cc b/swas-open/src/model/CreateKeyPairRequest.cc new file mode 100644 index 000000000..958f0cd60 --- /dev/null +++ b/swas-open/src/model/CreateKeyPairRequest.cc @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::SWAS_OPEN::Model::CreateKeyPairRequest; + +CreateKeyPairRequest::CreateKeyPairRequest() + : RpcServiceRequest("swas-open", "2020-06-01", "CreateKeyPair") { + setMethod(HttpRequest::Method::Post); +} + +CreateKeyPairRequest::~CreateKeyPairRequest() {} + +std::string CreateKeyPairRequest::getClientToken() const { + return clientToken_; +} + +void CreateKeyPairRequest::setClientToken(const std::string &clientToken) { + clientToken_ = clientToken; + setParameter(std::string("ClientToken"), clientToken); +} + +std::string CreateKeyPairRequest::getKeyPairName() const { + return keyPairName_; +} + +void CreateKeyPairRequest::setKeyPairName(const std::string &keyPairName) { + keyPairName_ = keyPairName; + setParameter(std::string("KeyPairName"), keyPairName); +} + +std::string CreateKeyPairRequest::getRegionId() const { + return regionId_; +} + +void CreateKeyPairRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + diff --git a/swas-open/src/model/CreateKeyPairResult.cc b/swas-open/src/model/CreateKeyPairResult.cc new file mode 100644 index 000000000..7487af33c --- /dev/null +++ b/swas-open/src/model/CreateKeyPairResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::SWAS_OPEN; +using namespace AlibabaCloud::SWAS_OPEN::Model; + +CreateKeyPairResult::CreateKeyPairResult() : + ServiceResult() +{} + +CreateKeyPairResult::CreateKeyPairResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateKeyPairResult::~CreateKeyPairResult() +{} + +void CreateKeyPairResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["KeyPairName"].isNull()) + keyPairName_ = value["KeyPairName"].asString(); + if(!value["PrivateKeyBody"].isNull()) + privateKeyBody_ = value["PrivateKeyBody"].asString(); + +} + +std::string CreateKeyPairResult::getKeyPairName()const +{ + return keyPairName_; +} + +std::string CreateKeyPairResult::getPrivateKeyBody()const +{ + return privateKeyBody_; +} + diff --git a/swas-open/src/model/CreateSnapshotRequest.cc b/swas-open/src/model/CreateSnapshotRequest.cc index d6e57f4a3..10ebd99fd 100644 --- a/swas-open/src/model/CreateSnapshotRequest.cc +++ b/swas-open/src/model/CreateSnapshotRequest.cc @@ -43,6 +43,15 @@ void CreateSnapshotRequest::setSnapshotName(const std::string &snapshotName) { setParameter(std::string("SnapshotName"), snapshotName); } +std::string CreateSnapshotRequest::getResourceGroupId() const { + return resourceGroupId_; +} + +void CreateSnapshotRequest::setResourceGroupId(const std::string &resourceGroupId) { + resourceGroupId_ = resourceGroupId; + setParameter(std::string("ResourceGroupId"), resourceGroupId); +} + std::string CreateSnapshotRequest::getRegionId() const { return regionId_; } diff --git a/swas-open/src/model/DeleteKeyPairsRequest.cc b/swas-open/src/model/DeleteKeyPairsRequest.cc new file mode 100644 index 000000000..e342b720b --- /dev/null +++ b/swas-open/src/model/DeleteKeyPairsRequest.cc @@ -0,0 +1,53 @@ +/* + * 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::DeleteKeyPairsRequest; + +DeleteKeyPairsRequest::DeleteKeyPairsRequest() + : RpcServiceRequest("swas-open", "2020-06-01", "DeleteKeyPairs") { + setMethod(HttpRequest::Method::Post); +} + +DeleteKeyPairsRequest::~DeleteKeyPairsRequest() {} + +std::string DeleteKeyPairsRequest::getClientToken() const { + return clientToken_; +} + +void DeleteKeyPairsRequest::setClientToken(const std::string &clientToken) { + clientToken_ = clientToken; + setParameter(std::string("ClientToken"), clientToken); +} + +std::vector DeleteKeyPairsRequest::getKeyPairNames() const { + return keyPairNames_; +} + +void DeleteKeyPairsRequest::setKeyPairNames(const std::vector &keyPairNames) { + keyPairNames_ = keyPairNames; +} + +std::string DeleteKeyPairsRequest::getRegionId() const { + return regionId_; +} + +void DeleteKeyPairsRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + diff --git a/swas-open/src/model/DeleteKeyPairsResult.cc b/swas-open/src/model/DeleteKeyPairsResult.cc new file mode 100644 index 000000000..d2f5ddd22 --- /dev/null +++ b/swas-open/src/model/DeleteKeyPairsResult.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; + +DeleteKeyPairsResult::DeleteKeyPairsResult() : + ServiceResult() +{} + +DeleteKeyPairsResult::DeleteKeyPairsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DeleteKeyPairsResult::~DeleteKeyPairsResult() +{} + +void DeleteKeyPairsResult::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/DescribeCommandsRequest.cc b/swas-open/src/model/DescribeCommandsRequest.cc index e7ecd4991..1e5da36ad 100644 --- a/swas-open/src/model/DescribeCommandsRequest.cc +++ b/swas-open/src/model/DescribeCommandsRequest.cc @@ -52,6 +52,15 @@ void DescribeCommandsRequest::setPageNumber(const std::string &pageNumber) { setParameter(std::string("PageNumber"), pageNumber); } +std::string DescribeCommandsRequest::getResourceGroupId() const { + return resourceGroupId_; +} + +void DescribeCommandsRequest::setResourceGroupId(const std::string &resourceGroupId) { + resourceGroupId_ = resourceGroupId; + setParameter(std::string("ResourceGroupId"), resourceGroupId); +} + std::string DescribeCommandsRequest::getRegionId() const { return regionId_; } diff --git a/swas-open/src/model/DescribeCommandsResult.cc b/swas-open/src/model/DescribeCommandsResult.cc index 8823d76b0..170675385 100644 --- a/swas-open/src/model/DescribeCommandsResult.cc +++ b/swas-open/src/model/DescribeCommandsResult.cc @@ -63,6 +63,8 @@ void DescribeCommandsResult::parse(const std::string &payload) commandsObject.commandContent = valueCommandscommand["CommandContent"].asString(); if(!valueCommandscommand["EnableParameter"].isNull()) commandsObject.enableParameter = valueCommandscommand["EnableParameter"].asString() == "true"; + if(!valueCommandscommand["ResourceGroupId"].isNull()) + commandsObject.resourceGroupId = valueCommandscommand["ResourceGroupId"].asString(); auto allTagsNode = valueCommandscommand["Tags"]["tag"]; for (auto valueCommandscommandTagstag : allTagsNode) { diff --git a/swas-open/src/model/DetachKeyPairRequest.cc b/swas-open/src/model/DetachKeyPairRequest.cc new file mode 100644 index 000000000..9fac9676c --- /dev/null +++ b/swas-open/src/model/DetachKeyPairRequest.cc @@ -0,0 +1,62 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::SWAS_OPEN::Model::DetachKeyPairRequest; + +DetachKeyPairRequest::DetachKeyPairRequest() + : RpcServiceRequest("swas-open", "2020-06-01", "DetachKeyPair") { + setMethod(HttpRequest::Method::Post); +} + +DetachKeyPairRequest::~DetachKeyPairRequest() {} + +std::string DetachKeyPairRequest::getClientToken() const { + return clientToken_; +} + +void DetachKeyPairRequest::setClientToken(const std::string &clientToken) { + clientToken_ = clientToken; + setParameter(std::string("ClientToken"), clientToken); +} + +std::string DetachKeyPairRequest::getKeyPairName() const { + return keyPairName_; +} + +void DetachKeyPairRequest::setKeyPairName(const std::string &keyPairName) { + keyPairName_ = keyPairName; + setParameter(std::string("KeyPairName"), keyPairName); +} + +std::string DetachKeyPairRequest::getRegionId() const { + return regionId_; +} + +void DetachKeyPairRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + +std::vector DetachKeyPairRequest::getInstanceIds() const { + return instanceIds_; +} + +void DetachKeyPairRequest::setInstanceIds(const std::vector &instanceIds) { + instanceIds_ = instanceIds; +} + diff --git a/swas-open/src/model/DetachKeyPairResult.cc b/swas-open/src/model/DetachKeyPairResult.cc new file mode 100644 index 000000000..0f5f33c05 --- /dev/null +++ b/swas-open/src/model/DetachKeyPairResult.cc @@ -0,0 +1,77 @@ +/* + * 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; + +DetachKeyPairResult::DetachKeyPairResult() : + ServiceResult() +{} + +DetachKeyPairResult::DetachKeyPairResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DetachKeyPairResult::~DetachKeyPairResult() +{} + +void DetachKeyPairResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allResultsNode = value["Results"]["Result"]; + for (auto valueResultsResult : allResultsNode) + { + Result resultsObject; + if(!valueResultsResult["Code"].isNull()) + resultsObject.code = valueResultsResult["Code"].asString(); + if(!valueResultsResult["Message"].isNull()) + resultsObject.message = valueResultsResult["Message"].asString(); + if(!valueResultsResult["Success"].isNull()) + resultsObject.success = valueResultsResult["Success"].asString(); + if(!valueResultsResult["InstanceId"].isNull()) + resultsObject.instanceId = valueResultsResult["InstanceId"].asString(); + results_.push_back(resultsObject); + } + if(!value["TotalCount"].isNull()) + totalCount_ = std::stoi(value["TotalCount"].asString()); + if(!value["FailCount"].isNull()) + failCount_ = std::stoi(value["FailCount"].asString()); + +} + +int DetachKeyPairResult::getTotalCount()const +{ + return totalCount_; +} + +std::vector DetachKeyPairResult::getResults()const +{ + return results_; +} + +int DetachKeyPairResult::getFailCount()const +{ + return failCount_; +} + diff --git a/swas-open/src/model/ImportKeyPairRequest.cc b/swas-open/src/model/ImportKeyPairRequest.cc new file mode 100644 index 000000000..b06a4b83c --- /dev/null +++ b/swas-open/src/model/ImportKeyPairRequest.cc @@ -0,0 +1,63 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::SWAS_OPEN::Model::ImportKeyPairRequest; + +ImportKeyPairRequest::ImportKeyPairRequest() + : RpcServiceRequest("swas-open", "2020-06-01", "ImportKeyPair") { + setMethod(HttpRequest::Method::Post); +} + +ImportKeyPairRequest::~ImportKeyPairRequest() {} + +std::string ImportKeyPairRequest::getClientToken() const { + return clientToken_; +} + +void ImportKeyPairRequest::setClientToken(const std::string &clientToken) { + clientToken_ = clientToken; + setParameter(std::string("ClientToken"), clientToken); +} + +std::string ImportKeyPairRequest::getPublicKeyBody() const { + return publicKeyBody_; +} + +void ImportKeyPairRequest::setPublicKeyBody(const std::string &publicKeyBody) { + publicKeyBody_ = publicKeyBody; + setParameter(std::string("PublicKeyBody"), publicKeyBody); +} + +std::string ImportKeyPairRequest::getKeyPairName() const { + return keyPairName_; +} + +void ImportKeyPairRequest::setKeyPairName(const std::string &keyPairName) { + keyPairName_ = keyPairName; + setParameter(std::string("KeyPairName"), keyPairName); +} + +std::string ImportKeyPairRequest::getRegionId() const { + return regionId_; +} + +void ImportKeyPairRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + diff --git a/swas-open/src/model/ImportKeyPairResult.cc b/swas-open/src/model/ImportKeyPairResult.cc new file mode 100644 index 000000000..c9fa6d63d --- /dev/null +++ b/swas-open/src/model/ImportKeyPairResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::SWAS_OPEN; +using namespace AlibabaCloud::SWAS_OPEN::Model; + +ImportKeyPairResult::ImportKeyPairResult() : + ServiceResult() +{} + +ImportKeyPairResult::ImportKeyPairResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ImportKeyPairResult::~ImportKeyPairResult() +{} + +void ImportKeyPairResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["KeyPairName"].isNull()) + keyPairName_ = value["KeyPairName"].asString(); + +} + +std::string ImportKeyPairResult::getKeyPairName()const +{ + return keyPairName_; +} + diff --git a/swas-open/src/model/ListDisksRequest.cc b/swas-open/src/model/ListDisksRequest.cc index 9c8607f16..42fd189c8 100644 --- a/swas-open/src/model/ListDisksRequest.cc +++ b/swas-open/src/model/ListDisksRequest.cc @@ -25,15 +25,6 @@ ListDisksRequest::ListDisksRequest() ListDisksRequest::~ListDisksRequest() {} -std::string ListDisksRequest::getDiskType() const { - return diskType_; -} - -void ListDisksRequest::setDiskType(const std::string &diskType) { - diskType_ = diskType; - setParameter(std::string("DiskType"), diskType); -} - int ListDisksRequest::getPageNumber() const { return pageNumber_; } @@ -43,13 +34,13 @@ void ListDisksRequest::setPageNumber(int pageNumber) { setParameter(std::string("PageNumber"), std::to_string(pageNumber)); } -std::string ListDisksRequest::getInstanceId() const { - return instanceId_; +std::string ListDisksRequest::getResourceGroupId() const { + return resourceGroupId_; } -void ListDisksRequest::setInstanceId(const std::string &instanceId) { - instanceId_ = instanceId; - setParameter(std::string("InstanceId"), instanceId); +void ListDisksRequest::setResourceGroupId(const std::string &resourceGroupId) { + resourceGroupId_ = resourceGroupId; + setParameter(std::string("ResourceGroupId"), resourceGroupId); } std::string ListDisksRequest::getRegionId() const { @@ -93,3 +84,21 @@ void ListDisksRequest::setTag(const std::vector &tag) { } } +std::string ListDisksRequest::getDiskType() const { + return diskType_; +} + +void ListDisksRequest::setDiskType(const std::string &diskType) { + diskType_ = diskType; + setParameter(std::string("DiskType"), diskType); +} + +std::string ListDisksRequest::getInstanceId() const { + return instanceId_; +} + +void ListDisksRequest::setInstanceId(const std::string &instanceId) { + instanceId_ = instanceId; + setParameter(std::string("InstanceId"), instanceId); +} + diff --git a/swas-open/src/model/ListDisksResult.cc b/swas-open/src/model/ListDisksResult.cc index 63a052def..e14c680ad 100644 --- a/swas-open/src/model/ListDisksResult.cc +++ b/swas-open/src/model/ListDisksResult.cc @@ -69,6 +69,8 @@ void ListDisksResult::parse(const std::string &payload) disksObject.remark = valueDisksDisk["Remark"].asString(); if(!valueDisksDisk["InstanceName"].isNull()) disksObject.instanceName = valueDisksDisk["InstanceName"].asString(); + if(!valueDisksDisk["ResourceGroupId"].isNull()) + disksObject.resourceGroupId = valueDisksDisk["ResourceGroupId"].asString(); auto allTagsNode = valueDisksDisk["Tags"]["tag"]; for (auto valueDisksDiskTagstag : allTagsNode) { diff --git a/swas-open/src/model/ListInstancesRequest.cc b/swas-open/src/model/ListInstancesRequest.cc index 36234eeac..7b86b7b2a 100644 --- a/swas-open/src/model/ListInstancesRequest.cc +++ b/swas-open/src/model/ListInstancesRequest.cc @@ -34,6 +34,15 @@ void ListInstancesRequest::setPageNumber(int pageNumber) { setParameter(std::string("PageNumber"), std::to_string(pageNumber)); } +std::string ListInstancesRequest::getResourceGroupId() const { + return resourceGroupId_; +} + +void ListInstancesRequest::setResourceGroupId(const std::string &resourceGroupId) { + resourceGroupId_ = resourceGroupId; + setParameter(std::string("ResourceGroupId"), resourceGroupId); +} + std::string ListInstancesRequest::getRegionId() const { return regionId_; } @@ -75,6 +84,15 @@ void ListInstancesRequest::setTag(const std::vector & } } +std::string ListInstancesRequest::getInstanceName() const { + return instanceName_; +} + +void ListInstancesRequest::setInstanceName(const std::string &instanceName) { + instanceName_ = instanceName; + setParameter(std::string("InstanceName"), instanceName); +} + std::string ListInstancesRequest::getInstanceIds() const { return instanceIds_; } diff --git a/swas-open/src/model/ListInstancesResult.cc b/swas-open/src/model/ListInstancesResult.cc index 5e99a0da6..fed72da36 100644 --- a/swas-open/src/model/ListInstancesResult.cc +++ b/swas-open/src/model/ListInstancesResult.cc @@ -77,6 +77,8 @@ void ListInstancesResult::parse(const std::string &payload) instancesObject.combinationInstanceId = valueInstancesInstance["CombinationInstanceId"].asString(); if(!valueInstancesInstance["Uuid"].isNull()) instancesObject.uuid = valueInstancesInstance["Uuid"].asString(); + if(!valueInstancesInstance["ResourceGroupId"].isNull()) + instancesObject.resourceGroupId = valueInstancesInstance["ResourceGroupId"].asString(); auto allTagsNode = valueInstancesInstance["Tags"]["tag"]; for (auto valueInstancesInstanceTagstag : allTagsNode) { @@ -113,6 +115,8 @@ void ListInstancesResult::parse(const std::string &payload) disksObject.regionId = valueInstancesInstanceDisksdisk["RegionId"].asString(); if(!valueInstancesInstanceDisksdisk["Remark"].isNull()) disksObject.remark = valueInstancesInstanceDisksdisk["Remark"].asString(); + if(!valueInstancesInstanceDisksdisk["ResourceGroupId"].isNull()) + disksObject.resourceGroupId = valueInstancesInstanceDisksdisk["ResourceGroupId"].asString(); auto allDiskTagsNode = valueInstancesInstanceDisksdisk["DiskTags"]["tag"]; for (auto valueInstancesInstanceDisksdiskDiskTagstag : allDiskTagsNode) { diff --git a/swas-open/src/model/ListKeyPairsRequest.cc b/swas-open/src/model/ListKeyPairsRequest.cc new file mode 100644 index 000000000..b9f956ed2 --- /dev/null +++ b/swas-open/src/model/ListKeyPairsRequest.cc @@ -0,0 +1,72 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::SWAS_OPEN::Model::ListKeyPairsRequest; + +ListKeyPairsRequest::ListKeyPairsRequest() + : RpcServiceRequest("swas-open", "2020-06-01", "ListKeyPairs") { + setMethod(HttpRequest::Method::Get); +} + +ListKeyPairsRequest::~ListKeyPairsRequest() {} + +std::string ListKeyPairsRequest::getClientToken() const { + return clientToken_; +} + +void ListKeyPairsRequest::setClientToken(const std::string &clientToken) { + clientToken_ = clientToken; + setParameter(std::string("ClientToken"), clientToken); +} + +std::string ListKeyPairsRequest::getKeyPairName() const { + return keyPairName_; +} + +void ListKeyPairsRequest::setKeyPairName(const std::string &keyPairName) { + keyPairName_ = keyPairName; + setParameter(std::string("KeyPairName"), keyPairName); +} + +int ListKeyPairsRequest::getPageNumber() const { + return pageNumber_; +} + +void ListKeyPairsRequest::setPageNumber(int pageNumber) { + pageNumber_ = pageNumber; + setParameter(std::string("PageNumber"), std::to_string(pageNumber)); +} + +std::string ListKeyPairsRequest::getRegionId() const { + return regionId_; +} + +void ListKeyPairsRequest::setRegionId(const std::string ®ionId) { + regionId_ = regionId; + setParameter(std::string("RegionId"), regionId); +} + +int ListKeyPairsRequest::getPageSize() const { + return pageSize_; +} + +void ListKeyPairsRequest::setPageSize(int pageSize) { + pageSize_ = pageSize; + setParameter(std::string("PageSize"), std::to_string(pageSize)); +} + diff --git a/swas-open/src/model/ListKeyPairsResult.cc b/swas-open/src/model/ListKeyPairsResult.cc new file mode 100644 index 000000000..dd704158d --- /dev/null +++ b/swas-open/src/model/ListKeyPairsResult.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 +#include + +using namespace AlibabaCloud::SWAS_OPEN; +using namespace AlibabaCloud::SWAS_OPEN::Model; + +ListKeyPairsResult::ListKeyPairsResult() : + ServiceResult() +{} + +ListKeyPairsResult::ListKeyPairsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListKeyPairsResult::~ListKeyPairsResult() +{} + +void ListKeyPairsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allKeyPairsNode = value["KeyPairs"]["KeyPair"]; + for (auto valueKeyPairsKeyPair : allKeyPairsNode) + { + KeyPair keyPairsObject; + if(!valueKeyPairsKeyPair["CreationTime"].isNull()) + keyPairsObject.creationTime = valueKeyPairsKeyPair["CreationTime"].asString(); + if(!valueKeyPairsKeyPair["KeyPairName"].isNull()) + keyPairsObject.keyPairName = valueKeyPairsKeyPair["KeyPairName"].asString(); + if(!valueKeyPairsKeyPair["PublicKey"].isNull()) + keyPairsObject.publicKey = valueKeyPairsKeyPair["PublicKey"].asString(); + auto allInstanceIds = value["InstanceIds"]["InstanceId"]; + for (auto value : allInstanceIds) + keyPairsObject.instanceIds.push_back(value.asString()); + keyPairs_.push_back(keyPairsObject); + } + 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 ListKeyPairsResult::getTotalCount()const +{ + return totalCount_; +} + +int ListKeyPairsResult::getPageSize()const +{ + return pageSize_; +} + +int ListKeyPairsResult::getPageNumber()const +{ + return pageNumber_; +} + +std::vector ListKeyPairsResult::getKeyPairs()const +{ + return keyPairs_; +} + diff --git a/swas-open/src/model/ListSnapshotsRequest.cc b/swas-open/src/model/ListSnapshotsRequest.cc index b1de336ff..634520542 100644 --- a/swas-open/src/model/ListSnapshotsRequest.cc +++ b/swas-open/src/model/ListSnapshotsRequest.cc @@ -43,6 +43,15 @@ void ListSnapshotsRequest::setPageNumber(int pageNumber) { setParameter(std::string("PageNumber"), std::to_string(pageNumber)); } +std::string ListSnapshotsRequest::getResourceGroupId() const { + return resourceGroupId_; +} + +void ListSnapshotsRequest::setResourceGroupId(const std::string &resourceGroupId) { + resourceGroupId_ = resourceGroupId; + setParameter(std::string("ResourceGroupId"), resourceGroupId); +} + std::string ListSnapshotsRequest::getRegionId() const { return regionId_; } diff --git a/swas-open/src/model/ListSnapshotsResult.cc b/swas-open/src/model/ListSnapshotsResult.cc index 1a5be4317..3d2679a63 100644 --- a/swas-open/src/model/ListSnapshotsResult.cc +++ b/swas-open/src/model/ListSnapshotsResult.cc @@ -65,6 +65,8 @@ void ListSnapshotsResult::parse(const std::string &payload) snapshotsObject.instanceId = valueSnapshotsSnapshot["InstanceId"].asString(); if(!valueSnapshotsSnapshot["RollbackTime"].isNull()) snapshotsObject.rollbackTime = valueSnapshotsSnapshot["RollbackTime"].asString(); + if(!valueSnapshotsSnapshot["ResourceGroupId"].isNull()) + snapshotsObject.resourceGroupId = valueSnapshotsSnapshot["ResourceGroupId"].asString(); auto allTagsNode = valueSnapshotsSnapshot["Tags"]["tag"]; for (auto valueSnapshotsSnapshotTagstag : allTagsNode) {