Add schedule crud api.

This commit is contained in:
sdk-team
2020-05-22 11:02:20 +08:00
parent 37abc8eec5
commit 3d5b584e84
25 changed files with 1685 additions and 6 deletions

View File

@@ -1,3 +1,6 @@
2020-05-22 Version: 1.36.428
- Add schedule crud api.
2020-05-21 Version: 1.36.427
- Support more error Codes.

View File

@@ -1 +1 @@
1.36.427
1.36.428

View File

@@ -23,18 +23,26 @@ set(fnf_public_header
set(fnf_public_header_model
include/alibabacloud/fnf/model/CreateFlowRequest.h
include/alibabacloud/fnf/model/CreateFlowResult.h
include/alibabacloud/fnf/model/CreateScheduleRequest.h
include/alibabacloud/fnf/model/CreateScheduleResult.h
include/alibabacloud/fnf/model/DeleteFlowRequest.h
include/alibabacloud/fnf/model/DeleteFlowResult.h
include/alibabacloud/fnf/model/DeleteScheduleRequest.h
include/alibabacloud/fnf/model/DeleteScheduleResult.h
include/alibabacloud/fnf/model/DescribeExecutionRequest.h
include/alibabacloud/fnf/model/DescribeExecutionResult.h
include/alibabacloud/fnf/model/DescribeFlowRequest.h
include/alibabacloud/fnf/model/DescribeFlowResult.h
include/alibabacloud/fnf/model/DescribeScheduleRequest.h
include/alibabacloud/fnf/model/DescribeScheduleResult.h
include/alibabacloud/fnf/model/GetExecutionHistoryRequest.h
include/alibabacloud/fnf/model/GetExecutionHistoryResult.h
include/alibabacloud/fnf/model/ListExecutionsRequest.h
include/alibabacloud/fnf/model/ListExecutionsResult.h
include/alibabacloud/fnf/model/ListFlowsRequest.h
include/alibabacloud/fnf/model/ListFlowsResult.h
include/alibabacloud/fnf/model/ListSchedulesRequest.h
include/alibabacloud/fnf/model/ListSchedulesResult.h
include/alibabacloud/fnf/model/ReportTaskFailedRequest.h
include/alibabacloud/fnf/model/ReportTaskFailedResult.h
include/alibabacloud/fnf/model/ReportTaskSucceededRequest.h
@@ -44,24 +52,34 @@ set(fnf_public_header_model
include/alibabacloud/fnf/model/StopExecutionRequest.h
include/alibabacloud/fnf/model/StopExecutionResult.h
include/alibabacloud/fnf/model/UpdateFlowRequest.h
include/alibabacloud/fnf/model/UpdateFlowResult.h )
include/alibabacloud/fnf/model/UpdateFlowResult.h
include/alibabacloud/fnf/model/UpdateScheduleRequest.h
include/alibabacloud/fnf/model/UpdateScheduleResult.h )
set(fnf_src
src/FnfClient.cc
src/model/CreateFlowRequest.cc
src/model/CreateFlowResult.cc
src/model/CreateScheduleRequest.cc
src/model/CreateScheduleResult.cc
src/model/DeleteFlowRequest.cc
src/model/DeleteFlowResult.cc
src/model/DeleteScheduleRequest.cc
src/model/DeleteScheduleResult.cc
src/model/DescribeExecutionRequest.cc
src/model/DescribeExecutionResult.cc
src/model/DescribeFlowRequest.cc
src/model/DescribeFlowResult.cc
src/model/DescribeScheduleRequest.cc
src/model/DescribeScheduleResult.cc
src/model/GetExecutionHistoryRequest.cc
src/model/GetExecutionHistoryResult.cc
src/model/ListExecutionsRequest.cc
src/model/ListExecutionsResult.cc
src/model/ListFlowsRequest.cc
src/model/ListFlowsResult.cc
src/model/ListSchedulesRequest.cc
src/model/ListSchedulesResult.cc
src/model/ReportTaskFailedRequest.cc
src/model/ReportTaskFailedResult.cc
src/model/ReportTaskSucceededRequest.cc
@@ -71,7 +89,9 @@ set(fnf_src
src/model/StopExecutionRequest.cc
src/model/StopExecutionResult.cc
src/model/UpdateFlowRequest.cc
src/model/UpdateFlowResult.cc )
src/model/UpdateFlowResult.cc
src/model/UpdateScheduleRequest.cc
src/model/UpdateScheduleResult.cc )
add_library(fnf ${LIB_TYPE}
${fnf_public_header}

View File

@@ -24,18 +24,26 @@
#include "FnfExport.h"
#include "model/CreateFlowRequest.h"
#include "model/CreateFlowResult.h"
#include "model/CreateScheduleRequest.h"
#include "model/CreateScheduleResult.h"
#include "model/DeleteFlowRequest.h"
#include "model/DeleteFlowResult.h"
#include "model/DeleteScheduleRequest.h"
#include "model/DeleteScheduleResult.h"
#include "model/DescribeExecutionRequest.h"
#include "model/DescribeExecutionResult.h"
#include "model/DescribeFlowRequest.h"
#include "model/DescribeFlowResult.h"
#include "model/DescribeScheduleRequest.h"
#include "model/DescribeScheduleResult.h"
#include "model/GetExecutionHistoryRequest.h"
#include "model/GetExecutionHistoryResult.h"
#include "model/ListExecutionsRequest.h"
#include "model/ListExecutionsResult.h"
#include "model/ListFlowsRequest.h"
#include "model/ListFlowsResult.h"
#include "model/ListSchedulesRequest.h"
#include "model/ListSchedulesResult.h"
#include "model/ReportTaskFailedRequest.h"
#include "model/ReportTaskFailedResult.h"
#include "model/ReportTaskSucceededRequest.h"
@@ -46,6 +54,8 @@
#include "model/StopExecutionResult.h"
#include "model/UpdateFlowRequest.h"
#include "model/UpdateFlowResult.h"
#include "model/UpdateScheduleRequest.h"
#include "model/UpdateScheduleResult.h"
namespace AlibabaCloud
@@ -58,15 +68,24 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::CreateFlowResult> CreateFlowOutcome;
typedef std::future<CreateFlowOutcome> CreateFlowOutcomeCallable;
typedef std::function<void(const FnfClient*, const Model::CreateFlowRequest&, const CreateFlowOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateFlowAsyncHandler;
typedef Outcome<Error, Model::CreateScheduleResult> CreateScheduleOutcome;
typedef std::future<CreateScheduleOutcome> CreateScheduleOutcomeCallable;
typedef std::function<void(const FnfClient*, const Model::CreateScheduleRequest&, const CreateScheduleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateScheduleAsyncHandler;
typedef Outcome<Error, Model::DeleteFlowResult> DeleteFlowOutcome;
typedef std::future<DeleteFlowOutcome> DeleteFlowOutcomeCallable;
typedef std::function<void(const FnfClient*, const Model::DeleteFlowRequest&, const DeleteFlowOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteFlowAsyncHandler;
typedef Outcome<Error, Model::DeleteScheduleResult> DeleteScheduleOutcome;
typedef std::future<DeleteScheduleOutcome> DeleteScheduleOutcomeCallable;
typedef std::function<void(const FnfClient*, const Model::DeleteScheduleRequest&, const DeleteScheduleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteScheduleAsyncHandler;
typedef Outcome<Error, Model::DescribeExecutionResult> DescribeExecutionOutcome;
typedef std::future<DescribeExecutionOutcome> DescribeExecutionOutcomeCallable;
typedef std::function<void(const FnfClient*, const Model::DescribeExecutionRequest&, const DescribeExecutionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeExecutionAsyncHandler;
typedef Outcome<Error, Model::DescribeFlowResult> DescribeFlowOutcome;
typedef std::future<DescribeFlowOutcome> DescribeFlowOutcomeCallable;
typedef std::function<void(const FnfClient*, const Model::DescribeFlowRequest&, const DescribeFlowOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeFlowAsyncHandler;
typedef Outcome<Error, Model::DescribeScheduleResult> DescribeScheduleOutcome;
typedef std::future<DescribeScheduleOutcome> DescribeScheduleOutcomeCallable;
typedef std::function<void(const FnfClient*, const Model::DescribeScheduleRequest&, const DescribeScheduleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeScheduleAsyncHandler;
typedef Outcome<Error, Model::GetExecutionHistoryResult> GetExecutionHistoryOutcome;
typedef std::future<GetExecutionHistoryOutcome> GetExecutionHistoryOutcomeCallable;
typedef std::function<void(const FnfClient*, const Model::GetExecutionHistoryRequest&, const GetExecutionHistoryOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetExecutionHistoryAsyncHandler;
@@ -76,6 +95,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ListFlowsResult> ListFlowsOutcome;
typedef std::future<ListFlowsOutcome> ListFlowsOutcomeCallable;
typedef std::function<void(const FnfClient*, const Model::ListFlowsRequest&, const ListFlowsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListFlowsAsyncHandler;
typedef Outcome<Error, Model::ListSchedulesResult> ListSchedulesOutcome;
typedef std::future<ListSchedulesOutcome> ListSchedulesOutcomeCallable;
typedef std::function<void(const FnfClient*, const Model::ListSchedulesRequest&, const ListSchedulesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListSchedulesAsyncHandler;
typedef Outcome<Error, Model::ReportTaskFailedResult> ReportTaskFailedOutcome;
typedef std::future<ReportTaskFailedOutcome> ReportTaskFailedOutcomeCallable;
typedef std::function<void(const FnfClient*, const Model::ReportTaskFailedRequest&, const ReportTaskFailedOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ReportTaskFailedAsyncHandler;
@@ -91,6 +113,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::UpdateFlowResult> UpdateFlowOutcome;
typedef std::future<UpdateFlowOutcome> UpdateFlowOutcomeCallable;
typedef std::function<void(const FnfClient*, const Model::UpdateFlowRequest&, const UpdateFlowOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateFlowAsyncHandler;
typedef Outcome<Error, Model::UpdateScheduleResult> UpdateScheduleOutcome;
typedef std::future<UpdateScheduleOutcome> UpdateScheduleOutcomeCallable;
typedef std::function<void(const FnfClient*, const Model::UpdateScheduleRequest&, const UpdateScheduleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateScheduleAsyncHandler;
FnfClient(const Credentials &credentials, const ClientConfiguration &configuration);
FnfClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
@@ -99,15 +124,24 @@ namespace AlibabaCloud
CreateFlowOutcome createFlow(const Model::CreateFlowRequest &request)const;
void createFlowAsync(const Model::CreateFlowRequest& request, const CreateFlowAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateFlowOutcomeCallable createFlowCallable(const Model::CreateFlowRequest& request) const;
CreateScheduleOutcome createSchedule(const Model::CreateScheduleRequest &request)const;
void createScheduleAsync(const Model::CreateScheduleRequest& request, const CreateScheduleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateScheduleOutcomeCallable createScheduleCallable(const Model::CreateScheduleRequest& request) const;
DeleteFlowOutcome deleteFlow(const Model::DeleteFlowRequest &request)const;
void deleteFlowAsync(const Model::DeleteFlowRequest& request, const DeleteFlowAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DeleteFlowOutcomeCallable deleteFlowCallable(const Model::DeleteFlowRequest& request) const;
DeleteScheduleOutcome deleteSchedule(const Model::DeleteScheduleRequest &request)const;
void deleteScheduleAsync(const Model::DeleteScheduleRequest& request, const DeleteScheduleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DeleteScheduleOutcomeCallable deleteScheduleCallable(const Model::DeleteScheduleRequest& request) const;
DescribeExecutionOutcome describeExecution(const Model::DescribeExecutionRequest &request)const;
void describeExecutionAsync(const Model::DescribeExecutionRequest& request, const DescribeExecutionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeExecutionOutcomeCallable describeExecutionCallable(const Model::DescribeExecutionRequest& request) const;
DescribeFlowOutcome describeFlow(const Model::DescribeFlowRequest &request)const;
void describeFlowAsync(const Model::DescribeFlowRequest& request, const DescribeFlowAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeFlowOutcomeCallable describeFlowCallable(const Model::DescribeFlowRequest& request) const;
DescribeScheduleOutcome describeSchedule(const Model::DescribeScheduleRequest &request)const;
void describeScheduleAsync(const Model::DescribeScheduleRequest& request, const DescribeScheduleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeScheduleOutcomeCallable describeScheduleCallable(const Model::DescribeScheduleRequest& request) const;
GetExecutionHistoryOutcome getExecutionHistory(const Model::GetExecutionHistoryRequest &request)const;
void getExecutionHistoryAsync(const Model::GetExecutionHistoryRequest& request, const GetExecutionHistoryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetExecutionHistoryOutcomeCallable getExecutionHistoryCallable(const Model::GetExecutionHistoryRequest& request) const;
@@ -117,6 +151,9 @@ namespace AlibabaCloud
ListFlowsOutcome listFlows(const Model::ListFlowsRequest &request)const;
void listFlowsAsync(const Model::ListFlowsRequest& request, const ListFlowsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListFlowsOutcomeCallable listFlowsCallable(const Model::ListFlowsRequest& request) const;
ListSchedulesOutcome listSchedules(const Model::ListSchedulesRequest &request)const;
void listSchedulesAsync(const Model::ListSchedulesRequest& request, const ListSchedulesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListSchedulesOutcomeCallable listSchedulesCallable(const Model::ListSchedulesRequest& request) const;
ReportTaskFailedOutcome reportTaskFailed(const Model::ReportTaskFailedRequest &request)const;
void reportTaskFailedAsync(const Model::ReportTaskFailedRequest& request, const ReportTaskFailedAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ReportTaskFailedOutcomeCallable reportTaskFailedCallable(const Model::ReportTaskFailedRequest& request) const;
@@ -132,6 +169,9 @@ namespace AlibabaCloud
UpdateFlowOutcome updateFlow(const Model::UpdateFlowRequest &request)const;
void updateFlowAsync(const Model::UpdateFlowRequest& request, const UpdateFlowAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UpdateFlowOutcomeCallable updateFlowCallable(const Model::UpdateFlowRequest& request) const;
UpdateScheduleOutcome updateSchedule(const Model::UpdateScheduleRequest &request)const;
void updateScheduleAsync(const Model::UpdateScheduleRequest& request, const UpdateScheduleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UpdateScheduleOutcomeCallable updateScheduleCallable(const Model::UpdateScheduleRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;

View File

@@ -0,0 +1,66 @@
/*
* 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_FNF_MODEL_CREATESCHEDULEREQUEST_H_
#define ALIBABACLOUD_FNF_MODEL_CREATESCHEDULEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/fnf/FnfExport.h>
namespace AlibabaCloud
{
namespace Fnf
{
namespace Model
{
class ALIBABACLOUD_FNF_EXPORT CreateScheduleRequest : public RpcServiceRequest
{
public:
CreateScheduleRequest();
~CreateScheduleRequest();
std::string getScheduleName()const;
void setScheduleName(const std::string& scheduleName);
std::string getCronExpression()const;
void setCronExpression(const std::string& cronExpression);
std::string getPayload()const;
void setPayload(const std::string& payload);
std::string getRequestId()const;
void setRequestId(const std::string& requestId);
bool getEnable()const;
void setEnable(bool enable);
std::string getDescription()const;
void setDescription(const std::string& description);
std::string getFlowName()const;
void setFlowName(const std::string& flowName);
private:
std::string scheduleName_;
std::string cronExpression_;
std::string payload_;
std::string requestId_;
bool enable_;
std::string description_;
std::string flowName_;
};
}
}
}
#endif // !ALIBABACLOUD_FNF_MODEL_CREATESCHEDULEREQUEST_H_

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.
*/
#ifndef ALIBABACLOUD_FNF_MODEL_CREATESCHEDULERESULT_H_
#define ALIBABACLOUD_FNF_MODEL_CREATESCHEDULERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/fnf/FnfExport.h>
namespace AlibabaCloud
{
namespace Fnf
{
namespace Model
{
class ALIBABACLOUD_FNF_EXPORT CreateScheduleResult : public ServiceResult
{
public:
CreateScheduleResult();
explicit CreateScheduleResult(const std::string &payload);
~CreateScheduleResult();
std::string getDescription()const;
std::string getCreatedTime()const;
std::string getLastModifiedTime()const;
bool getEnable()const;
std::string getPayload()const;
std::string getCronExpression()const;
std::string getScheduleId()const;
std::string getScheduleName()const;
protected:
void parse(const std::string &payload);
private:
std::string description_;
std::string createdTime_;
std::string lastModifiedTime_;
bool enable_;
std::string payload_;
std::string cronExpression_;
std::string scheduleId_;
std::string scheduleName_;
};
}
}
}
#endif // !ALIBABACLOUD_FNF_MODEL_CREATESCHEDULERESULT_H_

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_FNF_MODEL_DELETESCHEDULEREQUEST_H_
#define ALIBABACLOUD_FNF_MODEL_DELETESCHEDULEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/fnf/FnfExport.h>
namespace AlibabaCloud
{
namespace Fnf
{
namespace Model
{
class ALIBABACLOUD_FNF_EXPORT DeleteScheduleRequest : public RpcServiceRequest
{
public:
DeleteScheduleRequest();
~DeleteScheduleRequest();
std::string getScheduleName()const;
void setScheduleName(const std::string& scheduleName);
std::string getRequestId()const;
void setRequestId(const std::string& requestId);
std::string getFlowName()const;
void setFlowName(const std::string& flowName);
private:
std::string scheduleName_;
std::string requestId_;
std::string flowName_;
};
}
}
}
#endif // !ALIBABACLOUD_FNF_MODEL_DELETESCHEDULEREQUEST_H_

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_FNF_MODEL_DELETESCHEDULERESULT_H_
#define ALIBABACLOUD_FNF_MODEL_DELETESCHEDULERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/fnf/FnfExport.h>
namespace AlibabaCloud
{
namespace Fnf
{
namespace Model
{
class ALIBABACLOUD_FNF_EXPORT DeleteScheduleResult : public ServiceResult
{
public:
DeleteScheduleResult();
explicit DeleteScheduleResult(const std::string &payload);
~DeleteScheduleResult();
protected:
void parse(const std::string &payload);
private:
};
}
}
}
#endif // !ALIBABACLOUD_FNF_MODEL_DELETESCHEDULERESULT_H_

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_FNF_MODEL_DESCRIBESCHEDULEREQUEST_H_
#define ALIBABACLOUD_FNF_MODEL_DESCRIBESCHEDULEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/fnf/FnfExport.h>
namespace AlibabaCloud
{
namespace Fnf
{
namespace Model
{
class ALIBABACLOUD_FNF_EXPORT DescribeScheduleRequest : public RpcServiceRequest
{
public:
DescribeScheduleRequest();
~DescribeScheduleRequest();
std::string getScheduleName()const;
void setScheduleName(const std::string& scheduleName);
std::string getRequestId()const;
void setRequestId(const std::string& requestId);
std::string getFlowName()const;
void setFlowName(const std::string& flowName);
private:
std::string scheduleName_;
std::string requestId_;
std::string flowName_;
};
}
}
}
#endif // !ALIBABACLOUD_FNF_MODEL_DESCRIBESCHEDULEREQUEST_H_

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.
*/
#ifndef ALIBABACLOUD_FNF_MODEL_DESCRIBESCHEDULERESULT_H_
#define ALIBABACLOUD_FNF_MODEL_DESCRIBESCHEDULERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/fnf/FnfExport.h>
namespace AlibabaCloud
{
namespace Fnf
{
namespace Model
{
class ALIBABACLOUD_FNF_EXPORT DescribeScheduleResult : public ServiceResult
{
public:
DescribeScheduleResult();
explicit DescribeScheduleResult(const std::string &payload);
~DescribeScheduleResult();
std::string getDescription()const;
std::string getCreatedTime()const;
std::string getLastModifiedTime()const;
bool getEnable()const;
std::string getPayload()const;
std::string getCronExpression()const;
std::string getScheduleId()const;
std::string getScheduleName()const;
protected:
void parse(const std::string &payload);
private:
std::string description_;
std::string createdTime_;
std::string lastModifiedTime_;
bool enable_;
std::string payload_;
std::string cronExpression_;
std::string scheduleId_;
std::string scheduleName_;
};
}
}
}
#endif // !ALIBABACLOUD_FNF_MODEL_DESCRIBESCHEDULERESULT_H_

View File

@@ -0,0 +1,57 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_FNF_MODEL_LISTSCHEDULESREQUEST_H_
#define ALIBABACLOUD_FNF_MODEL_LISTSCHEDULESREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/fnf/FnfExport.h>
namespace AlibabaCloud
{
namespace Fnf
{
namespace Model
{
class ALIBABACLOUD_FNF_EXPORT ListSchedulesRequest : public RpcServiceRequest
{
public:
ListSchedulesRequest();
~ListSchedulesRequest();
std::string getNextToken()const;
void setNextToken(const std::string& nextToken);
std::string getRequestId()const;
void setRequestId(const std::string& requestId);
int getLimit()const;
void setLimit(int limit);
std::string getFlowName()const;
void setFlowName(const std::string& flowName);
private:
std::string nextToken_;
std::string requestId_;
int limit_;
std::string flowName_;
};
}
}
}
#endif // !ALIBABACLOUD_FNF_MODEL_LISTSCHEDULESREQUEST_H_

View File

@@ -0,0 +1,64 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_FNF_MODEL_LISTSCHEDULESRESULT_H_
#define ALIBABACLOUD_FNF_MODEL_LISTSCHEDULESRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/fnf/FnfExport.h>
namespace AlibabaCloud
{
namespace Fnf
{
namespace Model
{
class ALIBABACLOUD_FNF_EXPORT ListSchedulesResult : public ServiceResult
{
public:
struct SchedulesItem
{
std::string description;
std::string createdTime;
std::string lastModifiedTime;
bool enable;
std::string payload;
std::string cronExpression;
std::string scheduleId;
std::string scheduleName;
};
ListSchedulesResult();
explicit ListSchedulesResult(const std::string &payload);
~ListSchedulesResult();
std::vector<SchedulesItem> getSchedules()const;
std::string getNextToken()const;
protected:
void parse(const std::string &payload);
private:
std::vector<SchedulesItem> schedules_;
std::string nextToken_;
};
}
}
}
#endif // !ALIBABACLOUD_FNF_MODEL_LISTSCHEDULESRESULT_H_

View File

@@ -0,0 +1,66 @@
/*
* 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_FNF_MODEL_UPDATESCHEDULEREQUEST_H_
#define ALIBABACLOUD_FNF_MODEL_UPDATESCHEDULEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/fnf/FnfExport.h>
namespace AlibabaCloud
{
namespace Fnf
{
namespace Model
{
class ALIBABACLOUD_FNF_EXPORT UpdateScheduleRequest : public RpcServiceRequest
{
public:
UpdateScheduleRequest();
~UpdateScheduleRequest();
std::string getScheduleName()const;
void setScheduleName(const std::string& scheduleName);
std::string getCronExpression()const;
void setCronExpression(const std::string& cronExpression);
std::string getPayload()const;
void setPayload(const std::string& payload);
std::string getRequestId()const;
void setRequestId(const std::string& requestId);
bool getEnable()const;
void setEnable(bool enable);
std::string getDescription()const;
void setDescription(const std::string& description);
std::string getFlowName()const;
void setFlowName(const std::string& flowName);
private:
std::string scheduleName_;
std::string cronExpression_;
std::string payload_;
std::string requestId_;
bool enable_;
std::string description_;
std::string flowName_;
};
}
}
}
#endif // !ALIBABACLOUD_FNF_MODEL_UPDATESCHEDULEREQUEST_H_

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.
*/
#ifndef ALIBABACLOUD_FNF_MODEL_UPDATESCHEDULERESULT_H_
#define ALIBABACLOUD_FNF_MODEL_UPDATESCHEDULERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/fnf/FnfExport.h>
namespace AlibabaCloud
{
namespace Fnf
{
namespace Model
{
class ALIBABACLOUD_FNF_EXPORT UpdateScheduleResult : public ServiceResult
{
public:
UpdateScheduleResult();
explicit UpdateScheduleResult(const std::string &payload);
~UpdateScheduleResult();
std::string getDescription()const;
std::string getCreatedTime()const;
std::string getLastModifiedTime()const;
bool getEnable()const;
std::string getPayload()const;
std::string getCronExpression()const;
std::string getScheduleId()const;
std::string getScheduleName()const;
protected:
void parse(const std::string &payload);
private:
std::string description_;
std::string createdTime_;
std::string lastModifiedTime_;
bool enable_;
std::string payload_;
std::string cronExpression_;
std::string scheduleId_;
std::string scheduleName_;
};
}
}
}
#endif // !ALIBABACLOUD_FNF_MODEL_UPDATESCHEDULERESULT_H_

View File

@@ -31,21 +31,21 @@ FnfClient::FnfClient(const Credentials &credentials, const ClientConfiguration &
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "fnf");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
FnfClient::FnfClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "fnf");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
FnfClient::FnfClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "fnf");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
FnfClient::~FnfClient()
@@ -87,6 +87,42 @@ FnfClient::CreateFlowOutcomeCallable FnfClient::createFlowCallable(const CreateF
return task->get_future();
}
FnfClient::CreateScheduleOutcome FnfClient::createSchedule(const CreateScheduleRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateScheduleOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateScheduleOutcome(CreateScheduleResult(outcome.result()));
else
return CreateScheduleOutcome(outcome.error());
}
void FnfClient::createScheduleAsync(const CreateScheduleRequest& request, const CreateScheduleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createSchedule(request), context);
};
asyncExecute(new Runnable(fn));
}
FnfClient::CreateScheduleOutcomeCallable FnfClient::createScheduleCallable(const CreateScheduleRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateScheduleOutcome()>>(
[this, request]()
{
return this->createSchedule(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
FnfClient::DeleteFlowOutcome FnfClient::deleteFlow(const DeleteFlowRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -123,6 +159,42 @@ FnfClient::DeleteFlowOutcomeCallable FnfClient::deleteFlowCallable(const DeleteF
return task->get_future();
}
FnfClient::DeleteScheduleOutcome FnfClient::deleteSchedule(const DeleteScheduleRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteScheduleOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteScheduleOutcome(DeleteScheduleResult(outcome.result()));
else
return DeleteScheduleOutcome(outcome.error());
}
void FnfClient::deleteScheduleAsync(const DeleteScheduleRequest& request, const DeleteScheduleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteSchedule(request), context);
};
asyncExecute(new Runnable(fn));
}
FnfClient::DeleteScheduleOutcomeCallable FnfClient::deleteScheduleCallable(const DeleteScheduleRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteScheduleOutcome()>>(
[this, request]()
{
return this->deleteSchedule(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
FnfClient::DescribeExecutionOutcome FnfClient::describeExecution(const DescribeExecutionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -195,6 +267,42 @@ FnfClient::DescribeFlowOutcomeCallable FnfClient::describeFlowCallable(const Des
return task->get_future();
}
FnfClient::DescribeScheduleOutcome FnfClient::describeSchedule(const DescribeScheduleRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeScheduleOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeScheduleOutcome(DescribeScheduleResult(outcome.result()));
else
return DescribeScheduleOutcome(outcome.error());
}
void FnfClient::describeScheduleAsync(const DescribeScheduleRequest& request, const DescribeScheduleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeSchedule(request), context);
};
asyncExecute(new Runnable(fn));
}
FnfClient::DescribeScheduleOutcomeCallable FnfClient::describeScheduleCallable(const DescribeScheduleRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeScheduleOutcome()>>(
[this, request]()
{
return this->describeSchedule(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
FnfClient::GetExecutionHistoryOutcome FnfClient::getExecutionHistory(const GetExecutionHistoryRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -303,6 +411,42 @@ FnfClient::ListFlowsOutcomeCallable FnfClient::listFlowsCallable(const ListFlows
return task->get_future();
}
FnfClient::ListSchedulesOutcome FnfClient::listSchedules(const ListSchedulesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListSchedulesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListSchedulesOutcome(ListSchedulesResult(outcome.result()));
else
return ListSchedulesOutcome(outcome.error());
}
void FnfClient::listSchedulesAsync(const ListSchedulesRequest& request, const ListSchedulesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listSchedules(request), context);
};
asyncExecute(new Runnable(fn));
}
FnfClient::ListSchedulesOutcomeCallable FnfClient::listSchedulesCallable(const ListSchedulesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListSchedulesOutcome()>>(
[this, request]()
{
return this->listSchedules(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
FnfClient::ReportTaskFailedOutcome FnfClient::reportTaskFailed(const ReportTaskFailedRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -483,3 +627,39 @@ FnfClient::UpdateFlowOutcomeCallable FnfClient::updateFlowCallable(const UpdateF
return task->get_future();
}
FnfClient::UpdateScheduleOutcome FnfClient::updateSchedule(const UpdateScheduleRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateScheduleOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateScheduleOutcome(UpdateScheduleResult(outcome.result()));
else
return UpdateScheduleOutcome(outcome.error());
}
void FnfClient::updateScheduleAsync(const UpdateScheduleRequest& request, const UpdateScheduleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateSchedule(request), context);
};
asyncExecute(new Runnable(fn));
}
FnfClient::UpdateScheduleOutcomeCallable FnfClient::updateScheduleCallable(const UpdateScheduleRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateScheduleOutcome()>>(
[this, request]()
{
return this->updateSchedule(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,106 @@
/*
* 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/fnf/model/CreateScheduleRequest.h>
using AlibabaCloud::Fnf::Model::CreateScheduleRequest;
CreateScheduleRequest::CreateScheduleRequest() :
RpcServiceRequest("fnf", "2019-03-15", "CreateSchedule")
{
setMethod(HttpRequest::Method::Post);
}
CreateScheduleRequest::~CreateScheduleRequest()
{}
std::string CreateScheduleRequest::getScheduleName()const
{
return scheduleName_;
}
void CreateScheduleRequest::setScheduleName(const std::string& scheduleName)
{
scheduleName_ = scheduleName;
setBodyParameter("ScheduleName", scheduleName);
}
std::string CreateScheduleRequest::getCronExpression()const
{
return cronExpression_;
}
void CreateScheduleRequest::setCronExpression(const std::string& cronExpression)
{
cronExpression_ = cronExpression;
setBodyParameter("CronExpression", cronExpression);
}
std::string CreateScheduleRequest::getPayload()const
{
return payload_;
}
void CreateScheduleRequest::setPayload(const std::string& payload)
{
payload_ = payload;
setBodyParameter("Payload", payload);
}
std::string CreateScheduleRequest::getRequestId()const
{
return requestId_;
}
void CreateScheduleRequest::setRequestId(const std::string& requestId)
{
requestId_ = requestId;
setParameter("RequestId", requestId);
}
bool CreateScheduleRequest::getEnable()const
{
return enable_;
}
void CreateScheduleRequest::setEnable(bool enable)
{
enable_ = enable;
setBodyParameter("Enable", enable ? "true" : "false");
}
std::string CreateScheduleRequest::getDescription()const
{
return description_;
}
void CreateScheduleRequest::setDescription(const std::string& description)
{
description_ = description;
setBodyParameter("Description", description);
}
std::string CreateScheduleRequest::getFlowName()const
{
return flowName_;
}
void CreateScheduleRequest::setFlowName(const std::string& flowName)
{
flowName_ = flowName;
setBodyParameter("FlowName", flowName);
}

View File

@@ -0,0 +1,100 @@
/*
* 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/fnf/model/CreateScheduleResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Fnf;
using namespace AlibabaCloud::Fnf::Model;
CreateScheduleResult::CreateScheduleResult() :
ServiceResult()
{}
CreateScheduleResult::CreateScheduleResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateScheduleResult::~CreateScheduleResult()
{}
void CreateScheduleResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["ScheduleName"].isNull())
scheduleName_ = value["ScheduleName"].asString();
if(!value["Description"].isNull())
description_ = value["Description"].asString();
if(!value["ScheduleId"].isNull())
scheduleId_ = value["ScheduleId"].asString();
if(!value["Payload"].isNull())
payload_ = value["Payload"].asString();
if(!value["CronExpression"].isNull())
cronExpression_ = value["CronExpression"].asString();
if(!value["Enable"].isNull())
enable_ = value["Enable"].asString() == "true";
if(!value["CreatedTime"].isNull())
createdTime_ = value["CreatedTime"].asString();
if(!value["LastModifiedTime"].isNull())
lastModifiedTime_ = value["LastModifiedTime"].asString();
}
std::string CreateScheduleResult::getDescription()const
{
return description_;
}
std::string CreateScheduleResult::getCreatedTime()const
{
return createdTime_;
}
std::string CreateScheduleResult::getLastModifiedTime()const
{
return lastModifiedTime_;
}
bool CreateScheduleResult::getEnable()const
{
return enable_;
}
std::string CreateScheduleResult::getPayload()const
{
return payload_;
}
std::string CreateScheduleResult::getCronExpression()const
{
return cronExpression_;
}
std::string CreateScheduleResult::getScheduleId()const
{
return scheduleId_;
}
std::string CreateScheduleResult::getScheduleName()const
{
return scheduleName_;
}

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/fnf/model/DeleteScheduleRequest.h>
using AlibabaCloud::Fnf::Model::DeleteScheduleRequest;
DeleteScheduleRequest::DeleteScheduleRequest() :
RpcServiceRequest("fnf", "2019-03-15", "DeleteSchedule")
{
setMethod(HttpRequest::Method::Get);
}
DeleteScheduleRequest::~DeleteScheduleRequest()
{}
std::string DeleteScheduleRequest::getScheduleName()const
{
return scheduleName_;
}
void DeleteScheduleRequest::setScheduleName(const std::string& scheduleName)
{
scheduleName_ = scheduleName;
setParameter("ScheduleName", scheduleName);
}
std::string DeleteScheduleRequest::getRequestId()const
{
return requestId_;
}
void DeleteScheduleRequest::setRequestId(const std::string& requestId)
{
requestId_ = requestId;
setParameter("RequestId", requestId);
}
std::string DeleteScheduleRequest::getFlowName()const
{
return flowName_;
}
void DeleteScheduleRequest::setFlowName(const std::string& flowName)
{
flowName_ = flowName;
setParameter("FlowName", flowName);
}

View File

@@ -0,0 +1,44 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/fnf/model/DeleteScheduleResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Fnf;
using namespace AlibabaCloud::Fnf::Model;
DeleteScheduleResult::DeleteScheduleResult() :
ServiceResult()
{}
DeleteScheduleResult::DeleteScheduleResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteScheduleResult::~DeleteScheduleResult()
{}
void DeleteScheduleResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

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/fnf/model/DescribeScheduleRequest.h>
using AlibabaCloud::Fnf::Model::DescribeScheduleRequest;
DescribeScheduleRequest::DescribeScheduleRequest() :
RpcServiceRequest("fnf", "2019-03-15", "DescribeSchedule")
{
setMethod(HttpRequest::Method::Get);
}
DescribeScheduleRequest::~DescribeScheduleRequest()
{}
std::string DescribeScheduleRequest::getScheduleName()const
{
return scheduleName_;
}
void DescribeScheduleRequest::setScheduleName(const std::string& scheduleName)
{
scheduleName_ = scheduleName;
setParameter("ScheduleName", scheduleName);
}
std::string DescribeScheduleRequest::getRequestId()const
{
return requestId_;
}
void DescribeScheduleRequest::setRequestId(const std::string& requestId)
{
requestId_ = requestId;
setParameter("RequestId", requestId);
}
std::string DescribeScheduleRequest::getFlowName()const
{
return flowName_;
}
void DescribeScheduleRequest::setFlowName(const std::string& flowName)
{
flowName_ = flowName;
setParameter("FlowName", flowName);
}

View File

@@ -0,0 +1,100 @@
/*
* 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/fnf/model/DescribeScheduleResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Fnf;
using namespace AlibabaCloud::Fnf::Model;
DescribeScheduleResult::DescribeScheduleResult() :
ServiceResult()
{}
DescribeScheduleResult::DescribeScheduleResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeScheduleResult::~DescribeScheduleResult()
{}
void DescribeScheduleResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["ScheduleName"].isNull())
scheduleName_ = value["ScheduleName"].asString();
if(!value["Description"].isNull())
description_ = value["Description"].asString();
if(!value["ScheduleId"].isNull())
scheduleId_ = value["ScheduleId"].asString();
if(!value["Payload"].isNull())
payload_ = value["Payload"].asString();
if(!value["CronExpression"].isNull())
cronExpression_ = value["CronExpression"].asString();
if(!value["Enable"].isNull())
enable_ = value["Enable"].asString() == "true";
if(!value["CreatedTime"].isNull())
createdTime_ = value["CreatedTime"].asString();
if(!value["LastModifiedTime"].isNull())
lastModifiedTime_ = value["LastModifiedTime"].asString();
}
std::string DescribeScheduleResult::getDescription()const
{
return description_;
}
std::string DescribeScheduleResult::getCreatedTime()const
{
return createdTime_;
}
std::string DescribeScheduleResult::getLastModifiedTime()const
{
return lastModifiedTime_;
}
bool DescribeScheduleResult::getEnable()const
{
return enable_;
}
std::string DescribeScheduleResult::getPayload()const
{
return payload_;
}
std::string DescribeScheduleResult::getCronExpression()const
{
return cronExpression_;
}
std::string DescribeScheduleResult::getScheduleId()const
{
return scheduleId_;
}
std::string DescribeScheduleResult::getScheduleName()const
{
return scheduleName_;
}

View File

@@ -0,0 +1,73 @@
/*
* 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/fnf/model/ListSchedulesRequest.h>
using AlibabaCloud::Fnf::Model::ListSchedulesRequest;
ListSchedulesRequest::ListSchedulesRequest() :
RpcServiceRequest("fnf", "2019-03-15", "ListSchedules")
{
setMethod(HttpRequest::Method::Get);
}
ListSchedulesRequest::~ListSchedulesRequest()
{}
std::string ListSchedulesRequest::getNextToken()const
{
return nextToken_;
}
void ListSchedulesRequest::setNextToken(const std::string& nextToken)
{
nextToken_ = nextToken;
setParameter("NextToken", nextToken);
}
std::string ListSchedulesRequest::getRequestId()const
{
return requestId_;
}
void ListSchedulesRequest::setRequestId(const std::string& requestId)
{
requestId_ = requestId;
setParameter("RequestId", requestId);
}
int ListSchedulesRequest::getLimit()const
{
return limit_;
}
void ListSchedulesRequest::setLimit(int limit)
{
limit_ = limit;
setParameter("Limit", std::to_string(limit));
}
std::string ListSchedulesRequest::getFlowName()const
{
return flowName_;
}
void ListSchedulesRequest::setFlowName(const std::string& flowName)
{
flowName_ = flowName;
setParameter("FlowName", flowName);
}

View File

@@ -0,0 +1,78 @@
/*
* 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/fnf/model/ListSchedulesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Fnf;
using namespace AlibabaCloud::Fnf::Model;
ListSchedulesResult::ListSchedulesResult() :
ServiceResult()
{}
ListSchedulesResult::ListSchedulesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListSchedulesResult::~ListSchedulesResult()
{}
void ListSchedulesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allSchedulesNode = value["Schedules"]["SchedulesItem"];
for (auto valueSchedulesSchedulesItem : allSchedulesNode)
{
SchedulesItem schedulesObject;
if(!valueSchedulesSchedulesItem["ScheduleName"].isNull())
schedulesObject.scheduleName = valueSchedulesSchedulesItem["ScheduleName"].asString();
if(!valueSchedulesSchedulesItem["Description"].isNull())
schedulesObject.description = valueSchedulesSchedulesItem["Description"].asString();
if(!valueSchedulesSchedulesItem["ScheduleId"].isNull())
schedulesObject.scheduleId = valueSchedulesSchedulesItem["ScheduleId"].asString();
if(!valueSchedulesSchedulesItem["Payload"].isNull())
schedulesObject.payload = valueSchedulesSchedulesItem["Payload"].asString();
if(!valueSchedulesSchedulesItem["CronExpression"].isNull())
schedulesObject.cronExpression = valueSchedulesSchedulesItem["CronExpression"].asString();
if(!valueSchedulesSchedulesItem["Enable"].isNull())
schedulesObject.enable = valueSchedulesSchedulesItem["Enable"].asString() == "true";
if(!valueSchedulesSchedulesItem["CreatedTime"].isNull())
schedulesObject.createdTime = valueSchedulesSchedulesItem["CreatedTime"].asString();
if(!valueSchedulesSchedulesItem["LastModifiedTime"].isNull())
schedulesObject.lastModifiedTime = valueSchedulesSchedulesItem["LastModifiedTime"].asString();
schedules_.push_back(schedulesObject);
}
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
}
std::vector<ListSchedulesResult::SchedulesItem> ListSchedulesResult::getSchedules()const
{
return schedules_;
}
std::string ListSchedulesResult::getNextToken()const
{
return nextToken_;
}

View File

@@ -0,0 +1,106 @@
/*
* 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/fnf/model/UpdateScheduleRequest.h>
using AlibabaCloud::Fnf::Model::UpdateScheduleRequest;
UpdateScheduleRequest::UpdateScheduleRequest() :
RpcServiceRequest("fnf", "2019-03-15", "UpdateSchedule")
{
setMethod(HttpRequest::Method::Post);
}
UpdateScheduleRequest::~UpdateScheduleRequest()
{}
std::string UpdateScheduleRequest::getScheduleName()const
{
return scheduleName_;
}
void UpdateScheduleRequest::setScheduleName(const std::string& scheduleName)
{
scheduleName_ = scheduleName;
setBodyParameter("ScheduleName", scheduleName);
}
std::string UpdateScheduleRequest::getCronExpression()const
{
return cronExpression_;
}
void UpdateScheduleRequest::setCronExpression(const std::string& cronExpression)
{
cronExpression_ = cronExpression;
setBodyParameter("CronExpression", cronExpression);
}
std::string UpdateScheduleRequest::getPayload()const
{
return payload_;
}
void UpdateScheduleRequest::setPayload(const std::string& payload)
{
payload_ = payload;
setBodyParameter("Payload", payload);
}
std::string UpdateScheduleRequest::getRequestId()const
{
return requestId_;
}
void UpdateScheduleRequest::setRequestId(const std::string& requestId)
{
requestId_ = requestId;
setParameter("RequestId", requestId);
}
bool UpdateScheduleRequest::getEnable()const
{
return enable_;
}
void UpdateScheduleRequest::setEnable(bool enable)
{
enable_ = enable;
setBodyParameter("Enable", enable ? "true" : "false");
}
std::string UpdateScheduleRequest::getDescription()const
{
return description_;
}
void UpdateScheduleRequest::setDescription(const std::string& description)
{
description_ = description;
setBodyParameter("Description", description);
}
std::string UpdateScheduleRequest::getFlowName()const
{
return flowName_;
}
void UpdateScheduleRequest::setFlowName(const std::string& flowName)
{
flowName_ = flowName;
setBodyParameter("FlowName", flowName);
}

View File

@@ -0,0 +1,100 @@
/*
* 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/fnf/model/UpdateScheduleResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Fnf;
using namespace AlibabaCloud::Fnf::Model;
UpdateScheduleResult::UpdateScheduleResult() :
ServiceResult()
{}
UpdateScheduleResult::UpdateScheduleResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateScheduleResult::~UpdateScheduleResult()
{}
void UpdateScheduleResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["ScheduleName"].isNull())
scheduleName_ = value["ScheduleName"].asString();
if(!value["Description"].isNull())
description_ = value["Description"].asString();
if(!value["ScheduleId"].isNull())
scheduleId_ = value["ScheduleId"].asString();
if(!value["Payload"].isNull())
payload_ = value["Payload"].asString();
if(!value["CronExpression"].isNull())
cronExpression_ = value["CronExpression"].asString();
if(!value["Enable"].isNull())
enable_ = value["Enable"].asString() == "true";
if(!value["CreatedTime"].isNull())
createdTime_ = value["CreatedTime"].asString();
if(!value["LastModifiedTime"].isNull())
lastModifiedTime_ = value["LastModifiedTime"].asString();
}
std::string UpdateScheduleResult::getDescription()const
{
return description_;
}
std::string UpdateScheduleResult::getCreatedTime()const
{
return createdTime_;
}
std::string UpdateScheduleResult::getLastModifiedTime()const
{
return lastModifiedTime_;
}
bool UpdateScheduleResult::getEnable()const
{
return enable_;
}
std::string UpdateScheduleResult::getPayload()const
{
return payload_;
}
std::string UpdateScheduleResult::getCronExpression()const
{
return cronExpression_;
}
std::string UpdateScheduleResult::getScheduleId()const
{
return scheduleId_;
}
std::string UpdateScheduleResult::getScheduleName()const
{
return scheduleName_;
}