From 7bde7a21f4c49dbe0c0a72c02acef6b764da47c1 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 23 Feb 2021 02:22:22 +0000 Subject: [PATCH] Supported List Namespaces. --- CHANGELOG | 5 + schedulerx2/CMakeLists.txt | 24 ++ .../schedulerx2/Schedulerx2Client.h | 48 ++++ .../model/BatchDeleteJobsRequest.h | 60 +++++ .../schedulerx2/model/BatchDeleteJobsResult.h | 55 +++++ .../model/BatchDisableJobsRequest.h | 60 +++++ .../model/BatchDisableJobsResult.h | 55 +++++ .../model/BatchEnableJobsRequest.h | 60 +++++ .../schedulerx2/model/BatchEnableJobsResult.h | 55 +++++ .../schedulerx2/model/CreateAppGroupRequest.h | 3 + .../schedulerx2/model/CreateJobRequest.h | 3 + .../schedulerx2/model/DeleteJobRequest.h | 3 + .../schedulerx2/model/DeleteWorkflowRequest.h | 3 + .../schedulerx2/model/DisableJobRequest.h | 3 + .../model/DisableWorkflowRequest.h | 3 + .../schedulerx2/model/EnableJobRequest.h | 3 + .../schedulerx2/model/EnableWorkflowRequest.h | 3 + .../schedulerx2/model/ExecuteJobRequest.h | 3 + .../schedulerx2/model/GetJobInfoRequest.h | 3 + .../model/GetJobInstanceListRequest.h | 3 + .../model/GrantPermissionRequest.h | 3 + .../schedulerx2/model/ListGroupsRequest.h | 54 +++++ .../schedulerx2/model/ListGroupsResult.h | 68 ++++++ .../schedulerx2/model/ListJobsRequest.h | 63 +++++ .../schedulerx2/model/ListJobsResult.h | 113 +++++++++ .../schedulerx2/model/ListNamespacesRequest.h | 48 ++++ .../schedulerx2/model/ListNamespacesResult.h | 67 ++++++ .../model/RevokePermissionRequest.h | 3 + .../schedulerx2/model/StopInstanceRequest.h | 3 + .../schedulerx2/model/UpdateJobRequest.h | 3 + schedulerx2/src/Schedulerx2Client.cc | 216 ++++++++++++++++++ .../src/model/BatchDeleteJobsRequest.cc | 86 +++++++ .../src/model/BatchDeleteJobsResult.cc | 65 ++++++ .../src/model/BatchDisableJobsRequest.cc | 86 +++++++ .../src/model/BatchDisableJobsResult.cc | 65 ++++++ .../src/model/BatchEnableJobsRequest.cc | 86 +++++++ .../src/model/BatchEnableJobsResult.cc | 65 ++++++ .../src/model/CreateAppGroupRequest.cc | 11 + schedulerx2/src/model/CreateJobRequest.cc | 11 + schedulerx2/src/model/DeleteJobRequest.cc | 11 + .../src/model/DeleteWorkflowRequest.cc | 11 + schedulerx2/src/model/DisableJobRequest.cc | 11 + .../src/model/DisableWorkflowRequest.cc | 11 + schedulerx2/src/model/EnableJobRequest.cc | 11 + .../src/model/EnableWorkflowRequest.cc | 11 + schedulerx2/src/model/ExecuteJobRequest.cc | 11 + schedulerx2/src/model/GetJobInfoRequest.cc | 11 + .../src/model/GetJobInstanceListRequest.cc | 11 + .../src/model/GrantPermissionRequest.cc | 11 + schedulerx2/src/model/ListGroupsRequest.cc | 62 +++++ schedulerx2/src/model/ListGroupsResult.cc | 85 +++++++ schedulerx2/src/model/ListJobsRequest.cc | 95 ++++++++ schedulerx2/src/model/ListJobsResult.cc | 145 ++++++++++++ .../src/model/ListNamespacesRequest.cc | 40 ++++ schedulerx2/src/model/ListNamespacesResult.cc | 83 +++++++ .../src/model/RevokePermissionRequest.cc | 11 + schedulerx2/src/model/StopInstanceRequest.cc | 11 + schedulerx2/src/model/UpdateJobRequest.cc | 11 + 58 files changed, 2224 insertions(+) create mode 100644 schedulerx2/include/alibabacloud/schedulerx2/model/BatchDeleteJobsRequest.h create mode 100644 schedulerx2/include/alibabacloud/schedulerx2/model/BatchDeleteJobsResult.h create mode 100644 schedulerx2/include/alibabacloud/schedulerx2/model/BatchDisableJobsRequest.h create mode 100644 schedulerx2/include/alibabacloud/schedulerx2/model/BatchDisableJobsResult.h create mode 100644 schedulerx2/include/alibabacloud/schedulerx2/model/BatchEnableJobsRequest.h create mode 100644 schedulerx2/include/alibabacloud/schedulerx2/model/BatchEnableJobsResult.h create mode 100644 schedulerx2/include/alibabacloud/schedulerx2/model/ListGroupsRequest.h create mode 100644 schedulerx2/include/alibabacloud/schedulerx2/model/ListGroupsResult.h create mode 100644 schedulerx2/include/alibabacloud/schedulerx2/model/ListJobsRequest.h create mode 100644 schedulerx2/include/alibabacloud/schedulerx2/model/ListJobsResult.h create mode 100644 schedulerx2/include/alibabacloud/schedulerx2/model/ListNamespacesRequest.h create mode 100644 schedulerx2/include/alibabacloud/schedulerx2/model/ListNamespacesResult.h create mode 100644 schedulerx2/src/model/BatchDeleteJobsRequest.cc create mode 100644 schedulerx2/src/model/BatchDeleteJobsResult.cc create mode 100644 schedulerx2/src/model/BatchDisableJobsRequest.cc create mode 100644 schedulerx2/src/model/BatchDisableJobsResult.cc create mode 100644 schedulerx2/src/model/BatchEnableJobsRequest.cc create mode 100644 schedulerx2/src/model/BatchEnableJobsResult.cc create mode 100644 schedulerx2/src/model/ListGroupsRequest.cc create mode 100644 schedulerx2/src/model/ListGroupsResult.cc create mode 100644 schedulerx2/src/model/ListJobsRequest.cc create mode 100644 schedulerx2/src/model/ListJobsResult.cc create mode 100644 schedulerx2/src/model/ListNamespacesRequest.cc create mode 100644 schedulerx2/src/model/ListNamespacesResult.cc diff --git a/CHANGELOG b/CHANGELOG index 1d9f03a8f..9c5a66d07 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +2021-02-23 Version: patch +- Supported List Namespaces. +- Supported List Groups. +- Supported List Jobs. + 2021-02-22 Version: patch - Support input parameter DeploymentSetId for CreateAutoProvisioningGroup. diff --git a/schedulerx2/CMakeLists.txt b/schedulerx2/CMakeLists.txt index 933400443..5c6e3ea54 100644 --- a/schedulerx2/CMakeLists.txt +++ b/schedulerx2/CMakeLists.txt @@ -21,6 +21,12 @@ set(schedulerx2_public_header include/alibabacloud/schedulerx2/Schedulerx2Export.h ) set(schedulerx2_public_header_model + include/alibabacloud/schedulerx2/model/BatchDeleteJobsRequest.h + include/alibabacloud/schedulerx2/model/BatchDeleteJobsResult.h + include/alibabacloud/schedulerx2/model/BatchDisableJobsRequest.h + include/alibabacloud/schedulerx2/model/BatchDisableJobsResult.h + include/alibabacloud/schedulerx2/model/BatchEnableJobsRequest.h + include/alibabacloud/schedulerx2/model/BatchEnableJobsResult.h include/alibabacloud/schedulerx2/model/CreateAppGroupRequest.h include/alibabacloud/schedulerx2/model/CreateAppGroupResult.h include/alibabacloud/schedulerx2/model/CreateJobRequest.h @@ -51,6 +57,12 @@ set(schedulerx2_public_header_model include/alibabacloud/schedulerx2/model/GetJobInstanceListResult.h include/alibabacloud/schedulerx2/model/GrantPermissionRequest.h include/alibabacloud/schedulerx2/model/GrantPermissionResult.h + include/alibabacloud/schedulerx2/model/ListGroupsRequest.h + include/alibabacloud/schedulerx2/model/ListGroupsResult.h + include/alibabacloud/schedulerx2/model/ListJobsRequest.h + include/alibabacloud/schedulerx2/model/ListJobsResult.h + include/alibabacloud/schedulerx2/model/ListNamespacesRequest.h + include/alibabacloud/schedulerx2/model/ListNamespacesResult.h include/alibabacloud/schedulerx2/model/RevokePermissionRequest.h include/alibabacloud/schedulerx2/model/RevokePermissionResult.h include/alibabacloud/schedulerx2/model/StopInstanceRequest.h @@ -60,6 +72,12 @@ set(schedulerx2_public_header_model set(schedulerx2_src src/Schedulerx2Client.cc + src/model/BatchDeleteJobsRequest.cc + src/model/BatchDeleteJobsResult.cc + src/model/BatchDisableJobsRequest.cc + src/model/BatchDisableJobsResult.cc + src/model/BatchEnableJobsRequest.cc + src/model/BatchEnableJobsResult.cc src/model/CreateAppGroupRequest.cc src/model/CreateAppGroupResult.cc src/model/CreateJobRequest.cc @@ -90,6 +108,12 @@ set(schedulerx2_src src/model/GetJobInstanceListResult.cc src/model/GrantPermissionRequest.cc src/model/GrantPermissionResult.cc + src/model/ListGroupsRequest.cc + src/model/ListGroupsResult.cc + src/model/ListJobsRequest.cc + src/model/ListJobsResult.cc + src/model/ListNamespacesRequest.cc + src/model/ListNamespacesResult.cc src/model/RevokePermissionRequest.cc src/model/RevokePermissionResult.cc src/model/StopInstanceRequest.cc diff --git a/schedulerx2/include/alibabacloud/schedulerx2/Schedulerx2Client.h b/schedulerx2/include/alibabacloud/schedulerx2/Schedulerx2Client.h index be486b244..df6bd744f 100644 --- a/schedulerx2/include/alibabacloud/schedulerx2/Schedulerx2Client.h +++ b/schedulerx2/include/alibabacloud/schedulerx2/Schedulerx2Client.h @@ -22,6 +22,12 @@ #include #include #include "Schedulerx2Export.h" +#include "model/BatchDeleteJobsRequest.h" +#include "model/BatchDeleteJobsResult.h" +#include "model/BatchDisableJobsRequest.h" +#include "model/BatchDisableJobsResult.h" +#include "model/BatchEnableJobsRequest.h" +#include "model/BatchEnableJobsResult.h" #include "model/CreateAppGroupRequest.h" #include "model/CreateAppGroupResult.h" #include "model/CreateJobRequest.h" @@ -52,6 +58,12 @@ #include "model/GetJobInstanceListResult.h" #include "model/GrantPermissionRequest.h" #include "model/GrantPermissionResult.h" +#include "model/ListGroupsRequest.h" +#include "model/ListGroupsResult.h" +#include "model/ListJobsRequest.h" +#include "model/ListJobsResult.h" +#include "model/ListNamespacesRequest.h" +#include "model/ListNamespacesResult.h" #include "model/RevokePermissionRequest.h" #include "model/RevokePermissionResult.h" #include "model/StopInstanceRequest.h" @@ -67,6 +79,15 @@ namespace AlibabaCloud class ALIBABACLOUD_SCHEDULERX2_EXPORT Schedulerx2Client : public RpcServiceClient { public: + typedef Outcome BatchDeleteJobsOutcome; + typedef std::future BatchDeleteJobsOutcomeCallable; + typedef std::function&)> BatchDeleteJobsAsyncHandler; + typedef Outcome BatchDisableJobsOutcome; + typedef std::future BatchDisableJobsOutcomeCallable; + typedef std::function&)> BatchDisableJobsAsyncHandler; + typedef Outcome BatchEnableJobsOutcome; + typedef std::future BatchEnableJobsOutcomeCallable; + typedef std::function&)> BatchEnableJobsAsyncHandler; typedef Outcome CreateAppGroupOutcome; typedef std::future CreateAppGroupOutcomeCallable; typedef std::function&)> CreateAppGroupAsyncHandler; @@ -112,6 +133,15 @@ namespace AlibabaCloud typedef Outcome GrantPermissionOutcome; typedef std::future GrantPermissionOutcomeCallable; typedef std::function&)> GrantPermissionAsyncHandler; + typedef Outcome ListGroupsOutcome; + typedef std::future ListGroupsOutcomeCallable; + typedef std::function&)> ListGroupsAsyncHandler; + typedef Outcome ListJobsOutcome; + typedef std::future ListJobsOutcomeCallable; + typedef std::function&)> ListJobsAsyncHandler; + typedef Outcome ListNamespacesOutcome; + typedef std::future ListNamespacesOutcomeCallable; + typedef std::function&)> ListNamespacesAsyncHandler; typedef Outcome RevokePermissionOutcome; typedef std::future RevokePermissionOutcomeCallable; typedef std::function&)> RevokePermissionAsyncHandler; @@ -126,6 +156,15 @@ namespace AlibabaCloud Schedulerx2Client(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); Schedulerx2Client(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); ~Schedulerx2Client(); + BatchDeleteJobsOutcome batchDeleteJobs(const Model::BatchDeleteJobsRequest &request)const; + void batchDeleteJobsAsync(const Model::BatchDeleteJobsRequest& request, const BatchDeleteJobsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + BatchDeleteJobsOutcomeCallable batchDeleteJobsCallable(const Model::BatchDeleteJobsRequest& request) const; + BatchDisableJobsOutcome batchDisableJobs(const Model::BatchDisableJobsRequest &request)const; + void batchDisableJobsAsync(const Model::BatchDisableJobsRequest& request, const BatchDisableJobsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + BatchDisableJobsOutcomeCallable batchDisableJobsCallable(const Model::BatchDisableJobsRequest& request) const; + BatchEnableJobsOutcome batchEnableJobs(const Model::BatchEnableJobsRequest &request)const; + void batchEnableJobsAsync(const Model::BatchEnableJobsRequest& request, const BatchEnableJobsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + BatchEnableJobsOutcomeCallable batchEnableJobsCallable(const Model::BatchEnableJobsRequest& request) const; CreateAppGroupOutcome createAppGroup(const Model::CreateAppGroupRequest &request)const; void createAppGroupAsync(const Model::CreateAppGroupRequest& request, const CreateAppGroupAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateAppGroupOutcomeCallable createAppGroupCallable(const Model::CreateAppGroupRequest& request) const; @@ -171,6 +210,15 @@ namespace AlibabaCloud GrantPermissionOutcome grantPermission(const Model::GrantPermissionRequest &request)const; void grantPermissionAsync(const Model::GrantPermissionRequest& request, const GrantPermissionAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GrantPermissionOutcomeCallable grantPermissionCallable(const Model::GrantPermissionRequest& request) const; + ListGroupsOutcome listGroups(const Model::ListGroupsRequest &request)const; + void listGroupsAsync(const Model::ListGroupsRequest& request, const ListGroupsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListGroupsOutcomeCallable listGroupsCallable(const Model::ListGroupsRequest& request) const; + ListJobsOutcome listJobs(const Model::ListJobsRequest &request)const; + void listJobsAsync(const Model::ListJobsRequest& request, const ListJobsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListJobsOutcomeCallable listJobsCallable(const Model::ListJobsRequest& request) const; + ListNamespacesOutcome listNamespaces(const Model::ListNamespacesRequest &request)const; + void listNamespacesAsync(const Model::ListNamespacesRequest& request, const ListNamespacesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListNamespacesOutcomeCallable listNamespacesCallable(const Model::ListNamespacesRequest& request) const; RevokePermissionOutcome revokePermission(const Model::RevokePermissionRequest &request)const; void revokePermissionAsync(const Model::RevokePermissionRequest& request, const RevokePermissionAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; RevokePermissionOutcomeCallable revokePermissionCallable(const Model::RevokePermissionRequest& request) const; diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/BatchDeleteJobsRequest.h b/schedulerx2/include/alibabacloud/schedulerx2/model/BatchDeleteJobsRequest.h new file mode 100644 index 000000000..556b5a747 --- /dev/null +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/BatchDeleteJobsRequest.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_SCHEDULERX2_MODEL_BATCHDELETEJOBSREQUEST_H_ +#define ALIBABACLOUD_SCHEDULERX2_MODEL_BATCHDELETEJOBSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Schedulerx2 + { + namespace Model + { + class ALIBABACLOUD_SCHEDULERX2_EXPORT BatchDeleteJobsRequest : public RpcServiceRequest + { + + public: + BatchDeleteJobsRequest(); + ~BatchDeleteJobsRequest(); + + std::string getNamespaceSource()const; + void setNamespaceSource(const std::string& namespaceSource); + std::string getGroupId()const; + void setGroupId(const std::string& groupId); + std::vector getJobIdList()const; + void setJobIdList(const std::vector& jobIdList); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string get_Namespace()const; + void set_Namespace(const std::string& _namespace); + + private: + std::string namespaceSource_; + std::string groupId_; + std::vector jobIdList_; + std::string regionId_; + std::string _namespace_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SCHEDULERX2_MODEL_BATCHDELETEJOBSREQUEST_H_ \ No newline at end of file diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/BatchDeleteJobsResult.h b/schedulerx2/include/alibabacloud/schedulerx2/model/BatchDeleteJobsResult.h new file mode 100644 index 000000000..d4553afb8 --- /dev/null +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/BatchDeleteJobsResult.h @@ -0,0 +1,55 @@ +/* + * 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_SCHEDULERX2_MODEL_BATCHDELETEJOBSRESULT_H_ +#define ALIBABACLOUD_SCHEDULERX2_MODEL_BATCHDELETEJOBSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Schedulerx2 + { + namespace Model + { + class ALIBABACLOUD_SCHEDULERX2_EXPORT BatchDeleteJobsResult : public ServiceResult + { + public: + + + BatchDeleteJobsResult(); + explicit BatchDeleteJobsResult(const std::string &payload); + ~BatchDeleteJobsResult(); + std::string getMessage()const; + int getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + int code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SCHEDULERX2_MODEL_BATCHDELETEJOBSRESULT_H_ \ No newline at end of file diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/BatchDisableJobsRequest.h b/schedulerx2/include/alibabacloud/schedulerx2/model/BatchDisableJobsRequest.h new file mode 100644 index 000000000..942c9e3c3 --- /dev/null +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/BatchDisableJobsRequest.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_SCHEDULERX2_MODEL_BATCHDISABLEJOBSREQUEST_H_ +#define ALIBABACLOUD_SCHEDULERX2_MODEL_BATCHDISABLEJOBSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Schedulerx2 + { + namespace Model + { + class ALIBABACLOUD_SCHEDULERX2_EXPORT BatchDisableJobsRequest : public RpcServiceRequest + { + + public: + BatchDisableJobsRequest(); + ~BatchDisableJobsRequest(); + + std::string getNamespaceSource()const; + void setNamespaceSource(const std::string& namespaceSource); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string getGroupId()const; + void setGroupId(const std::string& groupId); + std::string get_Namespace()const; + void set_Namespace(const std::string& _namespace); + std::vector getJobIdList()const; + void setJobIdList(const std::vector& jobIdList); + + private: + std::string namespaceSource_; + std::string regionId_; + std::string groupId_; + std::string _namespace_; + std::vector jobIdList_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SCHEDULERX2_MODEL_BATCHDISABLEJOBSREQUEST_H_ \ No newline at end of file diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/BatchDisableJobsResult.h b/schedulerx2/include/alibabacloud/schedulerx2/model/BatchDisableJobsResult.h new file mode 100644 index 000000000..df227ce03 --- /dev/null +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/BatchDisableJobsResult.h @@ -0,0 +1,55 @@ +/* + * 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_SCHEDULERX2_MODEL_BATCHDISABLEJOBSRESULT_H_ +#define ALIBABACLOUD_SCHEDULERX2_MODEL_BATCHDISABLEJOBSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Schedulerx2 + { + namespace Model + { + class ALIBABACLOUD_SCHEDULERX2_EXPORT BatchDisableJobsResult : public ServiceResult + { + public: + + + BatchDisableJobsResult(); + explicit BatchDisableJobsResult(const std::string &payload); + ~BatchDisableJobsResult(); + std::string getMessage()const; + int getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + int code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SCHEDULERX2_MODEL_BATCHDISABLEJOBSRESULT_H_ \ No newline at end of file diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/BatchEnableJobsRequest.h b/schedulerx2/include/alibabacloud/schedulerx2/model/BatchEnableJobsRequest.h new file mode 100644 index 000000000..6f32bfc83 --- /dev/null +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/BatchEnableJobsRequest.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_SCHEDULERX2_MODEL_BATCHENABLEJOBSREQUEST_H_ +#define ALIBABACLOUD_SCHEDULERX2_MODEL_BATCHENABLEJOBSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Schedulerx2 + { + namespace Model + { + class ALIBABACLOUD_SCHEDULERX2_EXPORT BatchEnableJobsRequest : public RpcServiceRequest + { + + public: + BatchEnableJobsRequest(); + ~BatchEnableJobsRequest(); + + std::string getNamespaceSource()const; + void setNamespaceSource(const std::string& namespaceSource); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string getGroupId()const; + void setGroupId(const std::string& groupId); + std::string get_Namespace()const; + void set_Namespace(const std::string& _namespace); + std::vector getJobIdList()const; + void setJobIdList(const std::vector& jobIdList); + + private: + std::string namespaceSource_; + std::string regionId_; + std::string groupId_; + std::string _namespace_; + std::vector jobIdList_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SCHEDULERX2_MODEL_BATCHENABLEJOBSREQUEST_H_ \ No newline at end of file diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/BatchEnableJobsResult.h b/schedulerx2/include/alibabacloud/schedulerx2/model/BatchEnableJobsResult.h new file mode 100644 index 000000000..4cd17e749 --- /dev/null +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/BatchEnableJobsResult.h @@ -0,0 +1,55 @@ +/* + * 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_SCHEDULERX2_MODEL_BATCHENABLEJOBSRESULT_H_ +#define ALIBABACLOUD_SCHEDULERX2_MODEL_BATCHENABLEJOBSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Schedulerx2 + { + namespace Model + { + class ALIBABACLOUD_SCHEDULERX2_EXPORT BatchEnableJobsResult : public ServiceResult + { + public: + + + BatchEnableJobsResult(); + explicit BatchEnableJobsResult(const std::string &payload); + ~BatchEnableJobsResult(); + std::string getMessage()const; + int getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + int code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SCHEDULERX2_MODEL_BATCHENABLEJOBSRESULT_H_ \ No newline at end of file diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/CreateAppGroupRequest.h b/schedulerx2/include/alibabacloud/schedulerx2/model/CreateAppGroupRequest.h index ba44d3a77..7fbd923d9 100644 --- a/schedulerx2/include/alibabacloud/schedulerx2/model/CreateAppGroupRequest.h +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/CreateAppGroupRequest.h @@ -49,6 +49,8 @@ namespace AlibabaCloud void setDescription(const std::string& description); std::string getAppName()const; void setAppName(const std::string& appName); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); std::string get_Namespace()const; void set_Namespace(const std::string& _namespace); std::string getAlarmJson()const; @@ -62,6 +64,7 @@ namespace AlibabaCloud std::string groupId_; std::string description_; std::string appName_; + std::string regionId_; std::string _namespace_; std::string alarmJson_; diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/CreateJobRequest.h b/schedulerx2/include/alibabacloud/schedulerx2/model/CreateJobRequest.h index 5fd8cb687..01eb2c188 100644 --- a/schedulerx2/include/alibabacloud/schedulerx2/model/CreateJobRequest.h +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/CreateJobRequest.h @@ -53,6 +53,8 @@ namespace AlibabaCloud void setTimeout(long timeout); bool getTimeoutKillEnable()const; void setTimeoutKillEnable(bool timeoutKillEnable); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); int getPageSize()const; void setPageSize(int pageSize); int getConsumerSize()const; @@ -109,6 +111,7 @@ namespace AlibabaCloud std::string content_; long timeout_; bool timeoutKillEnable_; + std::string regionId_; int pageSize_; int consumerSize_; std::string jarUrl_; diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/DeleteJobRequest.h b/schedulerx2/include/alibabacloud/schedulerx2/model/DeleteJobRequest.h index 7a6623d8e..90dd0269a 100644 --- a/schedulerx2/include/alibabacloud/schedulerx2/model/DeleteJobRequest.h +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/DeleteJobRequest.h @@ -41,6 +41,8 @@ namespace AlibabaCloud void setGroupId(const std::string& groupId); long getJobId()const; void setJobId(long jobId); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); std::string get_Namespace()const; void set_Namespace(const std::string& _namespace); @@ -48,6 +50,7 @@ namespace AlibabaCloud std::string namespaceSource_; std::string groupId_; long jobId_; + std::string regionId_; std::string _namespace_; }; diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/DeleteWorkflowRequest.h b/schedulerx2/include/alibabacloud/schedulerx2/model/DeleteWorkflowRequest.h index bf07fa271..a9cce5337 100644 --- a/schedulerx2/include/alibabacloud/schedulerx2/model/DeleteWorkflowRequest.h +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/DeleteWorkflowRequest.h @@ -37,6 +37,8 @@ namespace AlibabaCloud std::string getNamespaceSource()const; void setNamespaceSource(const std::string& namespaceSource); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); std::string getGroupId()const; void setGroupId(const std::string& groupId); std::string get_Namespace()const; @@ -46,6 +48,7 @@ namespace AlibabaCloud private: std::string namespaceSource_; + std::string regionId_; std::string groupId_; std::string _namespace_; long workflowId_; diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/DisableJobRequest.h b/schedulerx2/include/alibabacloud/schedulerx2/model/DisableJobRequest.h index 2ab356671..61be6893f 100644 --- a/schedulerx2/include/alibabacloud/schedulerx2/model/DisableJobRequest.h +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/DisableJobRequest.h @@ -39,6 +39,8 @@ namespace AlibabaCloud void setJobId(long jobId); std::string getNamespaceSource()const; void setNamespaceSource(const std::string& namespaceSource); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); std::string getGroupId()const; void setGroupId(const std::string& groupId); std::string get_Namespace()const; @@ -47,6 +49,7 @@ namespace AlibabaCloud private: long jobId_; std::string namespaceSource_; + std::string regionId_; std::string groupId_; std::string _namespace_; diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/DisableWorkflowRequest.h b/schedulerx2/include/alibabacloud/schedulerx2/model/DisableWorkflowRequest.h index 661436931..c0f803e55 100644 --- a/schedulerx2/include/alibabacloud/schedulerx2/model/DisableWorkflowRequest.h +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/DisableWorkflowRequest.h @@ -37,6 +37,8 @@ namespace AlibabaCloud std::string getNamespaceSource()const; void setNamespaceSource(const std::string& namespaceSource); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); std::string getGroupId()const; void setGroupId(const std::string& groupId); std::string get_Namespace()const; @@ -46,6 +48,7 @@ namespace AlibabaCloud private: std::string namespaceSource_; + std::string regionId_; std::string groupId_; std::string _namespace_; long workflowId_; diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/EnableJobRequest.h b/schedulerx2/include/alibabacloud/schedulerx2/model/EnableJobRequest.h index 32cac1af9..8cb90116a 100644 --- a/schedulerx2/include/alibabacloud/schedulerx2/model/EnableJobRequest.h +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/EnableJobRequest.h @@ -39,6 +39,8 @@ namespace AlibabaCloud void setJobId(long jobId); std::string getNamespaceSource()const; void setNamespaceSource(const std::string& namespaceSource); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); std::string getGroupId()const; void setGroupId(const std::string& groupId); std::string get_Namespace()const; @@ -47,6 +49,7 @@ namespace AlibabaCloud private: long jobId_; std::string namespaceSource_; + std::string regionId_; std::string groupId_; std::string _namespace_; diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/EnableWorkflowRequest.h b/schedulerx2/include/alibabacloud/schedulerx2/model/EnableWorkflowRequest.h index e463afa1e..0e721c2ee 100644 --- a/schedulerx2/include/alibabacloud/schedulerx2/model/EnableWorkflowRequest.h +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/EnableWorkflowRequest.h @@ -37,6 +37,8 @@ namespace AlibabaCloud std::string getNamespaceSource()const; void setNamespaceSource(const std::string& namespaceSource); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); std::string getGroupId()const; void setGroupId(const std::string& groupId); std::string get_Namespace()const; @@ -46,6 +48,7 @@ namespace AlibabaCloud private: std::string namespaceSource_; + std::string regionId_; std::string groupId_; std::string _namespace_; long workflowId_; diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/ExecuteJobRequest.h b/schedulerx2/include/alibabacloud/schedulerx2/model/ExecuteJobRequest.h index 2f0fb23e8..aa57550d6 100644 --- a/schedulerx2/include/alibabacloud/schedulerx2/model/ExecuteJobRequest.h +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/ExecuteJobRequest.h @@ -39,6 +39,8 @@ namespace AlibabaCloud void setJobId(long jobId); std::string getNamespaceSource()const; void setNamespaceSource(const std::string& namespaceSource); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); std::string getGroupId()const; void setGroupId(const std::string& groupId); std::string get_Namespace()const; @@ -49,6 +51,7 @@ namespace AlibabaCloud private: long jobId_; std::string namespaceSource_; + std::string regionId_; std::string groupId_; std::string _namespace_; std::string instanceParameters_; diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/GetJobInfoRequest.h b/schedulerx2/include/alibabacloud/schedulerx2/model/GetJobInfoRequest.h index c3f471a27..fdc935f3c 100644 --- a/schedulerx2/include/alibabacloud/schedulerx2/model/GetJobInfoRequest.h +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/GetJobInfoRequest.h @@ -39,6 +39,8 @@ namespace AlibabaCloud void setJobId(long jobId); std::string getNamespaceSource()const; void setNamespaceSource(const std::string& namespaceSource); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); std::string getGroupId()const; void setGroupId(const std::string& groupId); std::string get_Namespace()const; @@ -47,6 +49,7 @@ namespace AlibabaCloud private: long jobId_; std::string namespaceSource_; + std::string regionId_; std::string groupId_; std::string _namespace_; diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/GetJobInstanceListRequest.h b/schedulerx2/include/alibabacloud/schedulerx2/model/GetJobInstanceListRequest.h index 4be5d70e2..796457ae5 100644 --- a/schedulerx2/include/alibabacloud/schedulerx2/model/GetJobInstanceListRequest.h +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/GetJobInstanceListRequest.h @@ -39,6 +39,8 @@ namespace AlibabaCloud void setJobId(long jobId); std::string getNamespaceSource()const; void setNamespaceSource(const std::string& namespaceSource); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); std::string getGroupId()const; void setGroupId(const std::string& groupId); std::string get_Namespace()const; @@ -47,6 +49,7 @@ namespace AlibabaCloud private: long jobId_; std::string namespaceSource_; + std::string regionId_; std::string groupId_; std::string _namespace_; diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/GrantPermissionRequest.h b/schedulerx2/include/alibabacloud/schedulerx2/model/GrantPermissionRequest.h index 4ae60adf4..3273dc6a6 100644 --- a/schedulerx2/include/alibabacloud/schedulerx2/model/GrantPermissionRequest.h +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/GrantPermissionRequest.h @@ -43,6 +43,8 @@ namespace AlibabaCloud void setUserId(const std::string& userId); bool getGrantOption()const; void setGrantOption(bool grantOption); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); std::string get_Namespace()const; void set_Namespace(const std::string& _namespace); std::string getUserName()const; @@ -53,6 +55,7 @@ namespace AlibabaCloud std::string groupId_; std::string userId_; bool grantOption_; + std::string regionId_; std::string _namespace_; std::string userName_; diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/ListGroupsRequest.h b/schedulerx2/include/alibabacloud/schedulerx2/model/ListGroupsRequest.h new file mode 100644 index 000000000..5fd2ea6a2 --- /dev/null +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/ListGroupsRequest.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_SCHEDULERX2_MODEL_LISTGROUPSREQUEST_H_ +#define ALIBABACLOUD_SCHEDULERX2_MODEL_LISTGROUPSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Schedulerx2 + { + namespace Model + { + class ALIBABACLOUD_SCHEDULERX2_EXPORT ListGroupsRequest : public RpcServiceRequest + { + + public: + ListGroupsRequest(); + ~ListGroupsRequest(); + + std::string getNamespaceSource()const; + void setNamespaceSource(const std::string& namespaceSource); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string get_Namespace()const; + void set_Namespace(const std::string& _namespace); + + private: + std::string namespaceSource_; + std::string regionId_; + std::string _namespace_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SCHEDULERX2_MODEL_LISTGROUPSREQUEST_H_ \ No newline at end of file diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/ListGroupsResult.h b/schedulerx2/include/alibabacloud/schedulerx2/model/ListGroupsResult.h new file mode 100644 index 000000000..0bbbb26e9 --- /dev/null +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/ListGroupsResult.h @@ -0,0 +1,68 @@ +/* + * 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_SCHEDULERX2_MODEL_LISTGROUPSRESULT_H_ +#define ALIBABACLOUD_SCHEDULERX2_MODEL_LISTGROUPSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Schedulerx2 + { + namespace Model + { + class ALIBABACLOUD_SCHEDULERX2_EXPORT ListGroupsResult : public ServiceResult + { + public: + struct Data + { + struct AppGroup + { + std::string description; + std::string appKey; + std::string appName; + std::string groupId; + }; + std::vector appGroups; + }; + + + ListGroupsResult(); + explicit ListGroupsResult(const std::string &payload); + ~ListGroupsResult(); + std::string getMessage()const; + Data getData()const; + int getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + Data data_; + int code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SCHEDULERX2_MODEL_LISTGROUPSRESULT_H_ \ No newline at end of file diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/ListJobsRequest.h b/schedulerx2/include/alibabacloud/schedulerx2/model/ListJobsRequest.h new file mode 100644 index 000000000..1abd2789a --- /dev/null +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/ListJobsRequest.h @@ -0,0 +1,63 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_SCHEDULERX2_MODEL_LISTJOBSREQUEST_H_ +#define ALIBABACLOUD_SCHEDULERX2_MODEL_LISTJOBSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Schedulerx2 + { + namespace Model + { + class ALIBABACLOUD_SCHEDULERX2_EXPORT ListJobsRequest : public RpcServiceRequest + { + + public: + ListJobsRequest(); + ~ListJobsRequest(); + + std::string getNamespaceSource()const; + void setNamespaceSource(const std::string& namespaceSource); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string getGroupId()const; + void setGroupId(const std::string& groupId); + std::string get_Namespace()const; + void set_Namespace(const std::string& _namespace); + std::string getJobName()const; + void setJobName(const std::string& jobName); + std::string getStatus()const; + void setStatus(const std::string& status); + + private: + std::string namespaceSource_; + std::string regionId_; + std::string groupId_; + std::string _namespace_; + std::string jobName_; + std::string status_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SCHEDULERX2_MODEL_LISTJOBSREQUEST_H_ \ No newline at end of file diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/ListJobsResult.h b/schedulerx2/include/alibabacloud/schedulerx2/model/ListJobsResult.h new file mode 100644 index 000000000..4d7186f04 --- /dev/null +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/ListJobsResult.h @@ -0,0 +1,113 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_SCHEDULERX2_MODEL_LISTJOBSRESULT_H_ +#define ALIBABACLOUD_SCHEDULERX2_MODEL_LISTJOBSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Schedulerx2 + { + namespace Model + { + class ALIBABACLOUD_SCHEDULERX2_EXPORT ListJobsResult : public ServiceResult + { + public: + struct Data + { + struct Job + { + struct MapTaskXAttrs + { + int taskAttemptInterval; + int queueSize; + int pageSize; + int dispatcherSize; + int taskMaxAttempt; + int consumerSize; + }; + struct TimeConfig + { + std::string calendar; + std::string timeExpression; + int dataOffset; + int timeType; + }; + struct JobMonitorInfo + { + struct MonitorConfig + { + bool timeoutEnable; + long timeout; + bool failEnable; + std::string sendChannel; + bool timeoutKillEnable; + }; + struct ContactInfoItem + { + std::string userName; + std::string userPhone; + }; + std::vector contactInfo; + MonitorConfig monitorConfig; + }; + int status; + int maxAttempt; + std::string description; + std::string parameters; + std::string jarUrl; + std::string maxConcurrency; + TimeConfig timeConfig; + MapTaskXAttrs mapTaskXAttrs; + std::string name; + JobMonitorInfo jobMonitorInfo; + std::string content; + std::string className; + int attemptInterval; + std::string executeMode; + long jobId; + }; + std::vector jobs; + }; + + + ListJobsResult(); + explicit ListJobsResult(const std::string &payload); + ~ListJobsResult(); + std::string getMessage()const; + Data getData()const; + int getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + Data data_; + int code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SCHEDULERX2_MODEL_LISTJOBSRESULT_H_ \ No newline at end of file diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/ListNamespacesRequest.h b/schedulerx2/include/alibabacloud/schedulerx2/model/ListNamespacesRequest.h new file mode 100644 index 000000000..b608df597 --- /dev/null +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/ListNamespacesRequest.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_SCHEDULERX2_MODEL_LISTNAMESPACESREQUEST_H_ +#define ALIBABACLOUD_SCHEDULERX2_MODEL_LISTNAMESPACESREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Schedulerx2 + { + namespace Model + { + class ALIBABACLOUD_SCHEDULERX2_EXPORT ListNamespacesRequest : public RpcServiceRequest + { + + public: + ListNamespacesRequest(); + ~ListNamespacesRequest(); + + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + + private: + std::string regionId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SCHEDULERX2_MODEL_LISTNAMESPACESREQUEST_H_ \ No newline at end of file diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/ListNamespacesResult.h b/schedulerx2/include/alibabacloud/schedulerx2/model/ListNamespacesResult.h new file mode 100644 index 000000000..893680c9f --- /dev/null +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/ListNamespacesResult.h @@ -0,0 +1,67 @@ +/* + * 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_SCHEDULERX2_MODEL_LISTNAMESPACESRESULT_H_ +#define ALIBABACLOUD_SCHEDULERX2_MODEL_LISTNAMESPACESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Schedulerx2 + { + namespace Model + { + class ALIBABACLOUD_SCHEDULERX2_EXPORT ListNamespacesResult : public ServiceResult + { + public: + struct Data + { + struct _Namespace + { + std::string uId; + std::string description; + std::string name; + }; + std::vector<_Namespace> namespaces; + }; + + + ListNamespacesResult(); + explicit ListNamespacesResult(const std::string &payload); + ~ListNamespacesResult(); + std::string getMessage()const; + Data getData()const; + int getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + Data data_; + int code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_SCHEDULERX2_MODEL_LISTNAMESPACESRESULT_H_ \ No newline at end of file diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/RevokePermissionRequest.h b/schedulerx2/include/alibabacloud/schedulerx2/model/RevokePermissionRequest.h index d85875f83..14d68a65c 100644 --- a/schedulerx2/include/alibabacloud/schedulerx2/model/RevokePermissionRequest.h +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/RevokePermissionRequest.h @@ -37,6 +37,8 @@ namespace AlibabaCloud std::string getNamespaceSource()const; void setNamespaceSource(const std::string& namespaceSource); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); std::string getGroupId()const; void setGroupId(const std::string& groupId); std::string get_Namespace()const; @@ -46,6 +48,7 @@ namespace AlibabaCloud private: std::string namespaceSource_; + std::string regionId_; std::string groupId_; std::string _namespace_; std::string userId_; diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/StopInstanceRequest.h b/schedulerx2/include/alibabacloud/schedulerx2/model/StopInstanceRequest.h index 121deed7c..bc728b0bf 100644 --- a/schedulerx2/include/alibabacloud/schedulerx2/model/StopInstanceRequest.h +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/StopInstanceRequest.h @@ -41,6 +41,8 @@ namespace AlibabaCloud void setNamespaceSource(const std::string& namespaceSource); long getInstanceId()const; void setInstanceId(long instanceId); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); std::string getGroupId()const; void setGroupId(const std::string& groupId); std::string get_Namespace()const; @@ -50,6 +52,7 @@ namespace AlibabaCloud long jobId_; std::string namespaceSource_; long instanceId_; + std::string regionId_; std::string groupId_; std::string _namespace_; diff --git a/schedulerx2/include/alibabacloud/schedulerx2/model/UpdateJobRequest.h b/schedulerx2/include/alibabacloud/schedulerx2/model/UpdateJobRequest.h index 3a5edbc32..515916bba 100644 --- a/schedulerx2/include/alibabacloud/schedulerx2/model/UpdateJobRequest.h +++ b/schedulerx2/include/alibabacloud/schedulerx2/model/UpdateJobRequest.h @@ -55,6 +55,8 @@ namespace AlibabaCloud void setTimeoutKillEnable(bool timeoutKillEnable); long getJobId()const; void setJobId(long jobId); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); int getPageSize()const; void setPageSize(int pageSize); int getConsumerSize()const; @@ -110,6 +112,7 @@ namespace AlibabaCloud long timeout_; bool timeoutKillEnable_; long jobId_; + std::string regionId_; int pageSize_; int consumerSize_; std::string jarUrl_; diff --git a/schedulerx2/src/Schedulerx2Client.cc b/schedulerx2/src/Schedulerx2Client.cc index b595f997c..ad60e477c 100644 --- a/schedulerx2/src/Schedulerx2Client.cc +++ b/schedulerx2/src/Schedulerx2Client.cc @@ -51,6 +51,114 @@ Schedulerx2Client::Schedulerx2Client(const std::string & accessKeyId, const std: Schedulerx2Client::~Schedulerx2Client() {} +Schedulerx2Client::BatchDeleteJobsOutcome Schedulerx2Client::batchDeleteJobs(const BatchDeleteJobsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return BatchDeleteJobsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return BatchDeleteJobsOutcome(BatchDeleteJobsResult(outcome.result())); + else + return BatchDeleteJobsOutcome(outcome.error()); +} + +void Schedulerx2Client::batchDeleteJobsAsync(const BatchDeleteJobsRequest& request, const BatchDeleteJobsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, batchDeleteJobs(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Schedulerx2Client::BatchDeleteJobsOutcomeCallable Schedulerx2Client::batchDeleteJobsCallable(const BatchDeleteJobsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->batchDeleteJobs(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Schedulerx2Client::BatchDisableJobsOutcome Schedulerx2Client::batchDisableJobs(const BatchDisableJobsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return BatchDisableJobsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return BatchDisableJobsOutcome(BatchDisableJobsResult(outcome.result())); + else + return BatchDisableJobsOutcome(outcome.error()); +} + +void Schedulerx2Client::batchDisableJobsAsync(const BatchDisableJobsRequest& request, const BatchDisableJobsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, batchDisableJobs(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Schedulerx2Client::BatchDisableJobsOutcomeCallable Schedulerx2Client::batchDisableJobsCallable(const BatchDisableJobsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->batchDisableJobs(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Schedulerx2Client::BatchEnableJobsOutcome Schedulerx2Client::batchEnableJobs(const BatchEnableJobsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return BatchEnableJobsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return BatchEnableJobsOutcome(BatchEnableJobsResult(outcome.result())); + else + return BatchEnableJobsOutcome(outcome.error()); +} + +void Schedulerx2Client::batchEnableJobsAsync(const BatchEnableJobsRequest& request, const BatchEnableJobsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, batchEnableJobs(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Schedulerx2Client::BatchEnableJobsOutcomeCallable Schedulerx2Client::batchEnableJobsCallable(const BatchEnableJobsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->batchEnableJobs(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + Schedulerx2Client::CreateAppGroupOutcome Schedulerx2Client::createAppGroup(const CreateAppGroupRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -591,6 +699,114 @@ Schedulerx2Client::GrantPermissionOutcomeCallable Schedulerx2Client::grantPermis return task->get_future(); } +Schedulerx2Client::ListGroupsOutcome Schedulerx2Client::listGroups(const ListGroupsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListGroupsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListGroupsOutcome(ListGroupsResult(outcome.result())); + else + return ListGroupsOutcome(outcome.error()); +} + +void Schedulerx2Client::listGroupsAsync(const ListGroupsRequest& request, const ListGroupsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listGroups(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Schedulerx2Client::ListGroupsOutcomeCallable Schedulerx2Client::listGroupsCallable(const ListGroupsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listGroups(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Schedulerx2Client::ListJobsOutcome Schedulerx2Client::listJobs(const ListJobsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListJobsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListJobsOutcome(ListJobsResult(outcome.result())); + else + return ListJobsOutcome(outcome.error()); +} + +void Schedulerx2Client::listJobsAsync(const ListJobsRequest& request, const ListJobsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listJobs(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Schedulerx2Client::ListJobsOutcomeCallable Schedulerx2Client::listJobsCallable(const ListJobsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listJobs(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Schedulerx2Client::ListNamespacesOutcome Schedulerx2Client::listNamespaces(const ListNamespacesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListNamespacesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListNamespacesOutcome(ListNamespacesResult(outcome.result())); + else + return ListNamespacesOutcome(outcome.error()); +} + +void Schedulerx2Client::listNamespacesAsync(const ListNamespacesRequest& request, const ListNamespacesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listNamespaces(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Schedulerx2Client::ListNamespacesOutcomeCallable Schedulerx2Client::listNamespacesCallable(const ListNamespacesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listNamespaces(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + Schedulerx2Client::RevokePermissionOutcome Schedulerx2Client::revokePermission(const RevokePermissionRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/schedulerx2/src/model/BatchDeleteJobsRequest.cc b/schedulerx2/src/model/BatchDeleteJobsRequest.cc new file mode 100644 index 000000000..f296841c0 --- /dev/null +++ b/schedulerx2/src/model/BatchDeleteJobsRequest.cc @@ -0,0 +1,86 @@ +/* + * 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::Schedulerx2::Model::BatchDeleteJobsRequest; + +BatchDeleteJobsRequest::BatchDeleteJobsRequest() : + RpcServiceRequest("schedulerx2", "2019-04-30", "BatchDeleteJobs") +{ + setMethod(HttpRequest::Method::Post); +} + +BatchDeleteJobsRequest::~BatchDeleteJobsRequest() +{} + +std::string BatchDeleteJobsRequest::getNamespaceSource()const +{ + return namespaceSource_; +} + +void BatchDeleteJobsRequest::setNamespaceSource(const std::string& namespaceSource) +{ + namespaceSource_ = namespaceSource; + setParameter("NamespaceSource", namespaceSource); +} + +std::string BatchDeleteJobsRequest::getGroupId()const +{ + return groupId_; +} + +void BatchDeleteJobsRequest::setGroupId(const std::string& groupId) +{ + groupId_ = groupId; + setParameter("GroupId", groupId); +} + +std::vector BatchDeleteJobsRequest::getJobIdList()const +{ + return jobIdList_; +} + +void BatchDeleteJobsRequest::setJobIdList(const std::vector& jobIdList) +{ + jobIdList_ = jobIdList; + for(int dep1 = 0; dep1!= jobIdList.size(); dep1++) { + setBodyParameter("JobIdList."+ std::to_string(dep1), std::to_string(jobIdList.at(dep1))); + } +} + +std::string BatchDeleteJobsRequest::getRegionId()const +{ + return regionId_; +} + +void BatchDeleteJobsRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +std::string BatchDeleteJobsRequest::get_Namespace()const +{ + return _namespace_; +} + +void BatchDeleteJobsRequest::set_Namespace(const std::string& _namespace) +{ + _namespace_ = _namespace; + setParameter("_Namespace", _namespace); +} + diff --git a/schedulerx2/src/model/BatchDeleteJobsResult.cc b/schedulerx2/src/model/BatchDeleteJobsResult.cc new file mode 100644 index 000000000..826584828 --- /dev/null +++ b/schedulerx2/src/model/BatchDeleteJobsResult.cc @@ -0,0 +1,65 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Schedulerx2; +using namespace AlibabaCloud::Schedulerx2::Model; + +BatchDeleteJobsResult::BatchDeleteJobsResult() : + ServiceResult() +{} + +BatchDeleteJobsResult::BatchDeleteJobsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +BatchDeleteJobsResult::~BatchDeleteJobsResult() +{} + +void BatchDeleteJobsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Code"].isNull()) + code_ = std::stoi(value["Code"].asString()); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string BatchDeleteJobsResult::getMessage()const +{ + return message_; +} + +int BatchDeleteJobsResult::getCode()const +{ + return code_; +} + +bool BatchDeleteJobsResult::getSuccess()const +{ + return success_; +} + diff --git a/schedulerx2/src/model/BatchDisableJobsRequest.cc b/schedulerx2/src/model/BatchDisableJobsRequest.cc new file mode 100644 index 000000000..6d4fe6e26 --- /dev/null +++ b/schedulerx2/src/model/BatchDisableJobsRequest.cc @@ -0,0 +1,86 @@ +/* + * 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::Schedulerx2::Model::BatchDisableJobsRequest; + +BatchDisableJobsRequest::BatchDisableJobsRequest() : + RpcServiceRequest("schedulerx2", "2019-04-30", "BatchDisableJobs") +{ + setMethod(HttpRequest::Method::Post); +} + +BatchDisableJobsRequest::~BatchDisableJobsRequest() +{} + +std::string BatchDisableJobsRequest::getNamespaceSource()const +{ + return namespaceSource_; +} + +void BatchDisableJobsRequest::setNamespaceSource(const std::string& namespaceSource) +{ + namespaceSource_ = namespaceSource; + setParameter("NamespaceSource", namespaceSource); +} + +std::string BatchDisableJobsRequest::getRegionId()const +{ + return regionId_; +} + +void BatchDisableJobsRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +std::string BatchDisableJobsRequest::getGroupId()const +{ + return groupId_; +} + +void BatchDisableJobsRequest::setGroupId(const std::string& groupId) +{ + groupId_ = groupId; + setParameter("GroupId", groupId); +} + +std::string BatchDisableJobsRequest::get_Namespace()const +{ + return _namespace_; +} + +void BatchDisableJobsRequest::set_Namespace(const std::string& _namespace) +{ + _namespace_ = _namespace; + setParameter("_Namespace", _namespace); +} + +std::vector BatchDisableJobsRequest::getJobIdList()const +{ + return jobIdList_; +} + +void BatchDisableJobsRequest::setJobIdList(const std::vector& jobIdList) +{ + jobIdList_ = jobIdList; + for(int dep1 = 0; dep1!= jobIdList.size(); dep1++) { + setBodyParameter("JobIdList."+ std::to_string(dep1), std::to_string(jobIdList.at(dep1))); + } +} + diff --git a/schedulerx2/src/model/BatchDisableJobsResult.cc b/schedulerx2/src/model/BatchDisableJobsResult.cc new file mode 100644 index 000000000..495deb8d3 --- /dev/null +++ b/schedulerx2/src/model/BatchDisableJobsResult.cc @@ -0,0 +1,65 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Schedulerx2; +using namespace AlibabaCloud::Schedulerx2::Model; + +BatchDisableJobsResult::BatchDisableJobsResult() : + ServiceResult() +{} + +BatchDisableJobsResult::BatchDisableJobsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +BatchDisableJobsResult::~BatchDisableJobsResult() +{} + +void BatchDisableJobsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Code"].isNull()) + code_ = std::stoi(value["Code"].asString()); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string BatchDisableJobsResult::getMessage()const +{ + return message_; +} + +int BatchDisableJobsResult::getCode()const +{ + return code_; +} + +bool BatchDisableJobsResult::getSuccess()const +{ + return success_; +} + diff --git a/schedulerx2/src/model/BatchEnableJobsRequest.cc b/schedulerx2/src/model/BatchEnableJobsRequest.cc new file mode 100644 index 000000000..91353fc4a --- /dev/null +++ b/schedulerx2/src/model/BatchEnableJobsRequest.cc @@ -0,0 +1,86 @@ +/* + * 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::Schedulerx2::Model::BatchEnableJobsRequest; + +BatchEnableJobsRequest::BatchEnableJobsRequest() : + RpcServiceRequest("schedulerx2", "2019-04-30", "BatchEnableJobs") +{ + setMethod(HttpRequest::Method::Post); +} + +BatchEnableJobsRequest::~BatchEnableJobsRequest() +{} + +std::string BatchEnableJobsRequest::getNamespaceSource()const +{ + return namespaceSource_; +} + +void BatchEnableJobsRequest::setNamespaceSource(const std::string& namespaceSource) +{ + namespaceSource_ = namespaceSource; + setParameter("NamespaceSource", namespaceSource); +} + +std::string BatchEnableJobsRequest::getRegionId()const +{ + return regionId_; +} + +void BatchEnableJobsRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +std::string BatchEnableJobsRequest::getGroupId()const +{ + return groupId_; +} + +void BatchEnableJobsRequest::setGroupId(const std::string& groupId) +{ + groupId_ = groupId; + setParameter("GroupId", groupId); +} + +std::string BatchEnableJobsRequest::get_Namespace()const +{ + return _namespace_; +} + +void BatchEnableJobsRequest::set_Namespace(const std::string& _namespace) +{ + _namespace_ = _namespace; + setParameter("_Namespace", _namespace); +} + +std::vector BatchEnableJobsRequest::getJobIdList()const +{ + return jobIdList_; +} + +void BatchEnableJobsRequest::setJobIdList(const std::vector& jobIdList) +{ + jobIdList_ = jobIdList; + for(int dep1 = 0; dep1!= jobIdList.size(); dep1++) { + setBodyParameter("JobIdList."+ std::to_string(dep1), std::to_string(jobIdList.at(dep1))); + } +} + diff --git a/schedulerx2/src/model/BatchEnableJobsResult.cc b/schedulerx2/src/model/BatchEnableJobsResult.cc new file mode 100644 index 000000000..ccbd6edb0 --- /dev/null +++ b/schedulerx2/src/model/BatchEnableJobsResult.cc @@ -0,0 +1,65 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Schedulerx2; +using namespace AlibabaCloud::Schedulerx2::Model; + +BatchEnableJobsResult::BatchEnableJobsResult() : + ServiceResult() +{} + +BatchEnableJobsResult::BatchEnableJobsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +BatchEnableJobsResult::~BatchEnableJobsResult() +{} + +void BatchEnableJobsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Code"].isNull()) + code_ = std::stoi(value["Code"].asString()); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string BatchEnableJobsResult::getMessage()const +{ + return message_; +} + +int BatchEnableJobsResult::getCode()const +{ + return code_; +} + +bool BatchEnableJobsResult::getSuccess()const +{ + return success_; +} + diff --git a/schedulerx2/src/model/CreateAppGroupRequest.cc b/schedulerx2/src/model/CreateAppGroupRequest.cc index 5be67b235..b93e622b9 100644 --- a/schedulerx2/src/model/CreateAppGroupRequest.cc +++ b/schedulerx2/src/model/CreateAppGroupRequest.cc @@ -104,6 +104,17 @@ void CreateAppGroupRequest::setAppName(const std::string& appName) setParameter("AppName", appName); } +std::string CreateAppGroupRequest::getRegionId()const +{ + return regionId_; +} + +void CreateAppGroupRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + std::string CreateAppGroupRequest::get_Namespace()const { return _namespace_; diff --git a/schedulerx2/src/model/CreateJobRequest.cc b/schedulerx2/src/model/CreateJobRequest.cc index 7bb387b4f..c1dd503a2 100644 --- a/schedulerx2/src/model/CreateJobRequest.cc +++ b/schedulerx2/src/model/CreateJobRequest.cc @@ -93,6 +93,17 @@ void CreateJobRequest::setTimeoutKillEnable(bool timeoutKillEnable) setBodyParameter("TimeoutKillEnable", timeoutKillEnable ? "true" : "false"); } +std::string CreateJobRequest::getRegionId()const +{ + return regionId_; +} + +void CreateJobRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + int CreateJobRequest::getPageSize()const { return pageSize_; diff --git a/schedulerx2/src/model/DeleteJobRequest.cc b/schedulerx2/src/model/DeleteJobRequest.cc index 2e81cb275..904d46839 100644 --- a/schedulerx2/src/model/DeleteJobRequest.cc +++ b/schedulerx2/src/model/DeleteJobRequest.cc @@ -60,6 +60,17 @@ void DeleteJobRequest::setJobId(long jobId) setParameter("JobId", std::to_string(jobId)); } +std::string DeleteJobRequest::getRegionId()const +{ + return regionId_; +} + +void DeleteJobRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + std::string DeleteJobRequest::get_Namespace()const { return _namespace_; diff --git a/schedulerx2/src/model/DeleteWorkflowRequest.cc b/schedulerx2/src/model/DeleteWorkflowRequest.cc index a0cd7d4b2..4cf568715 100644 --- a/schedulerx2/src/model/DeleteWorkflowRequest.cc +++ b/schedulerx2/src/model/DeleteWorkflowRequest.cc @@ -38,6 +38,17 @@ void DeleteWorkflowRequest::setNamespaceSource(const std::string& namespaceSourc setParameter("NamespaceSource", namespaceSource); } +std::string DeleteWorkflowRequest::getRegionId()const +{ + return regionId_; +} + +void DeleteWorkflowRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + std::string DeleteWorkflowRequest::getGroupId()const { return groupId_; diff --git a/schedulerx2/src/model/DisableJobRequest.cc b/schedulerx2/src/model/DisableJobRequest.cc index c1fe6cdac..106b7f97a 100644 --- a/schedulerx2/src/model/DisableJobRequest.cc +++ b/schedulerx2/src/model/DisableJobRequest.cc @@ -49,6 +49,17 @@ void DisableJobRequest::setNamespaceSource(const std::string& namespaceSource) setParameter("NamespaceSource", namespaceSource); } +std::string DisableJobRequest::getRegionId()const +{ + return regionId_; +} + +void DisableJobRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + std::string DisableJobRequest::getGroupId()const { return groupId_; diff --git a/schedulerx2/src/model/DisableWorkflowRequest.cc b/schedulerx2/src/model/DisableWorkflowRequest.cc index d95d5e600..6498c0c32 100644 --- a/schedulerx2/src/model/DisableWorkflowRequest.cc +++ b/schedulerx2/src/model/DisableWorkflowRequest.cc @@ -38,6 +38,17 @@ void DisableWorkflowRequest::setNamespaceSource(const std::string& namespaceSour setParameter("NamespaceSource", namespaceSource); } +std::string DisableWorkflowRequest::getRegionId()const +{ + return regionId_; +} + +void DisableWorkflowRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + std::string DisableWorkflowRequest::getGroupId()const { return groupId_; diff --git a/schedulerx2/src/model/EnableJobRequest.cc b/schedulerx2/src/model/EnableJobRequest.cc index 009cc9ce1..4b429185f 100644 --- a/schedulerx2/src/model/EnableJobRequest.cc +++ b/schedulerx2/src/model/EnableJobRequest.cc @@ -49,6 +49,17 @@ void EnableJobRequest::setNamespaceSource(const std::string& namespaceSource) setParameter("NamespaceSource", namespaceSource); } +std::string EnableJobRequest::getRegionId()const +{ + return regionId_; +} + +void EnableJobRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + std::string EnableJobRequest::getGroupId()const { return groupId_; diff --git a/schedulerx2/src/model/EnableWorkflowRequest.cc b/schedulerx2/src/model/EnableWorkflowRequest.cc index 446bbca1c..cde8f3267 100644 --- a/schedulerx2/src/model/EnableWorkflowRequest.cc +++ b/schedulerx2/src/model/EnableWorkflowRequest.cc @@ -38,6 +38,17 @@ void EnableWorkflowRequest::setNamespaceSource(const std::string& namespaceSourc setParameter("NamespaceSource", namespaceSource); } +std::string EnableWorkflowRequest::getRegionId()const +{ + return regionId_; +} + +void EnableWorkflowRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + std::string EnableWorkflowRequest::getGroupId()const { return groupId_; diff --git a/schedulerx2/src/model/ExecuteJobRequest.cc b/schedulerx2/src/model/ExecuteJobRequest.cc index 955786006..fe5398413 100644 --- a/schedulerx2/src/model/ExecuteJobRequest.cc +++ b/schedulerx2/src/model/ExecuteJobRequest.cc @@ -49,6 +49,17 @@ void ExecuteJobRequest::setNamespaceSource(const std::string& namespaceSource) setParameter("NamespaceSource", namespaceSource); } +std::string ExecuteJobRequest::getRegionId()const +{ + return regionId_; +} + +void ExecuteJobRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + std::string ExecuteJobRequest::getGroupId()const { return groupId_; diff --git a/schedulerx2/src/model/GetJobInfoRequest.cc b/schedulerx2/src/model/GetJobInfoRequest.cc index 6ce24f908..dd0de7d9e 100644 --- a/schedulerx2/src/model/GetJobInfoRequest.cc +++ b/schedulerx2/src/model/GetJobInfoRequest.cc @@ -49,6 +49,17 @@ void GetJobInfoRequest::setNamespaceSource(const std::string& namespaceSource) setParameter("NamespaceSource", namespaceSource); } +std::string GetJobInfoRequest::getRegionId()const +{ + return regionId_; +} + +void GetJobInfoRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + std::string GetJobInfoRequest::getGroupId()const { return groupId_; diff --git a/schedulerx2/src/model/GetJobInstanceListRequest.cc b/schedulerx2/src/model/GetJobInstanceListRequest.cc index 4826d821a..c450c51c0 100644 --- a/schedulerx2/src/model/GetJobInstanceListRequest.cc +++ b/schedulerx2/src/model/GetJobInstanceListRequest.cc @@ -49,6 +49,17 @@ void GetJobInstanceListRequest::setNamespaceSource(const std::string& namespaceS setParameter("NamespaceSource", namespaceSource); } +std::string GetJobInstanceListRequest::getRegionId()const +{ + return regionId_; +} + +void GetJobInstanceListRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + std::string GetJobInstanceListRequest::getGroupId()const { return groupId_; diff --git a/schedulerx2/src/model/GrantPermissionRequest.cc b/schedulerx2/src/model/GrantPermissionRequest.cc index 14abcb128..0baa1f887 100644 --- a/schedulerx2/src/model/GrantPermissionRequest.cc +++ b/schedulerx2/src/model/GrantPermissionRequest.cc @@ -71,6 +71,17 @@ void GrantPermissionRequest::setGrantOption(bool grantOption) setParameter("GrantOption", grantOption ? "true" : "false"); } +std::string GrantPermissionRequest::getRegionId()const +{ + return regionId_; +} + +void GrantPermissionRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + std::string GrantPermissionRequest::get_Namespace()const { return _namespace_; diff --git a/schedulerx2/src/model/ListGroupsRequest.cc b/schedulerx2/src/model/ListGroupsRequest.cc new file mode 100644 index 000000000..bdce89578 --- /dev/null +++ b/schedulerx2/src/model/ListGroupsRequest.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::Schedulerx2::Model::ListGroupsRequest; + +ListGroupsRequest::ListGroupsRequest() : + RpcServiceRequest("schedulerx2", "2019-04-30", "ListGroups") +{ + setMethod(HttpRequest::Method::Get); +} + +ListGroupsRequest::~ListGroupsRequest() +{} + +std::string ListGroupsRequest::getNamespaceSource()const +{ + return namespaceSource_; +} + +void ListGroupsRequest::setNamespaceSource(const std::string& namespaceSource) +{ + namespaceSource_ = namespaceSource; + setParameter("NamespaceSource", namespaceSource); +} + +std::string ListGroupsRequest::getRegionId()const +{ + return regionId_; +} + +void ListGroupsRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +std::string ListGroupsRequest::get_Namespace()const +{ + return _namespace_; +} + +void ListGroupsRequest::set_Namespace(const std::string& _namespace) +{ + _namespace_ = _namespace; + setParameter("_Namespace", _namespace); +} + diff --git a/schedulerx2/src/model/ListGroupsResult.cc b/schedulerx2/src/model/ListGroupsResult.cc new file mode 100644 index 000000000..9c0aa7d70 --- /dev/null +++ b/schedulerx2/src/model/ListGroupsResult.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::Schedulerx2; +using namespace AlibabaCloud::Schedulerx2::Model; + +ListGroupsResult::ListGroupsResult() : + ServiceResult() +{} + +ListGroupsResult::ListGroupsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListGroupsResult::~ListGroupsResult() +{} + +void ListGroupsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + auto allAppGroupsNode = dataNode["AppGroups"]["AppGroup"]; + for (auto dataNodeAppGroupsAppGroup : allAppGroupsNode) + { + Data::AppGroup appGroupObject; + if(!dataNodeAppGroupsAppGroup["AppName"].isNull()) + appGroupObject.appName = dataNodeAppGroupsAppGroup["AppName"].asString(); + if(!dataNodeAppGroupsAppGroup["GroupId"].isNull()) + appGroupObject.groupId = dataNodeAppGroupsAppGroup["GroupId"].asString(); + if(!dataNodeAppGroupsAppGroup["AppKey"].isNull()) + appGroupObject.appKey = dataNodeAppGroupsAppGroup["AppKey"].asString(); + if(!dataNodeAppGroupsAppGroup["Description"].isNull()) + appGroupObject.description = dataNodeAppGroupsAppGroup["Description"].asString(); + data_.appGroups.push_back(appGroupObject); + } + if(!value["Code"].isNull()) + code_ = std::stoi(value["Code"].asString()); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string ListGroupsResult::getMessage()const +{ + return message_; +} + +ListGroupsResult::Data ListGroupsResult::getData()const +{ + return data_; +} + +int ListGroupsResult::getCode()const +{ + return code_; +} + +bool ListGroupsResult::getSuccess()const +{ + return success_; +} + diff --git a/schedulerx2/src/model/ListJobsRequest.cc b/schedulerx2/src/model/ListJobsRequest.cc new file mode 100644 index 000000000..be9da416f --- /dev/null +++ b/schedulerx2/src/model/ListJobsRequest.cc @@ -0,0 +1,95 @@ +/* + * 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::Schedulerx2::Model::ListJobsRequest; + +ListJobsRequest::ListJobsRequest() : + RpcServiceRequest("schedulerx2", "2019-04-30", "ListJobs") +{ + setMethod(HttpRequest::Method::Get); +} + +ListJobsRequest::~ListJobsRequest() +{} + +std::string ListJobsRequest::getNamespaceSource()const +{ + return namespaceSource_; +} + +void ListJobsRequest::setNamespaceSource(const std::string& namespaceSource) +{ + namespaceSource_ = namespaceSource; + setParameter("NamespaceSource", namespaceSource); +} + +std::string ListJobsRequest::getRegionId()const +{ + return regionId_; +} + +void ListJobsRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +std::string ListJobsRequest::getGroupId()const +{ + return groupId_; +} + +void ListJobsRequest::setGroupId(const std::string& groupId) +{ + groupId_ = groupId; + setParameter("GroupId", groupId); +} + +std::string ListJobsRequest::get_Namespace()const +{ + return _namespace_; +} + +void ListJobsRequest::set_Namespace(const std::string& _namespace) +{ + _namespace_ = _namespace; + setParameter("_Namespace", _namespace); +} + +std::string ListJobsRequest::getJobName()const +{ + return jobName_; +} + +void ListJobsRequest::setJobName(const std::string& jobName) +{ + jobName_ = jobName; + setParameter("JobName", jobName); +} + +std::string ListJobsRequest::getStatus()const +{ + return status_; +} + +void ListJobsRequest::setStatus(const std::string& status) +{ + status_ = status; + setParameter("Status", status); +} + diff --git a/schedulerx2/src/model/ListJobsResult.cc b/schedulerx2/src/model/ListJobsResult.cc new file mode 100644 index 000000000..be389f770 --- /dev/null +++ b/schedulerx2/src/model/ListJobsResult.cc @@ -0,0 +1,145 @@ +/* + * 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::Schedulerx2; +using namespace AlibabaCloud::Schedulerx2::Model; + +ListJobsResult::ListJobsResult() : + ServiceResult() +{} + +ListJobsResult::ListJobsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListJobsResult::~ListJobsResult() +{} + +void ListJobsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + auto allJobsNode = dataNode["Jobs"]["Job"]; + for (auto dataNodeJobsJob : allJobsNode) + { + Data::Job jobObject; + if(!dataNodeJobsJob["ClassName"].isNull()) + jobObject.className = dataNodeJobsJob["ClassName"].asString(); + if(!dataNodeJobsJob["JarUrl"].isNull()) + jobObject.jarUrl = dataNodeJobsJob["JarUrl"].asString(); + if(!dataNodeJobsJob["Content"].isNull()) + jobObject.content = dataNodeJobsJob["Content"].asString(); + if(!dataNodeJobsJob["Name"].isNull()) + jobObject.name = dataNodeJobsJob["Name"].asString(); + if(!dataNodeJobsJob["Description"].isNull()) + jobObject.description = dataNodeJobsJob["Description"].asString(); + if(!dataNodeJobsJob["Status"].isNull()) + jobObject.status = std::stoi(dataNodeJobsJob["Status"].asString()); + if(!dataNodeJobsJob["ExecuteMode"].isNull()) + jobObject.executeMode = dataNodeJobsJob["ExecuteMode"].asString(); + if(!dataNodeJobsJob["Parameters"].isNull()) + jobObject.parameters = dataNodeJobsJob["Parameters"].asString(); + if(!dataNodeJobsJob["MaxConcurrency"].isNull()) + jobObject.maxConcurrency = dataNodeJobsJob["MaxConcurrency"].asString(); + if(!dataNodeJobsJob["MaxAttempt"].isNull()) + jobObject.maxAttempt = std::stoi(dataNodeJobsJob["MaxAttempt"].asString()); + if(!dataNodeJobsJob["AttemptInterval"].isNull()) + jobObject.attemptInterval = std::stoi(dataNodeJobsJob["AttemptInterval"].asString()); + if(!dataNodeJobsJob["JobId"].isNull()) + jobObject.jobId = std::stol(dataNodeJobsJob["JobId"].asString()); + auto mapTaskXAttrsNode = value["MapTaskXAttrs"]; + if(!mapTaskXAttrsNode["PageSize"].isNull()) + jobObject.mapTaskXAttrs.pageSize = std::stoi(mapTaskXAttrsNode["PageSize"].asString()); + if(!mapTaskXAttrsNode["ConsumerSize"].isNull()) + jobObject.mapTaskXAttrs.consumerSize = std::stoi(mapTaskXAttrsNode["ConsumerSize"].asString()); + if(!mapTaskXAttrsNode["QueueSize"].isNull()) + jobObject.mapTaskXAttrs.queueSize = std::stoi(mapTaskXAttrsNode["QueueSize"].asString()); + if(!mapTaskXAttrsNode["DispatcherSize"].isNull()) + jobObject.mapTaskXAttrs.dispatcherSize = std::stoi(mapTaskXAttrsNode["DispatcherSize"].asString()); + if(!mapTaskXAttrsNode["TaskMaxAttempt"].isNull()) + jobObject.mapTaskXAttrs.taskMaxAttempt = std::stoi(mapTaskXAttrsNode["TaskMaxAttempt"].asString()); + if(!mapTaskXAttrsNode["TaskAttemptInterval"].isNull()) + jobObject.mapTaskXAttrs.taskAttemptInterval = std::stoi(mapTaskXAttrsNode["TaskAttemptInterval"].asString()); + auto timeConfigNode = value["TimeConfig"]; + if(!timeConfigNode["TimeType"].isNull()) + jobObject.timeConfig.timeType = std::stoi(timeConfigNode["TimeType"].asString()); + if(!timeConfigNode["TimeExpression"].isNull()) + jobObject.timeConfig.timeExpression = timeConfigNode["TimeExpression"].asString(); + if(!timeConfigNode["Calendar"].isNull()) + jobObject.timeConfig.calendar = timeConfigNode["Calendar"].asString(); + if(!timeConfigNode["DataOffset"].isNull()) + jobObject.timeConfig.dataOffset = std::stoi(timeConfigNode["DataOffset"].asString()); + auto jobMonitorInfoNode = value["JobMonitorInfo"]; + auto allContactInfoNode = jobMonitorInfoNode["ContactInfo"]["ContactInfoItem"]; + for (auto jobMonitorInfoNodeContactInfoContactInfoItem : allContactInfoNode) + { + Data::Job::JobMonitorInfo::ContactInfoItem contactInfoItemObject; + if(!jobMonitorInfoNodeContactInfoContactInfoItem["UserName"].isNull()) + contactInfoItemObject.userName = jobMonitorInfoNodeContactInfoContactInfoItem["UserName"].asString(); + if(!jobMonitorInfoNodeContactInfoContactInfoItem["UserPhone"].isNull()) + contactInfoItemObject.userPhone = jobMonitorInfoNodeContactInfoContactInfoItem["UserPhone"].asString(); + jobObject.jobMonitorInfo.contactInfo.push_back(contactInfoItemObject); + } + auto monitorConfigNode = jobMonitorInfoNode["MonitorConfig"]; + if(!monitorConfigNode["TimeoutEnable"].isNull()) + jobObject.jobMonitorInfo.monitorConfig.timeoutEnable = monitorConfigNode["TimeoutEnable"].asString() == "true"; + if(!monitorConfigNode["Timeout"].isNull()) + jobObject.jobMonitorInfo.monitorConfig.timeout = std::stol(monitorConfigNode["Timeout"].asString()); + if(!monitorConfigNode["TimeoutKillEnable"].isNull()) + jobObject.jobMonitorInfo.monitorConfig.timeoutKillEnable = monitorConfigNode["TimeoutKillEnable"].asString() == "true"; + if(!monitorConfigNode["FailEnable"].isNull()) + jobObject.jobMonitorInfo.monitorConfig.failEnable = monitorConfigNode["FailEnable"].asString() == "true"; + if(!monitorConfigNode["SendChannel"].isNull()) + jobObject.jobMonitorInfo.monitorConfig.sendChannel = monitorConfigNode["SendChannel"].asString(); + data_.jobs.push_back(jobObject); + } + if(!value["Code"].isNull()) + code_ = std::stoi(value["Code"].asString()); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string ListJobsResult::getMessage()const +{ + return message_; +} + +ListJobsResult::Data ListJobsResult::getData()const +{ + return data_; +} + +int ListJobsResult::getCode()const +{ + return code_; +} + +bool ListJobsResult::getSuccess()const +{ + return success_; +} + diff --git a/schedulerx2/src/model/ListNamespacesRequest.cc b/schedulerx2/src/model/ListNamespacesRequest.cc new file mode 100644 index 000000000..97cd7b01c --- /dev/null +++ b/schedulerx2/src/model/ListNamespacesRequest.cc @@ -0,0 +1,40 @@ +/* + * 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::Schedulerx2::Model::ListNamespacesRequest; + +ListNamespacesRequest::ListNamespacesRequest() : + RpcServiceRequest("schedulerx2", "2019-04-30", "ListNamespaces") +{ + setMethod(HttpRequest::Method::Get); +} + +ListNamespacesRequest::~ListNamespacesRequest() +{} + +std::string ListNamespacesRequest::getRegionId()const +{ + return regionId_; +} + +void ListNamespacesRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + diff --git a/schedulerx2/src/model/ListNamespacesResult.cc b/schedulerx2/src/model/ListNamespacesResult.cc new file mode 100644 index 000000000..c6c0bab9b --- /dev/null +++ b/schedulerx2/src/model/ListNamespacesResult.cc @@ -0,0 +1,83 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Schedulerx2; +using namespace AlibabaCloud::Schedulerx2::Model; + +ListNamespacesResult::ListNamespacesResult() : + ServiceResult() +{} + +ListNamespacesResult::ListNamespacesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListNamespacesResult::~ListNamespacesResult() +{} + +void ListNamespacesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + auto allNamespacesNode = dataNode["Namespaces"]["Namespace"]; + for (auto dataNodeNamespacesNamespace : allNamespacesNode) + { + Data::_Namespace _namespaceObject; + if(!dataNodeNamespacesNamespace["Name"].isNull()) + _namespaceObject.name = dataNodeNamespacesNamespace["Name"].asString(); + if(!dataNodeNamespacesNamespace["UId"].isNull()) + _namespaceObject.uId = dataNodeNamespacesNamespace["UId"].asString(); + if(!dataNodeNamespacesNamespace["Description"].isNull()) + _namespaceObject.description = dataNodeNamespacesNamespace["Description"].asString(); + data_.namespaces.push_back(_namespaceObject); + } + if(!value["Code"].isNull()) + code_ = std::stoi(value["Code"].asString()); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string ListNamespacesResult::getMessage()const +{ + return message_; +} + +ListNamespacesResult::Data ListNamespacesResult::getData()const +{ + return data_; +} + +int ListNamespacesResult::getCode()const +{ + return code_; +} + +bool ListNamespacesResult::getSuccess()const +{ + return success_; +} + diff --git a/schedulerx2/src/model/RevokePermissionRequest.cc b/schedulerx2/src/model/RevokePermissionRequest.cc index e8936f247..ba3f1da48 100644 --- a/schedulerx2/src/model/RevokePermissionRequest.cc +++ b/schedulerx2/src/model/RevokePermissionRequest.cc @@ -38,6 +38,17 @@ void RevokePermissionRequest::setNamespaceSource(const std::string& namespaceSou setParameter("NamespaceSource", namespaceSource); } +std::string RevokePermissionRequest::getRegionId()const +{ + return regionId_; +} + +void RevokePermissionRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + std::string RevokePermissionRequest::getGroupId()const { return groupId_; diff --git a/schedulerx2/src/model/StopInstanceRequest.cc b/schedulerx2/src/model/StopInstanceRequest.cc index 6822b0271..54f43571e 100644 --- a/schedulerx2/src/model/StopInstanceRequest.cc +++ b/schedulerx2/src/model/StopInstanceRequest.cc @@ -60,6 +60,17 @@ void StopInstanceRequest::setInstanceId(long instanceId) setParameter("InstanceId", std::to_string(instanceId)); } +std::string StopInstanceRequest::getRegionId()const +{ + return regionId_; +} + +void StopInstanceRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + std::string StopInstanceRequest::getGroupId()const { return groupId_; diff --git a/schedulerx2/src/model/UpdateJobRequest.cc b/schedulerx2/src/model/UpdateJobRequest.cc index 24c718aac..7a53a8b85 100644 --- a/schedulerx2/src/model/UpdateJobRequest.cc +++ b/schedulerx2/src/model/UpdateJobRequest.cc @@ -104,6 +104,17 @@ void UpdateJobRequest::setJobId(long jobId) setBodyParameter("JobId", std::to_string(jobId)); } +std::string UpdateJobRequest::getRegionId()const +{ + return regionId_; +} + +void UpdateJobRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + int UpdateJobRequest::getPageSize()const { return pageSize_;