Compare commits

...

2 Commits

Author SHA1 Message Date
sdk-team
ee902a7f28 Supported scheduler for outbound call. 2021-02-04 06:57:45 +00:00
sdk-team
fb12252d2d Supported console. 2021-02-04 06:34:05 +00:00
17 changed files with 897 additions and 3 deletions

View File

@@ -1,3 +1,9 @@
2021-02-04 Version: patch
- Supported scheduler for outbound call.
2021-02-04 Version: patch
- Supported console.
2021-02-04 Version: patch
- Supported console.

View File

@@ -91,6 +91,8 @@ set(outboundbot_public_header_model
include/alibabacloud/outboundbot/model/ExportScriptResult.h
include/alibabacloud/outboundbot/model/ImportScriptRequest.h
include/alibabacloud/outboundbot/model/ImportScriptResult.h
include/alibabacloud/outboundbot/model/InflightTaskTimeoutRequest.h
include/alibabacloud/outboundbot/model/InflightTaskTimeoutResult.h
include/alibabacloud/outboundbot/model/ListDialogueFlowsRequest.h
include/alibabacloud/outboundbot/model/ListDialogueFlowsResult.h
include/alibabacloud/outboundbot/model/ListGlobalQuestionsRequest.h
@@ -109,6 +111,8 @@ set(outboundbot_public_header_model
include/alibabacloud/outboundbot/model/ListMediaResult.h
include/alibabacloud/outboundbot/model/ListOutboundCallNumbersRequest.h
include/alibabacloud/outboundbot/model/ListOutboundCallNumbersResult.h
include/alibabacloud/outboundbot/model/ListSchedulerInstancesRequest.h
include/alibabacloud/outboundbot/model/ListSchedulerInstancesResult.h
include/alibabacloud/outboundbot/model/ListScriptPublishHistoriesRequest.h
include/alibabacloud/outboundbot/model/ListScriptPublishHistoriesResult.h
include/alibabacloud/outboundbot/model/ListScriptVoiceConfigsRequest.h
@@ -165,6 +169,8 @@ set(outboundbot_public_header_model
include/alibabacloud/outboundbot/model/SubmitScriptReviewResult.h
include/alibabacloud/outboundbot/model/SuspendJobsRequest.h
include/alibabacloud/outboundbot/model/SuspendJobsResult.h
include/alibabacloud/outboundbot/model/TaskPreparingRequest.h
include/alibabacloud/outboundbot/model/TaskPreparingResult.h
include/alibabacloud/outboundbot/model/WithdrawScriptReviewRequest.h
include/alibabacloud/outboundbot/model/WithdrawScriptReviewResult.h )
@@ -240,6 +246,8 @@ set(outboundbot_src
src/model/ExportScriptResult.cc
src/model/ImportScriptRequest.cc
src/model/ImportScriptResult.cc
src/model/InflightTaskTimeoutRequest.cc
src/model/InflightTaskTimeoutResult.cc
src/model/ListDialogueFlowsRequest.cc
src/model/ListDialogueFlowsResult.cc
src/model/ListGlobalQuestionsRequest.cc
@@ -258,6 +266,8 @@ set(outboundbot_src
src/model/ListMediaResult.cc
src/model/ListOutboundCallNumbersRequest.cc
src/model/ListOutboundCallNumbersResult.cc
src/model/ListSchedulerInstancesRequest.cc
src/model/ListSchedulerInstancesResult.cc
src/model/ListScriptPublishHistoriesRequest.cc
src/model/ListScriptPublishHistoriesResult.cc
src/model/ListScriptVoiceConfigsRequest.cc
@@ -314,6 +324,8 @@ set(outboundbot_src
src/model/SubmitScriptReviewResult.cc
src/model/SuspendJobsRequest.cc
src/model/SuspendJobsResult.cc
src/model/TaskPreparingRequest.cc
src/model/TaskPreparingResult.cc
src/model/WithdrawScriptReviewRequest.cc
src/model/WithdrawScriptReviewResult.cc )

View File

@@ -92,6 +92,8 @@
#include "model/ExportScriptResult.h"
#include "model/ImportScriptRequest.h"
#include "model/ImportScriptResult.h"
#include "model/InflightTaskTimeoutRequest.h"
#include "model/InflightTaskTimeoutResult.h"
#include "model/ListDialogueFlowsRequest.h"
#include "model/ListDialogueFlowsResult.h"
#include "model/ListGlobalQuestionsRequest.h"
@@ -110,6 +112,8 @@
#include "model/ListMediaResult.h"
#include "model/ListOutboundCallNumbersRequest.h"
#include "model/ListOutboundCallNumbersResult.h"
#include "model/ListSchedulerInstancesRequest.h"
#include "model/ListSchedulerInstancesResult.h"
#include "model/ListScriptPublishHistoriesRequest.h"
#include "model/ListScriptPublishHistoriesResult.h"
#include "model/ListScriptVoiceConfigsRequest.h"
@@ -166,6 +170,8 @@
#include "model/SubmitScriptReviewResult.h"
#include "model/SuspendJobsRequest.h"
#include "model/SuspendJobsResult.h"
#include "model/TaskPreparingRequest.h"
#include "model/TaskPreparingResult.h"
#include "model/WithdrawScriptReviewRequest.h"
#include "model/WithdrawScriptReviewResult.h"
@@ -282,6 +288,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ImportScriptResult> ImportScriptOutcome;
typedef std::future<ImportScriptOutcome> ImportScriptOutcomeCallable;
typedef std::function<void(const OutboundBotClient*, const Model::ImportScriptRequest&, const ImportScriptOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ImportScriptAsyncHandler;
typedef Outcome<Error, Model::InflightTaskTimeoutResult> InflightTaskTimeoutOutcome;
typedef std::future<InflightTaskTimeoutOutcome> InflightTaskTimeoutOutcomeCallable;
typedef std::function<void(const OutboundBotClient*, const Model::InflightTaskTimeoutRequest&, const InflightTaskTimeoutOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> InflightTaskTimeoutAsyncHandler;
typedef Outcome<Error, Model::ListDialogueFlowsResult> ListDialogueFlowsOutcome;
typedef std::future<ListDialogueFlowsOutcome> ListDialogueFlowsOutcomeCallable;
typedef std::function<void(const OutboundBotClient*, const Model::ListDialogueFlowsRequest&, const ListDialogueFlowsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListDialogueFlowsAsyncHandler;
@@ -309,6 +318,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ListOutboundCallNumbersResult> ListOutboundCallNumbersOutcome;
typedef std::future<ListOutboundCallNumbersOutcome> ListOutboundCallNumbersOutcomeCallable;
typedef std::function<void(const OutboundBotClient*, const Model::ListOutboundCallNumbersRequest&, const ListOutboundCallNumbersOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListOutboundCallNumbersAsyncHandler;
typedef Outcome<Error, Model::ListSchedulerInstancesResult> ListSchedulerInstancesOutcome;
typedef std::future<ListSchedulerInstancesOutcome> ListSchedulerInstancesOutcomeCallable;
typedef std::function<void(const OutboundBotClient*, const Model::ListSchedulerInstancesRequest&, const ListSchedulerInstancesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListSchedulerInstancesAsyncHandler;
typedef Outcome<Error, Model::ListScriptPublishHistoriesResult> ListScriptPublishHistoriesOutcome;
typedef std::future<ListScriptPublishHistoriesOutcome> ListScriptPublishHistoriesOutcomeCallable;
typedef std::function<void(const OutboundBotClient*, const Model::ListScriptPublishHistoriesRequest&, const ListScriptPublishHistoriesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListScriptPublishHistoriesAsyncHandler;
@@ -393,6 +405,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::SuspendJobsResult> SuspendJobsOutcome;
typedef std::future<SuspendJobsOutcome> SuspendJobsOutcomeCallable;
typedef std::function<void(const OutboundBotClient*, const Model::SuspendJobsRequest&, const SuspendJobsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SuspendJobsAsyncHandler;
typedef Outcome<Error, Model::TaskPreparingResult> TaskPreparingOutcome;
typedef std::future<TaskPreparingOutcome> TaskPreparingOutcomeCallable;
typedef std::function<void(const OutboundBotClient*, const Model::TaskPreparingRequest&, const TaskPreparingOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> TaskPreparingAsyncHandler;
typedef Outcome<Error, Model::WithdrawScriptReviewResult> WithdrawScriptReviewOutcome;
typedef std::future<WithdrawScriptReviewOutcome> WithdrawScriptReviewOutcomeCallable;
typedef std::function<void(const OutboundBotClient*, const Model::WithdrawScriptReviewRequest&, const WithdrawScriptReviewOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> WithdrawScriptReviewAsyncHandler;
@@ -506,6 +521,9 @@ namespace AlibabaCloud
ImportScriptOutcome importScript(const Model::ImportScriptRequest &request)const;
void importScriptAsync(const Model::ImportScriptRequest& request, const ImportScriptAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ImportScriptOutcomeCallable importScriptCallable(const Model::ImportScriptRequest& request) const;
InflightTaskTimeoutOutcome inflightTaskTimeout(const Model::InflightTaskTimeoutRequest &request)const;
void inflightTaskTimeoutAsync(const Model::InflightTaskTimeoutRequest& request, const InflightTaskTimeoutAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
InflightTaskTimeoutOutcomeCallable inflightTaskTimeoutCallable(const Model::InflightTaskTimeoutRequest& request) const;
ListDialogueFlowsOutcome listDialogueFlows(const Model::ListDialogueFlowsRequest &request)const;
void listDialogueFlowsAsync(const Model::ListDialogueFlowsRequest& request, const ListDialogueFlowsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListDialogueFlowsOutcomeCallable listDialogueFlowsCallable(const Model::ListDialogueFlowsRequest& request) const;
@@ -533,6 +551,9 @@ namespace AlibabaCloud
ListOutboundCallNumbersOutcome listOutboundCallNumbers(const Model::ListOutboundCallNumbersRequest &request)const;
void listOutboundCallNumbersAsync(const Model::ListOutboundCallNumbersRequest& request, const ListOutboundCallNumbersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListOutboundCallNumbersOutcomeCallable listOutboundCallNumbersCallable(const Model::ListOutboundCallNumbersRequest& request) const;
ListSchedulerInstancesOutcome listSchedulerInstances(const Model::ListSchedulerInstancesRequest &request)const;
void listSchedulerInstancesAsync(const Model::ListSchedulerInstancesRequest& request, const ListSchedulerInstancesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListSchedulerInstancesOutcomeCallable listSchedulerInstancesCallable(const Model::ListSchedulerInstancesRequest& request) const;
ListScriptPublishHistoriesOutcome listScriptPublishHistories(const Model::ListScriptPublishHistoriesRequest &request)const;
void listScriptPublishHistoriesAsync(const Model::ListScriptPublishHistoriesRequest& request, const ListScriptPublishHistoriesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListScriptPublishHistoriesOutcomeCallable listScriptPublishHistoriesCallable(const Model::ListScriptPublishHistoriesRequest& request) const;
@@ -617,6 +638,9 @@ namespace AlibabaCloud
SuspendJobsOutcome suspendJobs(const Model::SuspendJobsRequest &request)const;
void suspendJobsAsync(const Model::SuspendJobsRequest& request, const SuspendJobsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
SuspendJobsOutcomeCallable suspendJobsCallable(const Model::SuspendJobsRequest& request) const;
TaskPreparingOutcome taskPreparing(const Model::TaskPreparingRequest &request)const;
void taskPreparingAsync(const Model::TaskPreparingRequest& request, const TaskPreparingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
TaskPreparingOutcomeCallable taskPreparingCallable(const Model::TaskPreparingRequest& request) const;
WithdrawScriptReviewOutcome withdrawScriptReview(const Model::WithdrawScriptReviewRequest &request)const;
void withdrawScriptReviewAsync(const Model::WithdrawScriptReviewRequest& request, const WithdrawScriptReviewAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
WithdrawScriptReviewOutcomeCallable withdrawScriptReviewCallable(const Model::WithdrawScriptReviewRequest& request) const;

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_OUTBOUNDBOT_MODEL_INFLIGHTTASKTIMEOUTREQUEST_H_
#define ALIBABACLOUD_OUTBOUNDBOT_MODEL_INFLIGHTTASKTIMEOUTREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/outboundbot/OutboundBotExport.h>
namespace AlibabaCloud
{
namespace OutboundBot
{
namespace Model
{
class ALIBABACLOUD_OUTBOUNDBOT_EXPORT InflightTaskTimeoutRequest : public RpcServiceRequest
{
public:
InflightTaskTimeoutRequest();
~InflightTaskTimeoutRequest();
std::string getInstanceId()const;
void setInstanceId(const std::string& instanceId);
long getInstanceOwnerId()const;
void setInstanceOwnerId(long instanceOwnerId);
std::string getTaskId()const;
void setTaskId(const std::string& taskId);
private:
std::string instanceId_;
long instanceOwnerId_;
std::string taskId_;
};
}
}
}
#endif // !ALIBABACLOUD_OUTBOUNDBOT_MODEL_INFLIGHTTASKTIMEOUTREQUEST_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_OUTBOUNDBOT_MODEL_INFLIGHTTASKTIMEOUTRESULT_H_
#define ALIBABACLOUD_OUTBOUNDBOT_MODEL_INFLIGHTTASKTIMEOUTRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/outboundbot/OutboundBotExport.h>
namespace AlibabaCloud
{
namespace OutboundBot
{
namespace Model
{
class ALIBABACLOUD_OUTBOUNDBOT_EXPORT InflightTaskTimeoutResult : public ServiceResult
{
public:
InflightTaskTimeoutResult();
explicit InflightTaskTimeoutResult(const std::string &payload);
~InflightTaskTimeoutResult();
std::string getMessage()const;
int getHttpStatusCode()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
int httpStatusCode_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_OUTBOUNDBOT_MODEL_INFLIGHTTASKTIMEOUTRESULT_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_OUTBOUNDBOT_MODEL_LISTSCHEDULERINSTANCESREQUEST_H_
#define ALIBABACLOUD_OUTBOUNDBOT_MODEL_LISTSCHEDULERINSTANCESREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/outboundbot/OutboundBotExport.h>
namespace AlibabaCloud
{
namespace OutboundBot
{
namespace Model
{
class ALIBABACLOUD_OUTBOUNDBOT_EXPORT ListSchedulerInstancesRequest : public RpcServiceRequest
{
public:
ListSchedulerInstancesRequest();
~ListSchedulerInstancesRequest();
long getInstanceOwnerId()const;
void setInstanceOwnerId(long instanceOwnerId);
private:
long instanceOwnerId_;
};
}
}
}
#endif // !ALIBABACLOUD_OUTBOUNDBOT_MODEL_LISTSCHEDULERINSTANCESREQUEST_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_OUTBOUNDBOT_MODEL_LISTSCHEDULERINSTANCESRESULT_H_
#define ALIBABACLOUD_OUTBOUNDBOT_MODEL_LISTSCHEDULERINSTANCESRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/outboundbot/OutboundBotExport.h>
namespace AlibabaCloud
{
namespace OutboundBot
{
namespace Model
{
class ALIBABACLOUD_OUTBOUNDBOT_EXPORT ListSchedulerInstancesResult : public ServiceResult
{
public:
struct SchedulerInstance
{
std::string ownerId;
std::string instanceId;
int maxConcurrency;
std::string business;
};
ListSchedulerInstancesResult();
explicit ListSchedulerInstancesResult(const std::string &payload);
~ListSchedulerInstancesResult();
std::vector<SchedulerInstance> getSchedulerInstances()const;
std::string getMessage()const;
int getHttpStatusCode()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::vector<SchedulerInstance> schedulerInstances_;
std::string message_;
int httpStatusCode_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_OUTBOUNDBOT_MODEL_LISTSCHEDULERINSTANCESRESULT_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_OUTBOUNDBOT_MODEL_TASKPREPARINGREQUEST_H_
#define ALIBABACLOUD_OUTBOUNDBOT_MODEL_TASKPREPARINGREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/outboundbot/OutboundBotExport.h>
namespace AlibabaCloud
{
namespace OutboundBot
{
namespace Model
{
class ALIBABACLOUD_OUTBOUNDBOT_EXPORT TaskPreparingRequest : public RpcServiceRequest
{
public:
TaskPreparingRequest();
~TaskPreparingRequest();
std::string getJobId()const;
void setJobId(const std::string& jobId);
std::string getInstanceId()const;
void setInstanceId(const std::string& instanceId);
long getInstanceOwnerId()const;
void setInstanceOwnerId(long instanceOwnerId);
private:
std::string jobId_;
std::string instanceId_;
long instanceOwnerId_;
};
}
}
}
#endif // !ALIBABACLOUD_OUTBOUNDBOT_MODEL_TASKPREPARINGREQUEST_H_

View File

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

View File

@@ -1311,6 +1311,42 @@ OutboundBotClient::ImportScriptOutcomeCallable OutboundBotClient::importScriptCa
return task->get_future();
}
OutboundBotClient::InflightTaskTimeoutOutcome OutboundBotClient::inflightTaskTimeout(const InflightTaskTimeoutRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return InflightTaskTimeoutOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return InflightTaskTimeoutOutcome(InflightTaskTimeoutResult(outcome.result()));
else
return InflightTaskTimeoutOutcome(outcome.error());
}
void OutboundBotClient::inflightTaskTimeoutAsync(const InflightTaskTimeoutRequest& request, const InflightTaskTimeoutAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, inflightTaskTimeout(request), context);
};
asyncExecute(new Runnable(fn));
}
OutboundBotClient::InflightTaskTimeoutOutcomeCallable OutboundBotClient::inflightTaskTimeoutCallable(const InflightTaskTimeoutRequest &request) const
{
auto task = std::make_shared<std::packaged_task<InflightTaskTimeoutOutcome()>>(
[this, request]()
{
return this->inflightTaskTimeout(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OutboundBotClient::ListDialogueFlowsOutcome OutboundBotClient::listDialogueFlows(const ListDialogueFlowsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1635,6 +1671,42 @@ OutboundBotClient::ListOutboundCallNumbersOutcomeCallable OutboundBotClient::lis
return task->get_future();
}
OutboundBotClient::ListSchedulerInstancesOutcome OutboundBotClient::listSchedulerInstances(const ListSchedulerInstancesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListSchedulerInstancesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListSchedulerInstancesOutcome(ListSchedulerInstancesResult(outcome.result()));
else
return ListSchedulerInstancesOutcome(outcome.error());
}
void OutboundBotClient::listSchedulerInstancesAsync(const ListSchedulerInstancesRequest& request, const ListSchedulerInstancesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listSchedulerInstances(request), context);
};
asyncExecute(new Runnable(fn));
}
OutboundBotClient::ListSchedulerInstancesOutcomeCallable OutboundBotClient::listSchedulerInstancesCallable(const ListSchedulerInstancesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListSchedulerInstancesOutcome()>>(
[this, request]()
{
return this->listSchedulerInstances(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OutboundBotClient::ListScriptPublishHistoriesOutcome OutboundBotClient::listScriptPublishHistories(const ListScriptPublishHistoriesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2643,6 +2715,42 @@ OutboundBotClient::SuspendJobsOutcomeCallable OutboundBotClient::suspendJobsCall
return task->get_future();
}
OutboundBotClient::TaskPreparingOutcome OutboundBotClient::taskPreparing(const TaskPreparingRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return TaskPreparingOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return TaskPreparingOutcome(TaskPreparingResult(outcome.result()));
else
return TaskPreparingOutcome(outcome.error());
}
void OutboundBotClient::taskPreparingAsync(const TaskPreparingRequest& request, const TaskPreparingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, taskPreparing(request), context);
};
asyncExecute(new Runnable(fn));
}
OutboundBotClient::TaskPreparingOutcomeCallable OutboundBotClient::taskPreparingCallable(const TaskPreparingRequest &request) const
{
auto task = std::make_shared<std::packaged_task<TaskPreparingOutcome()>>(
[this, request]()
{
return this->taskPreparing(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OutboundBotClient::WithdrawScriptReviewOutcome OutboundBotClient::withdrawScriptReview(const WithdrawScriptReviewRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

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/outboundbot/model/InflightTaskTimeoutRequest.h>
using AlibabaCloud::OutboundBot::Model::InflightTaskTimeoutRequest;
InflightTaskTimeoutRequest::InflightTaskTimeoutRequest() :
RpcServiceRequest("outboundbot", "2019-12-26", "InflightTaskTimeout")
{
setMethod(HttpRequest::Method::Post);
}
InflightTaskTimeoutRequest::~InflightTaskTimeoutRequest()
{}
std::string InflightTaskTimeoutRequest::getInstanceId()const
{
return instanceId_;
}
void InflightTaskTimeoutRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
long InflightTaskTimeoutRequest::getInstanceOwnerId()const
{
return instanceOwnerId_;
}
void InflightTaskTimeoutRequest::setInstanceOwnerId(long instanceOwnerId)
{
instanceOwnerId_ = instanceOwnerId;
setParameter("InstanceOwnerId", std::to_string(instanceOwnerId));
}
std::string InflightTaskTimeoutRequest::getTaskId()const
{
return taskId_;
}
void InflightTaskTimeoutRequest::setTaskId(const std::string& taskId)
{
taskId_ = taskId;
setParameter("TaskId", taskId);
}

View File

@@ -0,0 +1,72 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/outboundbot/model/InflightTaskTimeoutResult.h>
#include <json/json.h>
using namespace AlibabaCloud::OutboundBot;
using namespace AlibabaCloud::OutboundBot::Model;
InflightTaskTimeoutResult::InflightTaskTimeoutResult() :
ServiceResult()
{}
InflightTaskTimeoutResult::InflightTaskTimeoutResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
InflightTaskTimeoutResult::~InflightTaskTimeoutResult()
{}
void InflightTaskTimeoutResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
}
std::string InflightTaskTimeoutResult::getMessage()const
{
return message_;
}
int InflightTaskTimeoutResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string InflightTaskTimeoutResult::getCode()const
{
return code_;
}
bool InflightTaskTimeoutResult::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/outboundbot/model/ListSchedulerInstancesRequest.h>
using AlibabaCloud::OutboundBot::Model::ListSchedulerInstancesRequest;
ListSchedulerInstancesRequest::ListSchedulerInstancesRequest() :
RpcServiceRequest("outboundbot", "2019-12-26", "ListSchedulerInstances")
{
setMethod(HttpRequest::Method::Post);
}
ListSchedulerInstancesRequest::~ListSchedulerInstancesRequest()
{}
long ListSchedulerInstancesRequest::getInstanceOwnerId()const
{
return instanceOwnerId_;
}
void ListSchedulerInstancesRequest::setInstanceOwnerId(long instanceOwnerId)
{
instanceOwnerId_ = instanceOwnerId;
setParameter("InstanceOwnerId", std::to_string(instanceOwnerId));
}

View File

@@ -0,0 +1,91 @@
/*
* 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/outboundbot/model/ListSchedulerInstancesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::OutboundBot;
using namespace AlibabaCloud::OutboundBot::Model;
ListSchedulerInstancesResult::ListSchedulerInstancesResult() :
ServiceResult()
{}
ListSchedulerInstancesResult::ListSchedulerInstancesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListSchedulerInstancesResult::~ListSchedulerInstancesResult()
{}
void ListSchedulerInstancesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allSchedulerInstancesNode = value["SchedulerInstances"]["SchedulerInstance"];
for (auto valueSchedulerInstancesSchedulerInstance : allSchedulerInstancesNode)
{
SchedulerInstance schedulerInstancesObject;
if(!valueSchedulerInstancesSchedulerInstance["OwnerId"].isNull())
schedulerInstancesObject.ownerId = valueSchedulerInstancesSchedulerInstance["OwnerId"].asString();
if(!valueSchedulerInstancesSchedulerInstance["InstanceId"].isNull())
schedulerInstancesObject.instanceId = valueSchedulerInstancesSchedulerInstance["InstanceId"].asString();
if(!valueSchedulerInstancesSchedulerInstance["Business"].isNull())
schedulerInstancesObject.business = valueSchedulerInstancesSchedulerInstance["Business"].asString();
if(!valueSchedulerInstancesSchedulerInstance["MaxConcurrency"].isNull())
schedulerInstancesObject.maxConcurrency = std::stoi(valueSchedulerInstancesSchedulerInstance["MaxConcurrency"].asString());
schedulerInstances_.push_back(schedulerInstancesObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
}
std::vector<ListSchedulerInstancesResult::SchedulerInstance> ListSchedulerInstancesResult::getSchedulerInstances()const
{
return schedulerInstances_;
}
std::string ListSchedulerInstancesResult::getMessage()const
{
return message_;
}
int ListSchedulerInstancesResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string ListSchedulerInstancesResult::getCode()const
{
return code_;
}
bool ListSchedulerInstancesResult::getSuccess()const
{
return success_;
}

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/outboundbot/model/TaskPreparingRequest.h>
using AlibabaCloud::OutboundBot::Model::TaskPreparingRequest;
TaskPreparingRequest::TaskPreparingRequest() :
RpcServiceRequest("outboundbot", "2019-12-26", "TaskPreparing")
{
setMethod(HttpRequest::Method::Post);
}
TaskPreparingRequest::~TaskPreparingRequest()
{}
std::string TaskPreparingRequest::getJobId()const
{
return jobId_;
}
void TaskPreparingRequest::setJobId(const std::string& jobId)
{
jobId_ = jobId;
setParameter("JobId", jobId);
}
std::string TaskPreparingRequest::getInstanceId()const
{
return instanceId_;
}
void TaskPreparingRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
long TaskPreparingRequest::getInstanceOwnerId()const
{
return instanceOwnerId_;
}
void TaskPreparingRequest::setInstanceOwnerId(long instanceOwnerId)
{
instanceOwnerId_ = instanceOwnerId;
setParameter("InstanceOwnerId", std::to_string(instanceOwnerId));
}

View File

@@ -0,0 +1,79 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/outboundbot/model/TaskPreparingResult.h>
#include <json/json.h>
using namespace AlibabaCloud::OutboundBot;
using namespace AlibabaCloud::OutboundBot::Model;
TaskPreparingResult::TaskPreparingResult() :
ServiceResult()
{}
TaskPreparingResult::TaskPreparingResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
TaskPreparingResult::~TaskPreparingResult()
{}
void TaskPreparingResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
if(!value["TaskId"].isNull())
taskId_ = value["TaskId"].asString();
}
std::string TaskPreparingResult::getTaskId()const
{
return taskId_;
}
std::string TaskPreparingResult::getMessage()const
{
return message_;
}
int TaskPreparingResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string TaskPreparingResult::getCode()const
{
return code_;
}
bool TaskPreparingResult::getSuccess()const
{
return success_;
}

View File

@@ -31,21 +31,21 @@ SafconsoleClient::SafconsoleClient(const Credentials &credentials, const ClientC
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, "safconsole");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "saf");
}
SafconsoleClient::SafconsoleClient(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, "safconsole");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "saf");
}
SafconsoleClient::SafconsoleClient(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, "safconsole");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "saf");
}
SafconsoleClient::~SafconsoleClient()