Compare commits

..

2 Commits

Author SHA1 Message Date
sdk-team
7bde7a21f4 Supported List Namespaces. 2021-02-23 02:22:22 +00:00
sdk-team
e912c2adc5 Support input parameter DeploymentSetId for CreateAutoProvisioningGroup. 2021-02-22 08:42:47 +00:00
58 changed files with 2227 additions and 0 deletions

View File

@@ -1,3 +1,11 @@
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.
2021-02-19 Version: patch
- Generated 2020-01-11 for `servicemesh`.

View File

@@ -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

View File

@@ -22,6 +22,12 @@
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RpcServiceClient.h>
#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<Error, Model::BatchDeleteJobsResult> BatchDeleteJobsOutcome;
typedef std::future<BatchDeleteJobsOutcome> BatchDeleteJobsOutcomeCallable;
typedef std::function<void(const Schedulerx2Client*, const Model::BatchDeleteJobsRequest&, const BatchDeleteJobsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BatchDeleteJobsAsyncHandler;
typedef Outcome<Error, Model::BatchDisableJobsResult> BatchDisableJobsOutcome;
typedef std::future<BatchDisableJobsOutcome> BatchDisableJobsOutcomeCallable;
typedef std::function<void(const Schedulerx2Client*, const Model::BatchDisableJobsRequest&, const BatchDisableJobsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BatchDisableJobsAsyncHandler;
typedef Outcome<Error, Model::BatchEnableJobsResult> BatchEnableJobsOutcome;
typedef std::future<BatchEnableJobsOutcome> BatchEnableJobsOutcomeCallable;
typedef std::function<void(const Schedulerx2Client*, const Model::BatchEnableJobsRequest&, const BatchEnableJobsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BatchEnableJobsAsyncHandler;
typedef Outcome<Error, Model::CreateAppGroupResult> CreateAppGroupOutcome;
typedef std::future<CreateAppGroupOutcome> CreateAppGroupOutcomeCallable;
typedef std::function<void(const Schedulerx2Client*, const Model::CreateAppGroupRequest&, const CreateAppGroupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateAppGroupAsyncHandler;
@@ -112,6 +133,15 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::GrantPermissionResult> GrantPermissionOutcome;
typedef std::future<GrantPermissionOutcome> GrantPermissionOutcomeCallable;
typedef std::function<void(const Schedulerx2Client*, const Model::GrantPermissionRequest&, const GrantPermissionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GrantPermissionAsyncHandler;
typedef Outcome<Error, Model::ListGroupsResult> ListGroupsOutcome;
typedef std::future<ListGroupsOutcome> ListGroupsOutcomeCallable;
typedef std::function<void(const Schedulerx2Client*, const Model::ListGroupsRequest&, const ListGroupsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListGroupsAsyncHandler;
typedef Outcome<Error, Model::ListJobsResult> ListJobsOutcome;
typedef std::future<ListJobsOutcome> ListJobsOutcomeCallable;
typedef std::function<void(const Schedulerx2Client*, const Model::ListJobsRequest&, const ListJobsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListJobsAsyncHandler;
typedef Outcome<Error, Model::ListNamespacesResult> ListNamespacesOutcome;
typedef std::future<ListNamespacesOutcome> ListNamespacesOutcomeCallable;
typedef std::function<void(const Schedulerx2Client*, const Model::ListNamespacesRequest&, const ListNamespacesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListNamespacesAsyncHandler;
typedef Outcome<Error, Model::RevokePermissionResult> RevokePermissionOutcome;
typedef std::future<RevokePermissionOutcome> RevokePermissionOutcomeCallable;
typedef std::function<void(const Schedulerx2Client*, const Model::RevokePermissionRequest&, const RevokePermissionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RevokePermissionAsyncHandler;
@@ -126,6 +156,15 @@ namespace AlibabaCloud
Schedulerx2Client(const std::shared_ptr<CredentialsProvider> &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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& context = nullptr) const;
RevokePermissionOutcomeCallable revokePermissionCallable(const Model::RevokePermissionRequest& request) const;

View File

@@ -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 <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/schedulerx2/Schedulerx2Export.h>
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<long> getJobIdList()const;
void setJobIdList(const std::vector<long>& 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<long> jobIdList_;
std::string regionId_;
std::string _namespace_;
};
}
}
}
#endif // !ALIBABACLOUD_SCHEDULERX2_MODEL_BATCHDELETEJOBSREQUEST_H_

View File

@@ -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 <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/schedulerx2/Schedulerx2Export.h>
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_

View File

@@ -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 <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/schedulerx2/Schedulerx2Export.h>
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<long> getJobIdList()const;
void setJobIdList(const std::vector<long>& jobIdList);
private:
std::string namespaceSource_;
std::string regionId_;
std::string groupId_;
std::string _namespace_;
std::vector<long> jobIdList_;
};
}
}
}
#endif // !ALIBABACLOUD_SCHEDULERX2_MODEL_BATCHDISABLEJOBSREQUEST_H_

View File

@@ -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 <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/schedulerx2/Schedulerx2Export.h>
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_

View File

@@ -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 <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/schedulerx2/Schedulerx2Export.h>
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<long> getJobIdList()const;
void setJobIdList(const std::vector<long>& jobIdList);
private:
std::string namespaceSource_;
std::string regionId_;
std::string groupId_;
std::string _namespace_;
std::vector<long> jobIdList_;
};
}
}
}
#endif // !ALIBABACLOUD_SCHEDULERX2_MODEL_BATCHENABLEJOBSREQUEST_H_

