diff --git a/CHANGELOG b/CHANGELOG index cbe70241a..c195903fc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2021-11-02 Version: 1.36.918 +- Support multi language. + 2021-11-02 Version: 1.36.917 - Add API UploadStreamByURL. diff --git a/VERSION b/VERSION index 528cacc46..44c77ae45 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.917 \ No newline at end of file +1.36.918 \ No newline at end of file diff --git a/foas/CMakeLists.txt b/foas/CMakeLists.txt index 2027681c3..c4bf45490 100644 --- a/foas/CMakeLists.txt +++ b/foas/CMakeLists.txt @@ -93,8 +93,6 @@ set(foas_public_header_model include/alibabacloud/foas/model/GetInstanceResourceResult.h include/alibabacloud/foas/model/GetInstanceRunSummaryRequest.h include/alibabacloud/foas/model/GetInstanceRunSummaryResult.h - include/alibabacloud/foas/model/GetInstanceVertexTaskManagersRequest.h - include/alibabacloud/foas/model/GetInstanceVertexTaskManagersResult.h include/alibabacloud/foas/model/GetJobRequest.h include/alibabacloud/foas/model/GetJobResult.h include/alibabacloud/foas/model/GetJobLatestAutoScalePlanRequest.h @@ -123,6 +121,8 @@ set(foas_public_header_model include/alibabacloud/foas/model/ListProjectBindQueueResult.h include/alibabacloud/foas/model/ListProjectBindQueueResourceRequest.h include/alibabacloud/foas/model/ListProjectBindQueueResourceResult.h + include/alibabacloud/foas/model/ListTagResourcesRequest.h + include/alibabacloud/foas/model/ListTagResourcesResult.h include/alibabacloud/foas/model/MVFolderRequest.h include/alibabacloud/foas/model/MVFolderResult.h include/alibabacloud/foas/model/ModifyInstanceStateRequest.h @@ -135,14 +135,22 @@ set(foas_public_header_model include/alibabacloud/foas/model/ShrinkClusterResult.h include/alibabacloud/foas/model/StartJobRequest.h include/alibabacloud/foas/model/StartJobResult.h + include/alibabacloud/foas/model/TagResourcesRequest.h + include/alibabacloud/foas/model/TagResourcesResult.h include/alibabacloud/foas/model/UnbindQueueRequest.h include/alibabacloud/foas/model/UnbindQueueResult.h + include/alibabacloud/foas/model/UntagResourcesRequest.h + include/alibabacloud/foas/model/UntagResourcesResult.h include/alibabacloud/foas/model/UpdateAutoScaleConfigRequest.h include/alibabacloud/foas/model/UpdateAutoScaleConfigResult.h include/alibabacloud/foas/model/UpdateJobRequest.h include/alibabacloud/foas/model/UpdateJobResult.h include/alibabacloud/foas/model/UpdatePackageRequest.h include/alibabacloud/foas/model/UpdatePackageResult.h + include/alibabacloud/foas/model/UpdateProjectRequest.h + include/alibabacloud/foas/model/UpdateProjectResult.h + include/alibabacloud/foas/model/UpdateProjectConfigRequest.h + include/alibabacloud/foas/model/UpdateProjectConfigResult.h include/alibabacloud/foas/model/UpdateQueueRequest.h include/alibabacloud/foas/model/UpdateQueueResult.h include/alibabacloud/foas/model/ValidateJobRequest.h @@ -222,8 +230,6 @@ set(foas_src src/model/GetInstanceResourceResult.cc src/model/GetInstanceRunSummaryRequest.cc src/model/GetInstanceRunSummaryResult.cc - src/model/GetInstanceVertexTaskManagersRequest.cc - src/model/GetInstanceVertexTaskManagersResult.cc src/model/GetJobRequest.cc src/model/GetJobResult.cc src/model/GetJobLatestAutoScalePlanRequest.cc @@ -252,6 +258,8 @@ set(foas_src src/model/ListProjectBindQueueResult.cc src/model/ListProjectBindQueueResourceRequest.cc src/model/ListProjectBindQueueResourceResult.cc + src/model/ListTagResourcesRequest.cc + src/model/ListTagResourcesResult.cc src/model/MVFolderRequest.cc src/model/MVFolderResult.cc src/model/ModifyInstanceStateRequest.cc @@ -264,14 +272,22 @@ set(foas_src src/model/ShrinkClusterResult.cc src/model/StartJobRequest.cc src/model/StartJobResult.cc + src/model/TagResourcesRequest.cc + src/model/TagResourcesResult.cc src/model/UnbindQueueRequest.cc src/model/UnbindQueueResult.cc + src/model/UntagResourcesRequest.cc + src/model/UntagResourcesResult.cc src/model/UpdateAutoScaleConfigRequest.cc src/model/UpdateAutoScaleConfigResult.cc src/model/UpdateJobRequest.cc src/model/UpdateJobResult.cc src/model/UpdatePackageRequest.cc src/model/UpdatePackageResult.cc + src/model/UpdateProjectRequest.cc + src/model/UpdateProjectResult.cc + src/model/UpdateProjectConfigRequest.cc + src/model/UpdateProjectConfigResult.cc src/model/UpdateQueueRequest.cc src/model/UpdateQueueResult.cc src/model/ValidateJobRequest.cc diff --git a/foas/include/alibabacloud/foas/FoasClient.h b/foas/include/alibabacloud/foas/FoasClient.h index a6324adcf..0d14b369a 100644 --- a/foas/include/alibabacloud/foas/FoasClient.h +++ b/foas/include/alibabacloud/foas/FoasClient.h @@ -94,8 +94,6 @@ #include "model/GetInstanceResourceResult.h" #include "model/GetInstanceRunSummaryRequest.h" #include "model/GetInstanceRunSummaryResult.h" -#include "model/GetInstanceVertexTaskManagersRequest.h" -#include "model/GetInstanceVertexTaskManagersResult.h" #include "model/GetJobRequest.h" #include "model/GetJobResult.h" #include "model/GetJobLatestAutoScalePlanRequest.h" @@ -124,6 +122,8 @@ #include "model/ListProjectBindQueueResult.h" #include "model/ListProjectBindQueueResourceRequest.h" #include "model/ListProjectBindQueueResourceResult.h" +#include "model/ListTagResourcesRequest.h" +#include "model/ListTagResourcesResult.h" #include "model/MVFolderRequest.h" #include "model/MVFolderResult.h" #include "model/ModifyInstanceStateRequest.h" @@ -136,14 +136,22 @@ #include "model/ShrinkClusterResult.h" #include "model/StartJobRequest.h" #include "model/StartJobResult.h" +#include "model/TagResourcesRequest.h" +#include "model/TagResourcesResult.h" #include "model/UnbindQueueRequest.h" #include "model/UnbindQueueResult.h" +#include "model/UntagResourcesRequest.h" +#include "model/UntagResourcesResult.h" #include "model/UpdateAutoScaleConfigRequest.h" #include "model/UpdateAutoScaleConfigResult.h" #include "model/UpdateJobRequest.h" #include "model/UpdateJobResult.h" #include "model/UpdatePackageRequest.h" #include "model/UpdatePackageResult.h" +#include "model/UpdateProjectRequest.h" +#include "model/UpdateProjectResult.h" +#include "model/UpdateProjectConfigRequest.h" +#include "model/UpdateProjectConfigResult.h" #include "model/UpdateQueueRequest.h" #include "model/UpdateQueueResult.h" #include "model/ValidateJobRequest.h" @@ -265,9 +273,6 @@ namespace AlibabaCloud typedef Outcome GetInstanceRunSummaryOutcome; typedef std::future GetInstanceRunSummaryOutcomeCallable; typedef std::function&)> GetInstanceRunSummaryAsyncHandler; - typedef Outcome GetInstanceVertexTaskManagersOutcome; - typedef std::future GetInstanceVertexTaskManagersOutcomeCallable; - typedef std::function&)> GetInstanceVertexTaskManagersAsyncHandler; typedef Outcome GetJobOutcome; typedef std::future GetJobOutcomeCallable; typedef std::function&)> GetJobAsyncHandler; @@ -310,6 +315,9 @@ namespace AlibabaCloud typedef Outcome ListProjectBindQueueResourceOutcome; typedef std::future ListProjectBindQueueResourceOutcomeCallable; typedef std::function&)> ListProjectBindQueueResourceAsyncHandler; + typedef Outcome ListTagResourcesOutcome; + typedef std::future ListTagResourcesOutcomeCallable; + typedef std::function&)> ListTagResourcesAsyncHandler; typedef Outcome MVFolderOutcome; typedef std::future MVFolderOutcomeCallable; typedef std::function&)> MVFolderAsyncHandler; @@ -328,9 +336,15 @@ namespace AlibabaCloud typedef Outcome StartJobOutcome; typedef std::future StartJobOutcomeCallable; typedef std::function&)> StartJobAsyncHandler; + typedef Outcome TagResourcesOutcome; + typedef std::future TagResourcesOutcomeCallable; + typedef std::function&)> TagResourcesAsyncHandler; typedef Outcome UnbindQueueOutcome; typedef std::future UnbindQueueOutcomeCallable; typedef std::function&)> UnbindQueueAsyncHandler; + typedef Outcome UntagResourcesOutcome; + typedef std::future UntagResourcesOutcomeCallable; + typedef std::function&)> UntagResourcesAsyncHandler; typedef Outcome UpdateAutoScaleConfigOutcome; typedef std::future UpdateAutoScaleConfigOutcomeCallable; typedef std::function&)> UpdateAutoScaleConfigAsyncHandler; @@ -340,6 +354,12 @@ namespace AlibabaCloud typedef Outcome UpdatePackageOutcome; typedef std::future UpdatePackageOutcomeCallable; typedef std::function&)> UpdatePackageAsyncHandler; + typedef Outcome UpdateProjectOutcome; + typedef std::future UpdateProjectOutcomeCallable; + typedef std::function&)> UpdateProjectAsyncHandler; + typedef Outcome UpdateProjectConfigOutcome; + typedef std::future UpdateProjectConfigOutcomeCallable; + typedef std::function&)> UpdateProjectConfigAsyncHandler; typedef Outcome UpdateQueueOutcome; typedef std::future UpdateQueueOutcomeCallable; typedef std::function&)> UpdateQueueAsyncHandler; @@ -459,9 +479,6 @@ namespace AlibabaCloud GetInstanceRunSummaryOutcome getInstanceRunSummary(const Model::GetInstanceRunSummaryRequest &request)const; void getInstanceRunSummaryAsync(const Model::GetInstanceRunSummaryRequest& request, const GetInstanceRunSummaryAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetInstanceRunSummaryOutcomeCallable getInstanceRunSummaryCallable(const Model::GetInstanceRunSummaryRequest& request) const; - GetInstanceVertexTaskManagersOutcome getInstanceVertexTaskManagers(const Model::GetInstanceVertexTaskManagersRequest &request)const; - void getInstanceVertexTaskManagersAsync(const Model::GetInstanceVertexTaskManagersRequest& request, const GetInstanceVertexTaskManagersAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; - GetInstanceVertexTaskManagersOutcomeCallable getInstanceVertexTaskManagersCallable(const Model::GetInstanceVertexTaskManagersRequest& request) const; GetJobOutcome getJob(const Model::GetJobRequest &request)const; void getJobAsync(const Model::GetJobRequest& request, const GetJobAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetJobOutcomeCallable getJobCallable(const Model::GetJobRequest& request) const; @@ -504,6 +521,9 @@ namespace AlibabaCloud ListProjectBindQueueResourceOutcome listProjectBindQueueResource(const Model::ListProjectBindQueueResourceRequest &request)const; void listProjectBindQueueResourceAsync(const Model::ListProjectBindQueueResourceRequest& request, const ListProjectBindQueueResourceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListProjectBindQueueResourceOutcomeCallable listProjectBindQueueResourceCallable(const Model::ListProjectBindQueueResourceRequest& request) const; + ListTagResourcesOutcome listTagResources(const Model::ListTagResourcesRequest &request)const; + void listTagResourcesAsync(const Model::ListTagResourcesRequest& request, const ListTagResourcesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListTagResourcesOutcomeCallable listTagResourcesCallable(const Model::ListTagResourcesRequest& request) const; MVFolderOutcome mVFolder(const Model::MVFolderRequest &request)const; void mVFolderAsync(const Model::MVFolderRequest& request, const MVFolderAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; MVFolderOutcomeCallable mVFolderCallable(const Model::MVFolderRequest& request) const; @@ -522,9 +542,15 @@ namespace AlibabaCloud StartJobOutcome startJob(const Model::StartJobRequest &request)const; void startJobAsync(const Model::StartJobRequest& request, const StartJobAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; StartJobOutcomeCallable startJobCallable(const Model::StartJobRequest& request) const; + TagResourcesOutcome tagResources(const Model::TagResourcesRequest &request)const; + void tagResourcesAsync(const Model::TagResourcesRequest& request, const TagResourcesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + TagResourcesOutcomeCallable tagResourcesCallable(const Model::TagResourcesRequest& request) const; UnbindQueueOutcome unbindQueue(const Model::UnbindQueueRequest &request)const; void unbindQueueAsync(const Model::UnbindQueueRequest& request, const UnbindQueueAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; UnbindQueueOutcomeCallable unbindQueueCallable(const Model::UnbindQueueRequest& request) const; + UntagResourcesOutcome untagResources(const Model::UntagResourcesRequest &request)const; + void untagResourcesAsync(const Model::UntagResourcesRequest& request, const UntagResourcesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UntagResourcesOutcomeCallable untagResourcesCallable(const Model::UntagResourcesRequest& request) const; UpdateAutoScaleConfigOutcome updateAutoScaleConfig(const Model::UpdateAutoScaleConfigRequest &request)const; void updateAutoScaleConfigAsync(const Model::UpdateAutoScaleConfigRequest& request, const UpdateAutoScaleConfigAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; UpdateAutoScaleConfigOutcomeCallable updateAutoScaleConfigCallable(const Model::UpdateAutoScaleConfigRequest& request) const; @@ -534,6 +560,12 @@ namespace AlibabaCloud UpdatePackageOutcome updatePackage(const Model::UpdatePackageRequest &request)const; void updatePackageAsync(const Model::UpdatePackageRequest& request, const UpdatePackageAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; UpdatePackageOutcomeCallable updatePackageCallable(const Model::UpdatePackageRequest& request) const; + UpdateProjectOutcome updateProject(const Model::UpdateProjectRequest &request)const; + void updateProjectAsync(const Model::UpdateProjectRequest& request, const UpdateProjectAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UpdateProjectOutcomeCallable updateProjectCallable(const Model::UpdateProjectRequest& request) const; + UpdateProjectConfigOutcome updateProjectConfig(const Model::UpdateProjectConfigRequest &request)const; + void updateProjectConfigAsync(const Model::UpdateProjectConfigRequest& request, const UpdateProjectConfigAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UpdateProjectConfigOutcomeCallable updateProjectConfigCallable(const Model::UpdateProjectConfigRequest& request) const; UpdateQueueOutcome updateQueue(const Model::UpdateQueueRequest &request)const; void updateQueueAsync(const Model::UpdateQueueRequest& request, const UpdateQueueAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; UpdateQueueOutcomeCallable updateQueueCallable(const Model::UpdateQueueRequest& request) const; diff --git a/foas/include/alibabacloud/foas/model/CommitJobRequest.h b/foas/include/alibabacloud/foas/model/CommitJobRequest.h index 340272c41..616c178ce 100644 --- a/foas/include/alibabacloud/foas/model/CommitJobRequest.h +++ b/foas/include/alibabacloud/foas/model/CommitJobRequest.h @@ -30,6 +30,14 @@ namespace AlibabaCloud { class ALIBABACLOUD_FOAS_EXPORT CommitJobRequest : public RoaServiceRequest { + public: + struct suspendPeriodParam + { + std::string endTime; + std::string startTime; + std::string plan; + std::string policy; + }; public: CommitJobRequest(); @@ -37,8 +45,12 @@ namespace AlibabaCloud std::string getProjectName()const; void setProjectName(const std::string& projectName); + bool getRecommendOnly()const; + void setRecommendOnly(bool recommendOnly); std::string getRegionId()const; void setRegionId(const std::string& regionId); + std::string getSuspendPeriods()const; + void setSuspendPeriods(const std::string& suspendPeriods); float getMaxCU()const; void setMaxCU(float maxCU); std::string getConfigure()const; @@ -47,14 +59,19 @@ namespace AlibabaCloud void setIsOnOff(bool isOnOff); std::string getJobName()const; void setJobName(const std::string& jobName); + std::vector getSuspendPeriodParam()const; + void setSuspendPeriodParam(const std::vector& suspendPeriodParam); private: std::string projectName_; + bool recommendOnly_; std::string regionId_; + std::string suspendPeriods_; float maxCU_; std::string configure_; bool isOnOff_; std::string jobName_; + std::vector suspendPeriodParam_; }; } diff --git a/foas/include/alibabacloud/foas/model/GetClusterQueueInfoResult.h b/foas/include/alibabacloud/foas/model/GetClusterQueueInfoResult.h index e91e2b303..7308df5d7 100644 --- a/foas/include/alibabacloud/foas/model/GetClusterQueueInfoResult.h +++ b/foas/include/alibabacloud/foas/model/GetClusterQueueInfoResult.h @@ -36,6 +36,7 @@ namespace AlibabaCloud { int maxMem; int usedGpu; + std::string externalInfo; int usedMem; std::string clusterId; int minGpu; diff --git a/foas/include/alibabacloud/foas/model/GetInstanceResult.h b/foas/include/alibabacloud/foas/model/GetInstanceResult.h index 43735b5de..ff8609707 100644 --- a/foas/include/alibabacloud/foas/model/GetInstanceResult.h +++ b/foas/include/alibabacloud/foas/model/GetInstanceResult.h @@ -36,27 +36,29 @@ namespace AlibabaCloud { std::string lastErrorMessage; std::string expectState; - std::string engineVersion; long endTime; std::string projectName; - std::string clusterId; - std::string planJson; std::string jobName; - long startTime; std::string properties; std::string starter; long inputDelay; - std::string code; - std::string actualState; long lastErrorTime; - std::string engineJobHandler; - std::string jobType; std::string lastOperator; std::string packages; std::string apiType; + std::string queueName; + std::string engineVersion; + std::string clusterId; + int priority; + std::string planJson; + long startTime; + std::string code; + std::string actualState; + std::string engineJobHandler; + std::string jobType; + std::string autoScaleParams; long id; long lastOperateTime; - std::string queueName; }; diff --git a/foas/include/alibabacloud/foas/model/GetJobResult.h b/foas/include/alibabacloud/foas/model/GetJobResult.h index 7c319c17b..f40a75a18 100644 --- a/foas/include/alibabacloud/foas/model/GetJobResult.h +++ b/foas/include/alibabacloud/foas/model/GetJobResult.h @@ -50,6 +50,7 @@ namespace AlibabaCloud std::string packages; std::string apiType; bool isCommitted; + std::string fileId; std::string modifier; std::string queueName; std::string jobId; diff --git a/foas/include/alibabacloud/foas/model/GetPackageResult.h b/foas/include/alibabacloud/foas/model/GetPackageResult.h index 5d6bd3d7c..7feecffd5 100644 --- a/foas/include/alibabacloud/foas/model/GetPackageResult.h +++ b/foas/include/alibabacloud/foas/model/GetPackageResult.h @@ -35,17 +35,21 @@ namespace AlibabaCloud struct Package { long modifyTime; + std::string scanErrorMessage; std::string description; std::string projectName; std::string packageName; long createTime; std::string ossBucket; + std::string scanState; std::string creator; std::string originName; std::string type; std::string ossOwner; std::string ossEndpoint; + std::string scanLink; std::string ossPath; + std::string scanExtBizNo; std::string tag; std::string modifier; std::string md5; diff --git a/foas/include/alibabacloud/foas/model/GetProjectResult.h b/foas/include/alibabacloud/foas/model/GetProjectResult.h index b6ab6c1a8..634b9473c 100644 --- a/foas/include/alibabacloud/foas/model/GetProjectResult.h +++ b/foas/include/alibabacloud/foas/model/GetProjectResult.h @@ -39,13 +39,14 @@ namespace AlibabaCloud std::string managerIds; std::string description; std::string clusterId; - std::string state; long createTime; - std::string region; std::string creator; + std::string globalJobConfig; + std::string name; + std::string state; + std::string region; std::string id; std::string modifier; - std::string name; }; diff --git a/foas/include/alibabacloud/foas/model/GetRawPlanJsonRequest.h b/foas/include/alibabacloud/foas/model/GetRawPlanJsonRequest.h index 60bbb2897..7062689e0 100644 --- a/foas/include/alibabacloud/foas/model/GetRawPlanJsonRequest.h +++ b/foas/include/alibabacloud/foas/model/GetRawPlanJsonRequest.h @@ -43,6 +43,8 @@ namespace AlibabaCloud void setExpectedGB(float expectedGB); float getExpectedCore()const; void setExpectedCore(float expectedCore); + std::string getAdvisorAction()const; + void setAdvisorAction(const std::string& advisorAction); std::string getJobName()const; void setJobName(const std::string& jobName); bool getAutoconfEnable()const; @@ -53,6 +55,7 @@ namespace AlibabaCloud std::string regionId_; float expectedGB_; float expectedCore_; + std::string advisorAction_; std::string jobName_; bool autoconfEnable_; diff --git a/foas/include/alibabacloud/foas/model/ListInstanceResult.h b/foas/include/alibabacloud/foas/model/ListInstanceResult.h index f9dc9d5de..3e5a45840 100644 --- a/foas/include/alibabacloud/foas/model/ListInstanceResult.h +++ b/foas/include/alibabacloud/foas/model/ListInstanceResult.h @@ -40,6 +40,7 @@ namespace AlibabaCloud long endTime; std::string projectName; std::string clusterId; + int priority; std::string planJson; std::string jobName; long startTime; diff --git a/foas/include/alibabacloud/foas/model/ListPackageResult.h b/foas/include/alibabacloud/foas/model/ListPackageResult.h index 2dd2c345a..3ec2114fc 100644 --- a/foas/include/alibabacloud/foas/model/ListPackageResult.h +++ b/foas/include/alibabacloud/foas/model/ListPackageResult.h @@ -35,17 +35,21 @@ namespace AlibabaCloud struct Package { long modifyTime; + std::string scanErrorMessage; std::string description; std::string projectName; std::string packageName; long createTime; std::string ossBucket; + std::string scanState; std::string creator; std::string originName; std::string type; std::string ossOwner; std::string ossEndpoint; + std::string scanLink; std::string ossPath; + std::string scanExtBizNo; std::string tag; std::string modifier; std::string md5; diff --git a/foas/include/alibabacloud/foas/model/ListTagResourcesRequest.h b/foas/include/alibabacloud/foas/model/ListTagResourcesRequest.h new file mode 100644 index 000000000..33b49a91c --- /dev/null +++ b/foas/include/alibabacloud/foas/model/ListTagResourcesRequest.h @@ -0,0 +1,60 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_FOAS_MODEL_LISTTAGRESOURCESREQUEST_H_ +#define ALIBABACLOUD_FOAS_MODEL_LISTTAGRESOURCESREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Foas + { + namespace Model + { + class ALIBABACLOUD_FOAS_EXPORT ListTagResourcesRequest : public RoaServiceRequest + { + + public: + ListTagResourcesRequest(); + ~ListTagResourcesRequest(); + + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string getNextToken()const; + void setNextToken(const std::string& nextToken); + std::string getResourceType()const; + void setResourceType(const std::string& resourceType); + std::string getResourceIds()const; + void setResourceIds(const std::string& resourceIds); + std::string getTags()const; + void setTags(const std::string& tags); + + private: + std::string regionId_; + std::string nextToken_; + std::string resourceType_; + std::string resourceIds_; + std::string tags_; + + }; + } + } +} +#endif // !ALIBABACLOUD_FOAS_MODEL_LISTTAGRESOURCESREQUEST_H_ \ No newline at end of file diff --git a/foas/include/alibabacloud/foas/model/ListTagResourcesResult.h b/foas/include/alibabacloud/foas/model/ListTagResourcesResult.h new file mode 100644 index 000000000..392332e55 --- /dev/null +++ b/foas/include/alibabacloud/foas/model/ListTagResourcesResult.h @@ -0,0 +1,71 @@ +/* + * 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_FOAS_MODEL_LISTTAGRESOURCESRESULT_H_ +#define ALIBABACLOUD_FOAS_MODEL_LISTTAGRESOURCESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Foas + { + namespace Model + { + class ALIBABACLOUD_FOAS_EXPORT ListTagResourcesResult : public ServiceResult + { + public: + struct Data + { + struct TagResource + { + std::string resourceId; + std::string tagKey; + std::string resourceType; + std::string tagValue; + }; + std::string nextToken; + std::vector tagResources; + }; + + + ListTagResourcesResult(); + explicit ListTagResourcesResult(const std::string &payload); + ~ListTagResourcesResult(); + std::string getMessage()const; + int getHttpStatusCode()const; + Data getData()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + int httpStatusCode_; + Data data_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_FOAS_MODEL_LISTTAGRESOURCESRESULT_H_ \ No newline at end of file diff --git a/foas/include/alibabacloud/foas/model/ModifyInstanceStateRequest.h b/foas/include/alibabacloud/foas/model/ModifyInstanceStateRequest.h index b87b94acd..d5d62c73f 100644 --- a/foas/include/alibabacloud/foas/model/ModifyInstanceStateRequest.h +++ b/foas/include/alibabacloud/foas/model/ModifyInstanceStateRequest.h @@ -43,6 +43,8 @@ namespace AlibabaCloud void setInstanceId(long instanceId); std::string getRegionId()const; void setRegionId(const std::string& regionId); + bool getTriggerCheckpoint()const; + void setTriggerCheckpoint(bool triggerCheckpoint); std::string getExpectState()const; void setExpectState(const std::string& expectState); std::string getJobName()const; @@ -53,6 +55,7 @@ namespace AlibabaCloud std::string projectName_; long instanceId_; std::string regionId_; + bool triggerCheckpoint_; std::string expectState_; std::string jobName_; diff --git a/foas/include/alibabacloud/foas/model/TagResourcesRequest.h b/foas/include/alibabacloud/foas/model/TagResourcesRequest.h new file mode 100644 index 000000000..ba4fdc7ce --- /dev/null +++ b/foas/include/alibabacloud/foas/model/TagResourcesRequest.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_FOAS_MODEL_TAGRESOURCESREQUEST_H_ +#define ALIBABACLOUD_FOAS_MODEL_TAGRESOURCESREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Foas + { + namespace Model + { + class ALIBABACLOUD_FOAS_EXPORT TagResourcesRequest : public RoaServiceRequest + { + + public: + TagResourcesRequest(); + ~TagResourcesRequest(); + + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + + private: + std::string regionId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_FOAS_MODEL_TAGRESOURCESREQUEST_H_ \ No newline at end of file diff --git a/foas/include/alibabacloud/foas/model/TagResourcesResult.h b/foas/include/alibabacloud/foas/model/TagResourcesResult.h new file mode 100644 index 000000000..078afff49 --- /dev/null +++ b/foas/include/alibabacloud/foas/model/TagResourcesResult.h @@ -0,0 +1,59 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_FOAS_MODEL_TAGRESOURCESRESULT_H_ +#define ALIBABACLOUD_FOAS_MODEL_TAGRESOURCESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Foas + { + namespace Model + { + class ALIBABACLOUD_FOAS_EXPORT TagResourcesResult : public ServiceResult + { + public: + + + TagResourcesResult(); + explicit TagResourcesResult(const std::string &payload); + ~TagResourcesResult(); + std::string getMessage()const; + int getHttpStatusCode()const; + bool getData()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + int httpStatusCode_; + bool data_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_FOAS_MODEL_TAGRESOURCESRESULT_H_ \ No newline at end of file diff --git a/foas/include/alibabacloud/foas/model/UntagResourcesRequest.h b/foas/include/alibabacloud/foas/model/UntagResourcesRequest.h new file mode 100644 index 000000000..9dcf8a7f7 --- /dev/null +++ b/foas/include/alibabacloud/foas/model/UntagResourcesRequest.h @@ -0,0 +1,60 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_FOAS_MODEL_UNTAGRESOURCESREQUEST_H_ +#define ALIBABACLOUD_FOAS_MODEL_UNTAGRESOURCESREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Foas + { + namespace Model + { + class ALIBABACLOUD_FOAS_EXPORT UntagResourcesRequest : public RoaServiceRequest + { + + public: + UntagResourcesRequest(); + ~UntagResourcesRequest(); + + bool getAll()const; + void setAll(bool all); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string getTagKeys()const; + void setTagKeys(const std::string& tagKeys); + std::string getResourceType()const; + void setResourceType(const std::string& resourceType); + std::string getResourceIds()const; + void setResourceIds(const std::string& resourceIds); + + private: + bool all_; + std::string regionId_; + std::string tagKeys_; + std::string resourceType_; + std::string resourceIds_; + + }; + } + } +} +#endif // !ALIBABACLOUD_FOAS_MODEL_UNTAGRESOURCESREQUEST_H_ \ No newline at end of file diff --git a/foas/include/alibabacloud/foas/model/UntagResourcesResult.h b/foas/include/alibabacloud/foas/model/UntagResourcesResult.h new file mode 100644 index 000000000..38394d0d6 --- /dev/null +++ b/foas/include/alibabacloud/foas/model/UntagResourcesResult.h @@ -0,0 +1,59 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_FOAS_MODEL_UNTAGRESOURCESRESULT_H_ +#define ALIBABACLOUD_FOAS_MODEL_UNTAGRESOURCESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Foas + { + namespace Model + { + class ALIBABACLOUD_FOAS_EXPORT UntagResourcesResult : public ServiceResult + { + public: + + + UntagResourcesResult(); + explicit UntagResourcesResult(const std::string &payload); + ~UntagResourcesResult(); + std::string getMessage()const; + int getHttpStatusCode()const; + bool getData()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + int httpStatusCode_; + bool data_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_FOAS_MODEL_UNTAGRESOURCESRESULT_H_ \ No newline at end of file diff --git a/foas/include/alibabacloud/foas/model/UpdateProjectConfigRequest.h b/foas/include/alibabacloud/foas/model/UpdateProjectConfigRequest.h new file mode 100644 index 000000000..8ff9f26e0 --- /dev/null +++ b/foas/include/alibabacloud/foas/model/UpdateProjectConfigRequest.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_FOAS_MODEL_UPDATEPROJECTCONFIGREQUEST_H_ +#define ALIBABACLOUD_FOAS_MODEL_UPDATEPROJECTCONFIGREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Foas + { + namespace Model + { + class ALIBABACLOUD_FOAS_EXPORT UpdateProjectConfigRequest : public RoaServiceRequest + { + + public: + UpdateProjectConfigRequest(); + ~UpdateProjectConfigRequest(); + + std::string getProjectName()const; + void setProjectName(const std::string& projectName); + bool getIsOpenBatchSQL()const; + void setIsOpenBatchSQL(bool isOpenBatchSQL); + + private: + std::string projectName_; + bool isOpenBatchSQL_; + + }; + } + } +} +#endif // !ALIBABACLOUD_FOAS_MODEL_UPDATEPROJECTCONFIGREQUEST_H_ \ No newline at end of file diff --git a/foas/include/alibabacloud/foas/model/GetInstanceVertexTaskManagersResult.h b/foas/include/alibabacloud/foas/model/UpdateProjectConfigResult.h similarity index 63% rename from foas/include/alibabacloud/foas/model/GetInstanceVertexTaskManagersResult.h rename to foas/include/alibabacloud/foas/model/UpdateProjectConfigResult.h index 0521cf181..a0b9d9250 100644 --- a/foas/include/alibabacloud/foas/model/GetInstanceVertexTaskManagersResult.h +++ b/foas/include/alibabacloud/foas/model/UpdateProjectConfigResult.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ALIBABACLOUD_FOAS_MODEL_GETINSTANCEVERTEXTASKMANAGERSRESULT_H_ -#define ALIBABACLOUD_FOAS_MODEL_GETINSTANCEVERTEXTASKMANAGERSRESULT_H_ +#ifndef ALIBABACLOUD_FOAS_MODEL_UPDATEPROJECTCONFIGRESULT_H_ +#define ALIBABACLOUD_FOAS_MODEL_UPDATEPROJECTCONFIGRESULT_H_ #include #include @@ -29,23 +29,23 @@ namespace AlibabaCloud { namespace Model { - class ALIBABACLOUD_FOAS_EXPORT GetInstanceVertexTaskManagersResult : public ServiceResult + class ALIBABACLOUD_FOAS_EXPORT UpdateProjectConfigResult : public ServiceResult { public: - GetInstanceVertexTaskManagersResult(); - explicit GetInstanceVertexTaskManagersResult(const std::string &payload); - ~GetInstanceVertexTaskManagersResult(); - std::string getTaskManagers()const; + UpdateProjectConfigResult(); + explicit UpdateProjectConfigResult(const std::string &payload); + ~UpdateProjectConfigResult(); + bool getData()const; protected: void parse(const std::string &payload); private: - std::string taskManagers_; + bool data_; }; } } } -#endif // !ALIBABACLOUD_FOAS_MODEL_GETINSTANCEVERTEXTASKMANAGERSRESULT_H_ \ No newline at end of file +#endif // !ALIBABACLOUD_FOAS_MODEL_UPDATEPROJECTCONFIGRESULT_H_ \ No newline at end of file diff --git a/foas/include/alibabacloud/foas/model/GetInstanceVertexTaskManagersRequest.h b/foas/include/alibabacloud/foas/model/UpdateProjectRequest.h similarity index 60% rename from foas/include/alibabacloud/foas/model/GetInstanceVertexTaskManagersRequest.h rename to foas/include/alibabacloud/foas/model/UpdateProjectRequest.h index b4ea0e1bc..2bbec01f7 100644 --- a/foas/include/alibabacloud/foas/model/GetInstanceVertexTaskManagersRequest.h +++ b/foas/include/alibabacloud/foas/model/UpdateProjectRequest.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ALIBABACLOUD_FOAS_MODEL_GETINSTANCEVERTEXTASKMANAGERSREQUEST_H_ -#define ALIBABACLOUD_FOAS_MODEL_GETINSTANCEVERTEXTASKMANAGERSREQUEST_H_ +#ifndef ALIBABACLOUD_FOAS_MODEL_UPDATEPROJECTREQUEST_H_ +#define ALIBABACLOUD_FOAS_MODEL_UPDATEPROJECTREQUEST_H_ #include #include @@ -28,33 +28,27 @@ namespace AlibabaCloud { namespace Model { - class ALIBABACLOUD_FOAS_EXPORT GetInstanceVertexTaskManagersRequest : public RoaServiceRequest + class ALIBABACLOUD_FOAS_EXPORT UpdateProjectRequest : public RoaServiceRequest { public: - GetInstanceVertexTaskManagersRequest(); - ~GetInstanceVertexTaskManagersRequest(); + UpdateProjectRequest(); + ~UpdateProjectRequest(); std::string getProjectName()const; void setProjectName(const std::string& projectName); - long getInstanceId()const; - void setInstanceId(long instanceId); + std::string getGlobalJobConfig()const; + void setGlobalJobConfig(const std::string& globalJobConfig); std::string getRegionId()const; void setRegionId(const std::string& regionId); - std::string getVertexId()const; - void setVertexId(const std::string& vertexId); - std::string getJobName()const; - void setJobName(const std::string& jobName); private: std::string projectName_; - long instanceId_; + std::string globalJobConfig_; std::string regionId_; - std::string vertexId_; - std::string jobName_; }; } } } -#endif // !ALIBABACLOUD_FOAS_MODEL_GETINSTANCEVERTEXTASKMANAGERSREQUEST_H_ \ No newline at end of file +#endif // !ALIBABACLOUD_FOAS_MODEL_UPDATEPROJECTREQUEST_H_ \ No newline at end of file diff --git a/foas/include/alibabacloud/foas/model/UpdateProjectResult.h b/foas/include/alibabacloud/foas/model/UpdateProjectResult.h new file mode 100644 index 000000000..06008fca4 --- /dev/null +++ b/foas/include/alibabacloud/foas/model/UpdateProjectResult.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_FOAS_MODEL_UPDATEPROJECTRESULT_H_ +#define ALIBABACLOUD_FOAS_MODEL_UPDATEPROJECTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Foas + { + namespace Model + { + class ALIBABACLOUD_FOAS_EXPORT UpdateProjectResult : public ServiceResult + { + public: + + + UpdateProjectResult(); + explicit UpdateProjectResult(const std::string &payload); + ~UpdateProjectResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_FOAS_MODEL_UPDATEPROJECTRESULT_H_ \ No newline at end of file diff --git a/foas/src/FoasClient.cc b/foas/src/FoasClient.cc index 8785bb287..ae9faa186 100644 --- a/foas/src/FoasClient.cc +++ b/foas/src/FoasClient.cc @@ -1347,42 +1347,6 @@ FoasClient::GetInstanceRunSummaryOutcomeCallable FoasClient::getInstanceRunSumma return task->get_future(); } -FoasClient::GetInstanceVertexTaskManagersOutcome FoasClient::getInstanceVertexTaskManagers(const GetInstanceVertexTaskManagersRequest &request) const -{ - auto endpointOutcome = endpointProvider_->getEndpoint(); - if (!endpointOutcome.isSuccess()) - return GetInstanceVertexTaskManagersOutcome(endpointOutcome.error()); - - auto outcome = makeRequest(endpointOutcome.result(), request); - - if (outcome.isSuccess()) - return GetInstanceVertexTaskManagersOutcome(GetInstanceVertexTaskManagersResult(outcome.result())); - else - return GetInstanceVertexTaskManagersOutcome(outcome.error()); -} - -void FoasClient::getInstanceVertexTaskManagersAsync(const GetInstanceVertexTaskManagersRequest& request, const GetInstanceVertexTaskManagersAsyncHandler& handler, const std::shared_ptr& context) const -{ - auto fn = [this, request, handler, context]() - { - handler(this, request, getInstanceVertexTaskManagers(request), context); - }; - - asyncExecute(new Runnable(fn)); -} - -FoasClient::GetInstanceVertexTaskManagersOutcomeCallable FoasClient::getInstanceVertexTaskManagersCallable(const GetInstanceVertexTaskManagersRequest &request) const -{ - auto task = std::make_shared>( - [this, request]() - { - return this->getInstanceVertexTaskManagers(request); - }); - - asyncExecute(new Runnable([task]() { (*task)(); })); - return task->get_future(); -} - FoasClient::GetJobOutcome FoasClient::getJob(const GetJobRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -1887,6 +1851,42 @@ FoasClient::ListProjectBindQueueResourceOutcomeCallable FoasClient::listProjectB return task->get_future(); } +FoasClient::ListTagResourcesOutcome FoasClient::listTagResources(const ListTagResourcesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListTagResourcesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListTagResourcesOutcome(ListTagResourcesResult(outcome.result())); + else + return ListTagResourcesOutcome(outcome.error()); +} + +void FoasClient::listTagResourcesAsync(const ListTagResourcesRequest& request, const ListTagResourcesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listTagResources(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +FoasClient::ListTagResourcesOutcomeCallable FoasClient::listTagResourcesCallable(const ListTagResourcesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listTagResources(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + FoasClient::MVFolderOutcome FoasClient::mVFolder(const MVFolderRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -2103,6 +2103,42 @@ FoasClient::StartJobOutcomeCallable FoasClient::startJobCallable(const StartJobR return task->get_future(); } +FoasClient::TagResourcesOutcome FoasClient::tagResources(const TagResourcesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return TagResourcesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return TagResourcesOutcome(TagResourcesResult(outcome.result())); + else + return TagResourcesOutcome(outcome.error()); +} + +void FoasClient::tagResourcesAsync(const TagResourcesRequest& request, const TagResourcesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, tagResources(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +FoasClient::TagResourcesOutcomeCallable FoasClient::tagResourcesCallable(const TagResourcesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->tagResources(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + FoasClient::UnbindQueueOutcome FoasClient::unbindQueue(const UnbindQueueRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -2139,6 +2175,42 @@ FoasClient::UnbindQueueOutcomeCallable FoasClient::unbindQueueCallable(const Unb return task->get_future(); } +FoasClient::UntagResourcesOutcome FoasClient::untagResources(const UntagResourcesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UntagResourcesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UntagResourcesOutcome(UntagResourcesResult(outcome.result())); + else + return UntagResourcesOutcome(outcome.error()); +} + +void FoasClient::untagResourcesAsync(const UntagResourcesRequest& request, const UntagResourcesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, untagResources(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +FoasClient::UntagResourcesOutcomeCallable FoasClient::untagResourcesCallable(const UntagResourcesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->untagResources(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + FoasClient::UpdateAutoScaleConfigOutcome FoasClient::updateAutoScaleConfig(const UpdateAutoScaleConfigRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -2247,6 +2319,78 @@ FoasClient::UpdatePackageOutcomeCallable FoasClient::updatePackageCallable(const return task->get_future(); } +FoasClient::UpdateProjectOutcome FoasClient::updateProject(const UpdateProjectRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UpdateProjectOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UpdateProjectOutcome(UpdateProjectResult(outcome.result())); + else + return UpdateProjectOutcome(outcome.error()); +} + +void FoasClient::updateProjectAsync(const UpdateProjectRequest& request, const UpdateProjectAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, updateProject(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +FoasClient::UpdateProjectOutcomeCallable FoasClient::updateProjectCallable(const UpdateProjectRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->updateProject(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +FoasClient::UpdateProjectConfigOutcome FoasClient::updateProjectConfig(const UpdateProjectConfigRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UpdateProjectConfigOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UpdateProjectConfigOutcome(UpdateProjectConfigResult(outcome.result())); + else + return UpdateProjectConfigOutcome(outcome.error()); +} + +void FoasClient::updateProjectConfigAsync(const UpdateProjectConfigRequest& request, const UpdateProjectConfigAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, updateProjectConfig(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +FoasClient::UpdateProjectConfigOutcomeCallable FoasClient::updateProjectConfigCallable(const UpdateProjectConfigRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->updateProjectConfig(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + FoasClient::UpdateQueueOutcome FoasClient::updateQueue(const UpdateQueueRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/foas/src/model/CommitJobRequest.cc b/foas/src/model/CommitJobRequest.cc index 3e536848f..6694e4c2b 100644 --- a/foas/src/model/CommitJobRequest.cc +++ b/foas/src/model/CommitJobRequest.cc @@ -39,6 +39,17 @@ void CommitJobRequest::setProjectName(const std::string& projectName) setParameter("ProjectName", projectName); } +bool CommitJobRequest::getRecommendOnly()const +{ + return recommendOnly_; +} + +void CommitJobRequest::setRecommendOnly(bool recommendOnly) +{ + recommendOnly_ = recommendOnly; + setBodyParameter("RecommendOnly", recommendOnly ? "true" : "false"); +} + std::string CommitJobRequest::getRegionId()const { return regionId_; @@ -50,6 +61,17 @@ void CommitJobRequest::setRegionId(const std::string& regionId) setHeader("RegionId", regionId); } +std::string CommitJobRequest::getSuspendPeriods()const +{ + return suspendPeriods_; +} + +void CommitJobRequest::setSuspendPeriods(const std::string& suspendPeriods) +{ + suspendPeriods_ = suspendPeriods; + setBodyParameter("SuspendPeriods", suspendPeriods); +} + float CommitJobRequest::getMaxCU()const { return maxCU_; @@ -94,3 +116,21 @@ void CommitJobRequest::setJobName(const std::string& jobName) setParameter("JobName", jobName); } +std::vector CommitJobRequest::getSuspendPeriodParam()const +{ + return suspendPeriodParam_; +} + +void CommitJobRequest::setSuspendPeriodParam(const std::vector& suspendPeriodParam) +{ + suspendPeriodParam_ = suspendPeriodParam; + for(int dep1 = 0; dep1!= suspendPeriodParam.size(); dep1++) { + auto suspendPeriodParamObj = suspendPeriodParam.at(dep1); + std::string suspendPeriodParamObjStr = "suspendPeriodParam." + std::to_string(dep1 + 1); + setParameter(suspendPeriodParamObjStr + ".EndTime", suspendPeriodParamObj.endTime); + setParameter(suspendPeriodParamObjStr + ".StartTime", suspendPeriodParamObj.startTime); + setParameter(suspendPeriodParamObjStr + ".Plan", suspendPeriodParamObj.plan); + setParameter(suspendPeriodParamObjStr + ".Policy", suspendPeriodParamObj.policy); + } +} + diff --git a/foas/src/model/GetClusterQueueInfoResult.cc b/foas/src/model/GetClusterQueueInfoResult.cc index c0774ade5..8f33ba60f 100644 --- a/foas/src/model/GetClusterQueueInfoResult.cc +++ b/foas/src/model/GetClusterQueueInfoResult.cc @@ -65,6 +65,8 @@ void GetClusterQueueInfoResult::parse(const std::string &payload) queuesObject.maxVCore = std::stoi(valueQueuesQueue["MaxVCore"].asString()); if(!valueQueuesQueue["MaxMem"].isNull()) queuesObject.maxMem = std::stoi(valueQueuesQueue["MaxMem"].asString()); + if(!valueQueuesQueue["ExternalInfo"].isNull()) + queuesObject.externalInfo = valueQueuesQueue["ExternalInfo"].asString(); queues_.push_back(queuesObject); } diff --git a/foas/src/model/GetInstanceResult.cc b/foas/src/model/GetInstanceResult.cc index ab7f48862..7e6ed1dfa 100644 --- a/foas/src/model/GetInstanceResult.cc +++ b/foas/src/model/GetInstanceResult.cc @@ -86,6 +86,10 @@ void GetInstanceResult::parse(const std::string &payload) instance_.queueName = instanceNode["QueueName"].asString(); if(!instanceNode["EndTime"].isNull()) instance_.endTime = std::stol(instanceNode["EndTime"].asString()); + if(!instanceNode["AutoScaleParams"].isNull()) + instance_.autoScaleParams = instanceNode["AutoScaleParams"].asString(); + if(!instanceNode["Priority"].isNull()) + instance_.priority = std::stoi(instanceNode["Priority"].asString()); } diff --git a/foas/src/model/GetInstanceVertexTaskManagersRequest.cc b/foas/src/model/GetInstanceVertexTaskManagersRequest.cc deleted file mode 100644 index 23e9527df..000000000 --- a/foas/src/model/GetInstanceVertexTaskManagersRequest.cc +++ /dev/null @@ -1,82 +0,0 @@ -/* - * 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::Foas::Model::GetInstanceVertexTaskManagersRequest; - -GetInstanceVertexTaskManagersRequest::GetInstanceVertexTaskManagersRequest() : - RoaServiceRequest("foas", "2018-11-11") -{} - -GetInstanceVertexTaskManagersRequest::~GetInstanceVertexTaskManagersRequest() -{} - -std::string GetInstanceVertexTaskManagersRequest::getProjectName()const -{ - return projectName_; -} - -void GetInstanceVertexTaskManagersRequest::setProjectName(const std::string& projectName) -{ - projectName_ = projectName; - setCoreParameter("ProjectName", projectName); -} - -long GetInstanceVertexTaskManagersRequest::getInstanceId()const -{ - return instanceId_; -} - -void GetInstanceVertexTaskManagersRequest::setInstanceId(long instanceId) -{ - instanceId_ = instanceId; - setCoreParameter("InstanceId", std::to_string(instanceId)); -} - -std::string GetInstanceVertexTaskManagersRequest::getRegionId()const -{ - return regionId_; -} - -void GetInstanceVertexTaskManagersRequest::setRegionId(const std::string& regionId) -{ - regionId_ = regionId; - setCoreParameter("RegionId", regionId); -} - -std::string GetInstanceVertexTaskManagersRequest::getVertexId()const -{ - return vertexId_; -} - -void GetInstanceVertexTaskManagersRequest::setVertexId(const std::string& vertexId) -{ - vertexId_ = vertexId; - setCoreParameter("VertexId", vertexId); -} - -std::string GetInstanceVertexTaskManagersRequest::getJobName()const -{ - return jobName_; -} - -void GetInstanceVertexTaskManagersRequest::setJobName(const std::string& jobName) -{ - jobName_ = jobName; - setCoreParameter("JobName", jobName); -} - diff --git a/foas/src/model/GetJobResult.cc b/foas/src/model/GetJobResult.cc index 58560e35d..e76f109dd 100644 --- a/foas/src/model/GetJobResult.cc +++ b/foas/src/model/GetJobResult.cc @@ -78,6 +78,8 @@ void GetJobResult::parse(const std::string &payload) job_.folderId = std::stol(jobNode["FolderId"].asString()); if(!jobNode["JobId"].isNull()) job_.jobId = jobNode["JobId"].asString(); + if(!jobNode["FileId"].isNull()) + job_.fileId = jobNode["FileId"].asString(); } diff --git a/foas/src/model/GetPackageResult.cc b/foas/src/model/GetPackageResult.cc index a3802f668..5a0188fab 100644 --- a/foas/src/model/GetPackageResult.cc +++ b/foas/src/model/GetPackageResult.cc @@ -70,6 +70,14 @@ void GetPackageResult::parse(const std::string &payload) package_.ossPath = packageNode["OssPath"].asString(); if(!packageNode["Tag"].isNull()) package_.tag = packageNode["Tag"].asString(); + if(!packageNode["ScanLink"].isNull()) + package_.scanLink = packageNode["ScanLink"].asString(); + if(!packageNode["ScanState"].isNull()) + package_.scanState = packageNode["ScanState"].asString(); + if(!packageNode["ScanErrorMessage"].isNull()) + package_.scanErrorMessage = packageNode["ScanErrorMessage"].asString(); + if(!packageNode["ScanExtBizNo"].isNull()) + package_.scanExtBizNo = packageNode["ScanExtBizNo"].asString(); } diff --git a/foas/src/model/GetProjectResult.cc b/foas/src/model/GetProjectResult.cc index 796115a11..bdf57388c 100644 --- a/foas/src/model/GetProjectResult.cc +++ b/foas/src/model/GetProjectResult.cc @@ -64,6 +64,8 @@ void GetProjectResult::parse(const std::string &payload) project_.region = projectNode["Region"].asString(); if(!projectNode["Id"].isNull()) project_.id = projectNode["Id"].asString(); + if(!projectNode["GlobalJobConfig"].isNull()) + project_.globalJobConfig = projectNode["GlobalJobConfig"].asString(); } diff --git a/foas/src/model/GetRawPlanJsonRequest.cc b/foas/src/model/GetRawPlanJsonRequest.cc index 89eb6a4b3..bcd76addb 100644 --- a/foas/src/model/GetRawPlanJsonRequest.cc +++ b/foas/src/model/GetRawPlanJsonRequest.cc @@ -72,6 +72,17 @@ void GetRawPlanJsonRequest::setExpectedCore(float expectedCore) setParameter("ExpectedCore", std::to_string(expectedCore)); } +std::string GetRawPlanJsonRequest::getAdvisorAction()const +{ + return advisorAction_; +} + +void GetRawPlanJsonRequest::setAdvisorAction(const std::string& advisorAction) +{ + advisorAction_ = advisorAction; + setParameter("AdvisorAction", advisorAction); +} + std::string GetRawPlanJsonRequest::getJobName()const { return jobName_; diff --git a/foas/src/model/ListInstanceResult.cc b/foas/src/model/ListInstanceResult.cc index f7029074a..6d30edc76 100644 --- a/foas/src/model/ListInstanceResult.cc +++ b/foas/src/model/ListInstanceResult.cc @@ -89,6 +89,8 @@ void ListInstanceResult::parse(const std::string &payload) instancesObject.queueName = valueInstancesInstance["QueueName"].asString(); if(!valueInstancesInstance["EndTime"].isNull()) instancesObject.endTime = std::stol(valueInstancesInstance["EndTime"].asString()); + if(!valueInstancesInstance["Priority"].isNull()) + instancesObject.priority = std::stoi(valueInstancesInstance["Priority"].asString()); instances_.push_back(instancesObject); } if(!value["PageIndex"].isNull()) diff --git a/foas/src/model/ListPackageResult.cc b/foas/src/model/ListPackageResult.cc index d25547241..9734080c4 100644 --- a/foas/src/model/ListPackageResult.cc +++ b/foas/src/model/ListPackageResult.cc @@ -73,6 +73,14 @@ void ListPackageResult::parse(const std::string &payload) packagesObject.ossPath = valuePackagesPackage["OssPath"].asString(); if(!valuePackagesPackage["Tag"].isNull()) packagesObject.tag = valuePackagesPackage["Tag"].asString(); + if(!valuePackagesPackage["ScanState"].isNull()) + packagesObject.scanState = valuePackagesPackage["ScanState"].asString(); + if(!valuePackagesPackage["ScanLink"].isNull()) + packagesObject.scanLink = valuePackagesPackage["ScanLink"].asString(); + if(!valuePackagesPackage["ScanExtBizNo"].isNull()) + packagesObject.scanExtBizNo = valuePackagesPackage["ScanExtBizNo"].asString(); + if(!valuePackagesPackage["ScanErrorMessage"].isNull()) + packagesObject.scanErrorMessage = valuePackagesPackage["ScanErrorMessage"].asString(); packages_.push_back(packagesObject); } if(!value["PageIndex"].isNull()) diff --git a/foas/src/model/ListTagResourcesRequest.cc b/foas/src/model/ListTagResourcesRequest.cc new file mode 100644 index 000000000..86638110b --- /dev/null +++ b/foas/src/model/ListTagResourcesRequest.cc @@ -0,0 +1,85 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Foas::Model::ListTagResourcesRequest; + +ListTagResourcesRequest::ListTagResourcesRequest() : + RoaServiceRequest("foas", "2018-11-11") +{ + setResourcePath("/api/v2/cluster/tags"); + setMethod(HttpRequest::Method::Get); +} + +ListTagResourcesRequest::~ListTagResourcesRequest() +{} + +std::string ListTagResourcesRequest::getRegionId()const +{ + return regionId_; +} + +void ListTagResourcesRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setHeader("RegionId", regionId); +} + +std::string ListTagResourcesRequest::getNextToken()const +{ + return nextToken_; +} + +void ListTagResourcesRequest::setNextToken(const std::string& nextToken) +{ + nextToken_ = nextToken; + setParameter("NextToken", nextToken); +} + +std::string ListTagResourcesRequest::getResourceType()const +{ + return resourceType_; +} + +void ListTagResourcesRequest::setResourceType(const std::string& resourceType) +{ + resourceType_ = resourceType; + setParameter("ResourceType", resourceType); +} + +std::string ListTagResourcesRequest::getResourceIds()const +{ + return resourceIds_; +} + +void ListTagResourcesRequest::setResourceIds(const std::string& resourceIds) +{ + resourceIds_ = resourceIds; + setParameter("ResourceIds", resourceIds); +} + +std::string ListTagResourcesRequest::getTags()const +{ + return tags_; +} + +void ListTagResourcesRequest::setTags(const std::string& tags) +{ + tags_ = tags; + setParameter("Tags", tags); +} + diff --git a/foas/src/model/ListTagResourcesResult.cc b/foas/src/model/ListTagResourcesResult.cc new file mode 100644 index 000000000..2962b0733 --- /dev/null +++ b/foas/src/model/ListTagResourcesResult.cc @@ -0,0 +1,94 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Foas; +using namespace AlibabaCloud::Foas::Model; + +ListTagResourcesResult::ListTagResourcesResult() : + ServiceResult() +{} + +ListTagResourcesResult::ListTagResourcesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListTagResourcesResult::~ListTagResourcesResult() +{} + +void ListTagResourcesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + if(!dataNode["NextToken"].isNull()) + data_.nextToken = dataNode["NextToken"].asString(); + auto allTagResourcesNode = dataNode["TagResources"]["TagResource"]; + for (auto dataNodeTagResourcesTagResource : allTagResourcesNode) + { + Data::TagResource tagResourceObject; + if(!dataNodeTagResourcesTagResource["ResourceType"].isNull()) + tagResourceObject.resourceType = dataNodeTagResourcesTagResource["ResourceType"].asString(); + if(!dataNodeTagResourcesTagResource["TagKey"].isNull()) + tagResourceObject.tagKey = dataNodeTagResourcesTagResource["TagKey"].asString(); + if(!dataNodeTagResourcesTagResource["TagValue"].isNull()) + tagResourceObject.tagValue = dataNodeTagResourcesTagResource["TagValue"].asString(); + if(!dataNodeTagResourcesTagResource["ResourceId"].isNull()) + tagResourceObject.resourceId = dataNodeTagResourcesTagResource["ResourceId"].asString(); + data_.tagResources.push_back(tagResourceObject); + } + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["HttpStatusCode"].isNull()) + httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString()); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string ListTagResourcesResult::getMessage()const +{ + return message_; +} + +int ListTagResourcesResult::getHttpStatusCode()const +{ + return httpStatusCode_; +} + +ListTagResourcesResult::Data ListTagResourcesResult::getData()const +{ + return data_; +} + +std::string ListTagResourcesResult::getCode()const +{ + return code_; +} + +bool ListTagResourcesResult::getSuccess()const +{ + return success_; +} + diff --git a/foas/src/model/ModifyInstanceStateRequest.cc b/foas/src/model/ModifyInstanceStateRequest.cc index 21113e269..c8ee8b428 100644 --- a/foas/src/model/ModifyInstanceStateRequest.cc +++ b/foas/src/model/ModifyInstanceStateRequest.cc @@ -72,6 +72,17 @@ void ModifyInstanceStateRequest::setRegionId(const std::string& regionId) setHeader("RegionId", regionId); } +bool ModifyInstanceStateRequest::getTriggerCheckpoint()const +{ + return triggerCheckpoint_; +} + +void ModifyInstanceStateRequest::setTriggerCheckpoint(bool triggerCheckpoint) +{ + triggerCheckpoint_ = triggerCheckpoint; + setBodyParameter("TriggerCheckpoint", triggerCheckpoint ? "true" : "false"); +} + std::string ModifyInstanceStateRequest::getExpectState()const { return expectState_; diff --git a/foas/src/model/TagResourcesRequest.cc b/foas/src/model/TagResourcesRequest.cc new file mode 100644 index 000000000..a7d6c1725 --- /dev/null +++ b/foas/src/model/TagResourcesRequest.cc @@ -0,0 +1,41 @@ +/* + * 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::Foas::Model::TagResourcesRequest; + +TagResourcesRequest::TagResourcesRequest() : + RoaServiceRequest("foas", "2018-11-11") +{ + setResourcePath("/api/v2/cluster/tags"); + setMethod(HttpRequest::Method::Post); +} + +TagResourcesRequest::~TagResourcesRequest() +{} + +std::string TagResourcesRequest::getRegionId()const +{ + return regionId_; +} + +void TagResourcesRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setHeader("RegionId", regionId); +} + diff --git a/foas/src/model/TagResourcesResult.cc b/foas/src/model/TagResourcesResult.cc new file mode 100644 index 000000000..e0ee3240c --- /dev/null +++ b/foas/src/model/TagResourcesResult.cc @@ -0,0 +1,79 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Foas; +using namespace AlibabaCloud::Foas::Model; + +TagResourcesResult::TagResourcesResult() : + ServiceResult() +{} + +TagResourcesResult::TagResourcesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +TagResourcesResult::~TagResourcesResult() +{} + +void TagResourcesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["HttpStatusCode"].isNull()) + httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString()); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + if(!value["Data"].isNull()) + data_ = value["Data"].asString() == "true"; + +} + +std::string TagResourcesResult::getMessage()const +{ + return message_; +} + +int TagResourcesResult::getHttpStatusCode()const +{ + return httpStatusCode_; +} + +bool TagResourcesResult::getData()const +{ + return data_; +} + +std::string TagResourcesResult::getCode()const +{ + return code_; +} + +bool TagResourcesResult::getSuccess()const +{ + return success_; +} + diff --git a/foas/src/model/UntagResourcesRequest.cc b/foas/src/model/UntagResourcesRequest.cc new file mode 100644 index 000000000..f75e7650c --- /dev/null +++ b/foas/src/model/UntagResourcesRequest.cc @@ -0,0 +1,85 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Foas::Model::UntagResourcesRequest; + +UntagResourcesRequest::UntagResourcesRequest() : + RoaServiceRequest("foas", "2018-11-11") +{ + setResourcePath("/api/v2/cluster/tags"); + setMethod(HttpRequest::Method::Delete); +} + +UntagResourcesRequest::~UntagResourcesRequest() +{} + +bool UntagResourcesRequest::getAll()const +{ + return all_; +} + +void UntagResourcesRequest::setAll(bool all) +{ + all_ = all; + setParameter("All", all ? "true" : "false"); +} + +std::string UntagResourcesRequest::getRegionId()const +{ + return regionId_; +} + +void UntagResourcesRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setHeader("RegionId", regionId); +} + +std::string UntagResourcesRequest::getTagKeys()const +{ + return tagKeys_; +} + +void UntagResourcesRequest::setTagKeys(const std::string& tagKeys) +{ + tagKeys_ = tagKeys; + setParameter("TagKeys", tagKeys); +} + +std::string UntagResourcesRequest::getResourceType()const +{ + return resourceType_; +} + +void UntagResourcesRequest::setResourceType(const std::string& resourceType) +{ + resourceType_ = resourceType; + setParameter("ResourceType", resourceType); +} + +std::string UntagResourcesRequest::getResourceIds()const +{ + return resourceIds_; +} + +void UntagResourcesRequest::setResourceIds(const std::string& resourceIds) +{ + resourceIds_ = resourceIds; + setParameter("ResourceIds", resourceIds); +} + diff --git a/foas/src/model/UntagResourcesResult.cc b/foas/src/model/UntagResourcesResult.cc new file mode 100644 index 000000000..00508357c --- /dev/null +++ b/foas/src/model/UntagResourcesResult.cc @@ -0,0 +1,79 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Foas; +using namespace AlibabaCloud::Foas::Model; + +UntagResourcesResult::UntagResourcesResult() : + ServiceResult() +{} + +UntagResourcesResult::UntagResourcesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UntagResourcesResult::~UntagResourcesResult() +{} + +void UntagResourcesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["HttpStatusCode"].isNull()) + httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString()); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + if(!value["Data"].isNull()) + data_ = value["Data"].asString() == "true"; + +} + +std::string UntagResourcesResult::getMessage()const +{ + return message_; +} + +int UntagResourcesResult::getHttpStatusCode()const +{ + return httpStatusCode_; +} + +bool UntagResourcesResult::getData()const +{ + return data_; +} + +std::string UntagResourcesResult::getCode()const +{ + return code_; +} + +bool UntagResourcesResult::getSuccess()const +{ + return success_; +} + diff --git a/foas/src/model/UpdateProjectConfigRequest.cc b/foas/src/model/UpdateProjectConfigRequest.cc new file mode 100644 index 000000000..84219bfd4 --- /dev/null +++ b/foas/src/model/UpdateProjectConfigRequest.cc @@ -0,0 +1,52 @@ +/* + * 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::Foas::Model::UpdateProjectConfigRequest; + +UpdateProjectConfigRequest::UpdateProjectConfigRequest() : + RoaServiceRequest("foas", "2018-11-11") +{ + setResourcePath("/api/v2/project/config"); + setMethod(HttpRequest::Method::Put); +} + +UpdateProjectConfigRequest::~UpdateProjectConfigRequest() +{} + +std::string UpdateProjectConfigRequest::getProjectName()const +{ + return projectName_; +} + +void UpdateProjectConfigRequest::setProjectName(const std::string& projectName) +{ + projectName_ = projectName; + setParameter("ProjectName", projectName); +} + +bool UpdateProjectConfigRequest::getIsOpenBatchSQL()const +{ + return isOpenBatchSQL_; +} + +void UpdateProjectConfigRequest::setIsOpenBatchSQL(bool isOpenBatchSQL) +{ + isOpenBatchSQL_ = isOpenBatchSQL; + setParameter("IsOpenBatchSQL", isOpenBatchSQL ? "true" : "false"); +} + diff --git a/foas/src/model/GetInstanceVertexTaskManagersResult.cc b/foas/src/model/UpdateProjectConfigResult.cc similarity index 61% rename from foas/src/model/GetInstanceVertexTaskManagersResult.cc rename to foas/src/model/UpdateProjectConfigResult.cc index 0d81dd38d..548f6eb78 100644 --- a/foas/src/model/GetInstanceVertexTaskManagersResult.cc +++ b/foas/src/model/UpdateProjectConfigResult.cc @@ -14,38 +14,38 @@ * limitations under the License. */ -#include +#include #include using namespace AlibabaCloud::Foas; using namespace AlibabaCloud::Foas::Model; -GetInstanceVertexTaskManagersResult::GetInstanceVertexTaskManagersResult() : +UpdateProjectConfigResult::UpdateProjectConfigResult() : ServiceResult() {} -GetInstanceVertexTaskManagersResult::GetInstanceVertexTaskManagersResult(const std::string &payload) : +UpdateProjectConfigResult::UpdateProjectConfigResult(const std::string &payload) : ServiceResult() { parse(payload); } -GetInstanceVertexTaskManagersResult::~GetInstanceVertexTaskManagersResult() +UpdateProjectConfigResult::~UpdateProjectConfigResult() {} -void GetInstanceVertexTaskManagersResult::parse(const std::string &payload) +void UpdateProjectConfigResult::parse(const std::string &payload) { Json::Reader reader; Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); - if(!value["TaskManagers"].isNull()) - taskManagers_ = value["TaskManagers"].asString(); + if(!value["Data"].isNull()) + data_ = value["Data"].asString() == "true"; } -std::string GetInstanceVertexTaskManagersResult::getTaskManagers()const +bool UpdateProjectConfigResult::getData()const { - return taskManagers_; + return data_; } diff --git a/foas/src/model/UpdateProjectRequest.cc b/foas/src/model/UpdateProjectRequest.cc new file mode 100644 index 000000000..6a3932117 --- /dev/null +++ b/foas/src/model/UpdateProjectRequest.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::Foas::Model::UpdateProjectRequest; + +UpdateProjectRequest::UpdateProjectRequest() : + RoaServiceRequest("foas", "2018-11-11") +{ + setResourcePath("/api/v2/projects/[projectName]"); + setMethod(HttpRequest::Method::Put); +} + +UpdateProjectRequest::~UpdateProjectRequest() +{} + +std::string UpdateProjectRequest::getProjectName()const +{ + return projectName_; +} + +void UpdateProjectRequest::setProjectName(const std::string& projectName) +{ + projectName_ = projectName; + setParameter("ProjectName", projectName); +} + +std::string UpdateProjectRequest::getGlobalJobConfig()const +{ + return globalJobConfig_; +} + +void UpdateProjectRequest::setGlobalJobConfig(const std::string& globalJobConfig) +{ + globalJobConfig_ = globalJobConfig; + setBodyParameter("GlobalJobConfig", globalJobConfig); +} + +std::string UpdateProjectRequest::getRegionId()const +{ + return regionId_; +} + +void UpdateProjectRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setHeader("RegionId", regionId); +} + diff --git a/foas/src/model/UpdateProjectResult.cc b/foas/src/model/UpdateProjectResult.cc new file mode 100644 index 000000000..ffbd42436 --- /dev/null +++ b/foas/src/model/UpdateProjectResult.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::Foas; +using namespace AlibabaCloud::Foas::Model; + +UpdateProjectResult::UpdateProjectResult() : + ServiceResult() +{} + +UpdateProjectResult::UpdateProjectResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UpdateProjectResult::~UpdateProjectResult() +{} + +void UpdateProjectResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} +