View File

@@ -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 <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/schedulerx2/Schedulerx2Export.h>
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_

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;
};

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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 <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/schedulerx2/Schedulerx2Export.h>
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_

View File

@@ -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 <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/schedulerx2/Schedulerx2Export.h>
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<AppGroup> 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_

View File

@@ -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 <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/schedulerx2/Schedulerx2Export.h>
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_

View File

@@ -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 <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/schedulerx2/Schedulerx2Export.h>
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<ContactInfoItem> 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<Job> 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_

View File

@@ -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 <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/schedulerx2/Schedulerx2Export.h>
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_

View File

@@ -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 <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/schedulerx2/Schedulerx2Export.h>
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_

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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<const AsyncCallerContext>& 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<std::packaged_task<BatchDeleteJobsOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<BatchDisableJobsOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<BatchEnableJobsOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<ListGroupsOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<ListJobsOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<ListNamespacesOutcome()>>(
[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();

View File

@@ -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 <alibabacloud/schedulerx2/model/BatchDeleteJobsRequest.h>
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<long> BatchDeleteJobsRequest::getJobIdList()const
{
return jobIdList_;
}
void BatchDeleteJobsRequest::setJobIdList(const std::vector<long>& 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);
}

View File

@@ -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 <alibabacloud/schedulerx2/model/BatchDeleteJobsResult.h>
#include <json/json.h>
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_;
}

View File

@@ -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 <alibabacloud/schedulerx2/model/BatchDisableJobsRequest.h>
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<long> BatchDisableJobsRequest::getJobIdList()const
{
return jobIdList_;
}
void BatchDisableJobsRequest::setJobIdList(const std::vector<long>& jobIdList)
{
jobIdList_ = jobIdList;
for(int dep1 = 0; dep1!= jobIdList.size(); dep1++) {
setBodyParameter("JobIdList."+ std::to_string(dep1), std::to_string(jobIdList.at(dep1)));
}
}

View File

@@ -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 <alibabacloud/schedulerx2/model/BatchDisableJobsResult.h>
#include <json/json.h>
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_;
}

View File

@@ -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 <alibabacloud/schedulerx2/model/BatchEnableJobsRequest.h>
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<long> BatchEnableJobsRequest::getJobIdList()const
{
return jobIdList_;
}
void BatchEnableJobsRequest::setJobIdList(const std::vector<long>& jobIdList)
{
jobIdList_ = jobIdList;
for(int dep1 = 0; dep1!= jobIdList.size(); dep1++) {
setBodyParameter("JobIdList."+ std::to_string(dep1), std::to_string(jobIdList.at(dep1)));
}
}

View File

@@ -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 <alibabacloud/schedulerx2/model/BatchEnableJobsResult.h>
#include <json/json.h>
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_;
}

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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 <alibabacloud/schedulerx2/model/ListGroupsRequest.h>
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);
}

View File

@@ -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 <alibabacloud/schedulerx2/model/ListGroupsResult.h>
#include <json/json.h>
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_;
}

View File

@@ -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 <alibabacloud/schedulerx2/model/ListJobsRequest.h>
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);
}

View File

@@ -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 <alibabacloud/schedulerx2/model/ListJobsResult.h>
#include <json/json.h>
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_;
}

View File

@@ -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 <alibabacloud/schedulerx2/model/ListNamespacesRequest.h>
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);
}

View File

@@ -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 <alibabacloud/schedulerx2/model/ListNamespacesResult.h>
#include <json/json.h>
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_;
}

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;