Compare commits
4 Commits
imagerecog
...
objectdet-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
272a1c1466 | ||
|
|
ee902a7f28 | ||
|
|
fb12252d2d | ||
|
|
6e4fea5ea2 |
12
CHANGELOG
12
CHANGELOG
@@ -1,3 +1,15 @@
|
|||||||
|
2021-02-04 Version: patch
|
||||||
|
- Update DetectVehicleIllegalParking DetectVehicleICongestion.
|
||||||
|
|
||||||
|
2021-02-04 Version: patch
|
||||||
|
- Supported scheduler for outbound call.
|
||||||
|
|
||||||
|
2021-02-04 Version: patch
|
||||||
|
- Supported console.
|
||||||
|
|
||||||
|
2021-02-04 Version: patch
|
||||||
|
- Supported console.
|
||||||
|
|
||||||
2021-02-04 Version: patch
|
2021-02-04 Version: patch
|
||||||
- Update TaggingImage.
|
- Update TaggingImage.
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,9 @@ namespace AlibabaCloud
|
|||||||
std::string type;
|
std::string type;
|
||||||
std::vector<std::string> box;
|
std::vector<std::string> box;
|
||||||
};
|
};
|
||||||
|
long height;
|
||||||
std::vector<Element> elements;
|
std::vector<Element> elements;
|
||||||
|
long width;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,10 @@ void DetectIPCObjectResult::parse(const std::string &payload)
|
|||||||
reader.parse(payload, value);
|
reader.parse(payload, value);
|
||||||
setRequestId(value["RequestId"].asString());
|
setRequestId(value["RequestId"].asString());
|
||||||
auto dataNode = value["Data"];
|
auto dataNode = value["Data"];
|
||||||
|
if(!dataNode["Height"].isNull())
|
||||||
|
data_.height = std::stol(dataNode["Height"].asString());
|
||||||
|
if(!dataNode["Width"].isNull())
|
||||||
|
data_.width = std::stol(dataNode["Width"].asString());
|
||||||
auto allElementsNode = dataNode["Elements"]["Element"];
|
auto allElementsNode = dataNode["Elements"]["Element"];
|
||||||
for (auto dataNodeElementsElement : allElementsNode)
|
for (auto dataNodeElementsElement : allElementsNode)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -91,6 +91,8 @@ set(outboundbot_public_header_model
|
|||||||
include/alibabacloud/outboundbot/model/ExportScriptResult.h
|
include/alibabacloud/outboundbot/model/ExportScriptResult.h
|
||||||
include/alibabacloud/outboundbot/model/ImportScriptRequest.h
|
include/alibabacloud/outboundbot/model/ImportScriptRequest.h
|
||||||
include/alibabacloud/outboundbot/model/ImportScriptResult.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/ListDialogueFlowsRequest.h
|
||||||
include/alibabacloud/outboundbot/model/ListDialogueFlowsResult.h
|
include/alibabacloud/outboundbot/model/ListDialogueFlowsResult.h
|
||||||
include/alibabacloud/outboundbot/model/ListGlobalQuestionsRequest.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/ListMediaResult.h
|
||||||
include/alibabacloud/outboundbot/model/ListOutboundCallNumbersRequest.h
|
include/alibabacloud/outboundbot/model/ListOutboundCallNumbersRequest.h
|
||||||
include/alibabacloud/outboundbot/model/ListOutboundCallNumbersResult.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/ListScriptPublishHistoriesRequest.h
|
||||||
include/alibabacloud/outboundbot/model/ListScriptPublishHistoriesResult.h
|
include/alibabacloud/outboundbot/model/ListScriptPublishHistoriesResult.h
|
||||||
include/alibabacloud/outboundbot/model/ListScriptVoiceConfigsRequest.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/SubmitScriptReviewResult.h
|
||||||
include/alibabacloud/outboundbot/model/SuspendJobsRequest.h
|
include/alibabacloud/outboundbot/model/SuspendJobsRequest.h
|
||||||
include/alibabacloud/outboundbot/model/SuspendJobsResult.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/WithdrawScriptReviewRequest.h
|
||||||
include/alibabacloud/outboundbot/model/WithdrawScriptReviewResult.h )
|
include/alibabacloud/outboundbot/model/WithdrawScriptReviewResult.h )
|
||||||
|
|
||||||
@@ -240,6 +246,8 @@ set(outboundbot_src
|
|||||||
src/model/ExportScriptResult.cc
|
src/model/ExportScriptResult.cc
|
||||||
src/model/ImportScriptRequest.cc
|
src/model/ImportScriptRequest.cc
|
||||||
src/model/ImportScriptResult.cc
|
src/model/ImportScriptResult.cc
|
||||||
|
src/model/InflightTaskTimeoutRequest.cc
|
||||||
|
src/model/InflightTaskTimeoutResult.cc
|
||||||
src/model/ListDialogueFlowsRequest.cc
|
src/model/ListDialogueFlowsRequest.cc
|
||||||
src/model/ListDialogueFlowsResult.cc
|
src/model/ListDialogueFlowsResult.cc
|
||||||
src/model/ListGlobalQuestionsRequest.cc
|
src/model/ListGlobalQuestionsRequest.cc
|
||||||
@@ -258,6 +266,8 @@ set(outboundbot_src
|
|||||||
src/model/ListMediaResult.cc
|
src/model/ListMediaResult.cc
|
||||||
src/model/ListOutboundCallNumbersRequest.cc
|
src/model/ListOutboundCallNumbersRequest.cc
|
||||||
src/model/ListOutboundCallNumbersResult.cc
|
src/model/ListOutboundCallNumbersResult.cc
|
||||||
|
src/model/ListSchedulerInstancesRequest.cc
|
||||||
|
src/model/ListSchedulerInstancesResult.cc
|
||||||
src/model/ListScriptPublishHistoriesRequest.cc
|
src/model/ListScriptPublishHistoriesRequest.cc
|
||||||
src/model/ListScriptPublishHistoriesResult.cc
|
src/model/ListScriptPublishHistoriesResult.cc
|
||||||
src/model/ListScriptVoiceConfigsRequest.cc
|
src/model/ListScriptVoiceConfigsRequest.cc
|
||||||
@@ -314,6 +324,8 @@ set(outboundbot_src
|
|||||||
src/model/SubmitScriptReviewResult.cc
|
src/model/SubmitScriptReviewResult.cc
|
||||||
src/model/SuspendJobsRequest.cc
|
src/model/SuspendJobsRequest.cc
|
||||||
src/model/SuspendJobsResult.cc
|
src/model/SuspendJobsResult.cc
|
||||||
|
src/model/TaskPreparingRequest.cc
|
||||||
|
src/model/TaskPreparingResult.cc
|
||||||
src/model/WithdrawScriptReviewRequest.cc
|
src/model/WithdrawScriptReviewRequest.cc
|
||||||
src/model/WithdrawScriptReviewResult.cc )
|
src/model/WithdrawScriptReviewResult.cc )
|
||||||
|
|
||||||
|
|||||||
@@ -92,6 +92,8 @@
|
|||||||
#include "model/ExportScriptResult.h"
|
#include "model/ExportScriptResult.h"
|
||||||
#include "model/ImportScriptRequest.h"
|
#include "model/ImportScriptRequest.h"
|
||||||
#include "model/ImportScriptResult.h"
|
#include "model/ImportScriptResult.h"
|
||||||
|
#include "model/InflightTaskTimeoutRequest.h"
|
||||||
|
#include "model/InflightTaskTimeoutResult.h"
|
||||||
#include "model/ListDialogueFlowsRequest.h"
|
#include "model/ListDialogueFlowsRequest.h"
|
||||||
#include "model/ListDialogueFlowsResult.h"
|
#include "model/ListDialogueFlowsResult.h"
|
||||||
#include "model/ListGlobalQuestionsRequest.h"
|
#include "model/ListGlobalQuestionsRequest.h"
|
||||||
@@ -110,6 +112,8 @@
|
|||||||
#include "model/ListMediaResult.h"
|
#include "model/ListMediaResult.h"
|
||||||
#include "model/ListOutboundCallNumbersRequest.h"
|
#include "model/ListOutboundCallNumbersRequest.h"
|
||||||
#include "model/ListOutboundCallNumbersResult.h"
|
#include "model/ListOutboundCallNumbersResult.h"
|
||||||
|
#include "model/ListSchedulerInstancesRequest.h"
|
||||||
|
#include "model/ListSchedulerInstancesResult.h"
|
||||||
#include "model/ListScriptPublishHistoriesRequest.h"
|
#include "model/ListScriptPublishHistoriesRequest.h"
|
||||||
#include "model/ListScriptPublishHistoriesResult.h"
|
#include "model/ListScriptPublishHistoriesResult.h"
|
||||||
#include "model/ListScriptVoiceConfigsRequest.h"
|
#include "model/ListScriptVoiceConfigsRequest.h"
|
||||||
@@ -166,6 +170,8 @@
|
|||||||
#include "model/SubmitScriptReviewResult.h"
|
#include "model/SubmitScriptReviewResult.h"
|
||||||
#include "model/SuspendJobsRequest.h"
|
#include "model/SuspendJobsRequest.h"
|
||||||
#include "model/SuspendJobsResult.h"
|
#include "model/SuspendJobsResult.h"
|
||||||
|
#include "model/TaskPreparingRequest.h"
|
||||||
|
#include "model/TaskPreparingResult.h"
|
||||||
#include "model/WithdrawScriptReviewRequest.h"
|
#include "model/WithdrawScriptReviewRequest.h"
|
||||||
#include "model/WithdrawScriptReviewResult.h"
|
#include "model/WithdrawScriptReviewResult.h"
|
||||||
|
|
||||||
@@ -282,6 +288,9 @@ namespace AlibabaCloud
|
|||||||
typedef Outcome<Error, Model::ImportScriptResult> ImportScriptOutcome;
|
typedef Outcome<Error, Model::ImportScriptResult> ImportScriptOutcome;
|
||||||
typedef std::future<ImportScriptOutcome> ImportScriptOutcomeCallable;
|
typedef std::future<ImportScriptOutcome> ImportScriptOutcomeCallable;
|
||||||
typedef std::function<void(const OutboundBotClient*, const Model::ImportScriptRequest&, const ImportScriptOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ImportScriptAsyncHandler;
|
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 Outcome<Error, Model::ListDialogueFlowsResult> ListDialogueFlowsOutcome;
|
||||||
typedef std::future<ListDialogueFlowsOutcome> ListDialogueFlowsOutcomeCallable;
|
typedef std::future<ListDialogueFlowsOutcome> ListDialogueFlowsOutcomeCallable;
|
||||||
typedef std::function<void(const OutboundBotClient*, const Model::ListDialogueFlowsRequest&, const ListDialogueFlowsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListDialogueFlowsAsyncHandler;
|
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 Outcome<Error, Model::ListOutboundCallNumbersResult> ListOutboundCallNumbersOutcome;
|
||||||
typedef std::future<ListOutboundCallNumbersOutcome> ListOutboundCallNumbersOutcomeCallable;
|
typedef std::future<ListOutboundCallNumbersOutcome> ListOutboundCallNumbersOutcomeCallable;
|
||||||
typedef std::function<void(const OutboundBotClient*, const Model::ListOutboundCallNumbersRequest&, const ListOutboundCallNumbersOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListOutboundCallNumbersAsyncHandler;
|
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 Outcome<Error, Model::ListScriptPublishHistoriesResult> ListScriptPublishHistoriesOutcome;
|
||||||
typedef std::future<ListScriptPublishHistoriesOutcome> ListScriptPublishHistoriesOutcomeCallable;
|
typedef std::future<ListScriptPublishHistoriesOutcome> ListScriptPublishHistoriesOutcomeCallable;
|
||||||
typedef std::function<void(const OutboundBotClient*, const Model::ListScriptPublishHistoriesRequest&, const ListScriptPublishHistoriesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListScriptPublishHistoriesAsyncHandler;
|
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 Outcome<Error, Model::SuspendJobsResult> SuspendJobsOutcome;
|
||||||
typedef std::future<SuspendJobsOutcome> SuspendJobsOutcomeCallable;
|
typedef std::future<SuspendJobsOutcome> SuspendJobsOutcomeCallable;
|
||||||
typedef std::function<void(const OutboundBotClient*, const Model::SuspendJobsRequest&, const SuspendJobsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SuspendJobsAsyncHandler;
|
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 Outcome<Error, Model::WithdrawScriptReviewResult> WithdrawScriptReviewOutcome;
|
||||||
typedef std::future<WithdrawScriptReviewOutcome> WithdrawScriptReviewOutcomeCallable;
|
typedef std::future<WithdrawScriptReviewOutcome> WithdrawScriptReviewOutcomeCallable;
|
||||||
typedef std::function<void(const OutboundBotClient*, const Model::WithdrawScriptReviewRequest&, const WithdrawScriptReviewOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> WithdrawScriptReviewAsyncHandler;
|
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;
|
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;
|
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;
|
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;
|
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;
|
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;
|
ListDialogueFlowsOutcomeCallable listDialogueFlowsCallable(const Model::ListDialogueFlowsRequest& request) const;
|
||||||
@@ -533,6 +551,9 @@ namespace AlibabaCloud
|
|||||||
ListOutboundCallNumbersOutcome listOutboundCallNumbers(const Model::ListOutboundCallNumbersRequest &request)const;
|
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;
|
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;
|
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;
|
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;
|
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;
|
ListScriptPublishHistoriesOutcomeCallable listScriptPublishHistoriesCallable(const Model::ListScriptPublishHistoriesRequest& request) const;
|
||||||
@@ -617,6 +638,9 @@ namespace AlibabaCloud
|
|||||||
SuspendJobsOutcome suspendJobs(const Model::SuspendJobsRequest &request)const;
|
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;
|
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;
|
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;
|
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;
|
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;
|
WithdrawScriptReviewOutcomeCallable withdrawScriptReviewCallable(const Model::WithdrawScriptReviewRequest& request) const;
|
||||||
|
|||||||
@@ -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_
|
||||||
@@ -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_
|
||||||
@@ -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_
|
||||||
@@ -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_
|
||||||
@@ -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_
|
||||||
@@ -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_
|
||||||
@@ -1311,6 +1311,42 @@ OutboundBotClient::ImportScriptOutcomeCallable OutboundBotClient::importScriptCa
|
|||||||
return task->get_future();
|
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
|
OutboundBotClient::ListDialogueFlowsOutcome OutboundBotClient::listDialogueFlows(const ListDialogueFlowsRequest &request) const
|
||||||
{
|
{
|
||||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
@@ -1635,6 +1671,42 @@ OutboundBotClient::ListOutboundCallNumbersOutcomeCallable OutboundBotClient::lis
|
|||||||
return task->get_future();
|
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
|
OutboundBotClient::ListScriptPublishHistoriesOutcome OutboundBotClient::listScriptPublishHistories(const ListScriptPublishHistoriesRequest &request) const
|
||||||
{
|
{
|
||||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
@@ -2643,6 +2715,42 @@ OutboundBotClient::SuspendJobsOutcomeCallable OutboundBotClient::suspendJobsCall
|
|||||||
return task->get_future();
|
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
|
OutboundBotClient::WithdrawScriptReviewOutcome OutboundBotClient::withdrawScriptReview(const WithdrawScriptReviewRequest &request) const
|
||||||
{
|
{
|
||||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
|||||||
62
outboundbot/src/model/InflightTaskTimeoutRequest.cc
Normal file
62
outboundbot/src/model/InflightTaskTimeoutRequest.cc
Normal 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);
|
||||||
|
}
|
||||||
|
|
||||||
72
outboundbot/src/model/InflightTaskTimeoutResult.cc
Normal file
72
outboundbot/src/model/InflightTaskTimeoutResult.cc
Normal 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_;
|
||||||
|
}
|
||||||
|
|
||||||
40
outboundbot/src/model/ListSchedulerInstancesRequest.cc
Normal file
40
outboundbot/src/model/ListSchedulerInstancesRequest.cc
Normal 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));
|
||||||
|
}
|
||||||
|
|
||||||
91
outboundbot/src/model/ListSchedulerInstancesResult.cc
Normal file
91
outboundbot/src/model/ListSchedulerInstancesResult.cc
Normal 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_;
|
||||||
|
}
|
||||||
|
|
||||||
62
outboundbot/src/model/TaskPreparingRequest.cc
Normal file
62
outboundbot/src/model/TaskPreparingRequest.cc
Normal 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));
|
||||||
|
}
|
||||||
|
|
||||||
79
outboundbot/src/model/TaskPreparingResult.cc
Normal file
79
outboundbot/src/model/TaskPreparingResult.cc
Normal 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_;
|
||||||
|
}
|
||||||
|
|
||||||
90
safconsole/CMakeLists.txt
Normal file
90
safconsole/CMakeLists.txt
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
||||||
|
|
||||||
|
set(safconsole_public_header
|
||||||
|
include/alibabacloud/safconsole/SafconsoleClient.h
|
||||||
|
include/alibabacloud/safconsole/SafconsoleExport.h )
|
||||||
|
|
||||||
|
set(safconsole_public_header_model
|
||||||
|
include/alibabacloud/safconsole/model/RevokeFeedbackRequest.h
|
||||||
|
include/alibabacloud/safconsole/model/RevokeFeedbackResult.h
|
||||||
|
include/alibabacloud/safconsole/model/SendFeedbackRequest.h
|
||||||
|
include/alibabacloud/safconsole/model/SendFeedbackResult.h )
|
||||||
|
|
||||||
|
set(safconsole_src
|
||||||
|
src/SafconsoleClient.cc
|
||||||
|
src/model/RevokeFeedbackRequest.cc
|
||||||
|
src/model/RevokeFeedbackResult.cc
|
||||||
|
src/model/SendFeedbackRequest.cc
|
||||||
|
src/model/SendFeedbackResult.cc )
|
||||||
|
|
||||||
|
add_library(safconsole ${LIB_TYPE}
|
||||||
|
${safconsole_public_header}
|
||||||
|
${safconsole_public_header_model}
|
||||||
|
${safconsole_src})
|
||||||
|
|
||||||
|
set_target_properties(safconsole
|
||||||
|
PROPERTIES
|
||||||
|
LINKER_LANGUAGE CXX
|
||||||
|
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
|
||||||
|
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||||
|
OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}safconsole
|
||||||
|
)
|
||||||
|
|
||||||
|
if(${LIB_TYPE} STREQUAL "SHARED")
|
||||||
|
set_target_properties(safconsole
|
||||||
|
PROPERTIES
|
||||||
|
DEFINE_SYMBOL ALIBABACLOUD_SAFCONSOLE_LIBRARY)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_include_directories(safconsole
|
||||||
|
PRIVATE include
|
||||||
|
${CMAKE_SOURCE_DIR}/core/include
|
||||||
|
)
|
||||||
|
target_link_libraries(safconsole
|
||||||
|
core)
|
||||||
|
|
||||||
|
if(CMAKE_HOST_WIN32)
|
||||||
|
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
|
||||||
|
set(jsoncpp_install_dir ${INSTALL_DIR})
|
||||||
|
add_dependencies(safconsole
|
||||||
|
jsoncpp)
|
||||||
|
target_include_directories(safconsole
|
||||||
|
PRIVATE ${jsoncpp_install_dir}/include)
|
||||||
|
target_link_libraries(safconsole
|
||||||
|
${jsoncpp_install_dir}/lib/jsoncpp.lib)
|
||||||
|
set_target_properties(safconsole
|
||||||
|
PROPERTIES
|
||||||
|
COMPILE_OPTIONS "/bigobj")
|
||||||
|
else()
|
||||||
|
target_include_directories(safconsole
|
||||||
|
PRIVATE /usr/include/jsoncpp)
|
||||||
|
target_link_libraries(safconsole
|
||||||
|
jsoncpp)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(FILES ${safconsole_public_header}
|
||||||
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/safconsole)
|
||||||
|
install(FILES ${safconsole_public_header_model}
|
||||||
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/safconsole/model)
|
||||||
|
install(TARGETS safconsole
|
||||||
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
|
)
|
||||||
@@ -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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_SAFCONSOLE_SAFCONSOLECLIENT_H_
|
||||||
|
#define ALIBABACLOUD_SAFCONSOLE_SAFCONSOLECLIENT_H_
|
||||||
|
|
||||||
|
#include <future>
|
||||||
|
#include <alibabacloud/core/AsyncCallerContext.h>
|
||||||
|
#include <alibabacloud/core/EndpointProvider.h>
|
||||||
|
#include <alibabacloud/core/RpcServiceClient.h>
|
||||||
|
#include "SafconsoleExport.h"
|
||||||
|
#include "model/RevokeFeedbackRequest.h"
|
||||||
|
#include "model/RevokeFeedbackResult.h"
|
||||||
|
#include "model/SendFeedbackRequest.h"
|
||||||
|
#include "model/SendFeedbackResult.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Safconsole
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_SAFCONSOLE_EXPORT SafconsoleClient : public RpcServiceClient
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef Outcome<Error, Model::RevokeFeedbackResult> RevokeFeedbackOutcome;
|
||||||
|
typedef std::future<RevokeFeedbackOutcome> RevokeFeedbackOutcomeCallable;
|
||||||
|
typedef std::function<void(const SafconsoleClient*, const Model::RevokeFeedbackRequest&, const RevokeFeedbackOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RevokeFeedbackAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::SendFeedbackResult> SendFeedbackOutcome;
|
||||||
|
typedef std::future<SendFeedbackOutcome> SendFeedbackOutcomeCallable;
|
||||||
|
typedef std::function<void(const SafconsoleClient*, const Model::SendFeedbackRequest&, const SendFeedbackOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SendFeedbackAsyncHandler;
|
||||||
|
|
||||||
|
SafconsoleClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||||
|
SafconsoleClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||||
|
SafconsoleClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||||
|
~SafconsoleClient();
|
||||||
|
RevokeFeedbackOutcome revokeFeedback(const Model::RevokeFeedbackRequest &request)const;
|
||||||
|
void revokeFeedbackAsync(const Model::RevokeFeedbackRequest& request, const RevokeFeedbackAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
RevokeFeedbackOutcomeCallable revokeFeedbackCallable(const Model::RevokeFeedbackRequest& request) const;
|
||||||
|
SendFeedbackOutcome sendFeedback(const Model::SendFeedbackRequest &request)const;
|
||||||
|
void sendFeedbackAsync(const Model::SendFeedbackRequest& request, const SendFeedbackAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
SendFeedbackOutcomeCallable sendFeedbackCallable(const Model::SendFeedbackRequest& request) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // !ALIBABACLOUD_SAFCONSOLE_SAFCONSOLECLIENT_H_
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* 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_SAFCONSOLE_SAFCONSOLEEXPORT_H_
|
||||||
|
#define ALIBABACLOUD_SAFCONSOLE_SAFCONSOLEEXPORT_H_
|
||||||
|
|
||||||
|
#include <alibabacloud/core/Global.h>
|
||||||
|
|
||||||
|
#if defined(ALIBABACLOUD_SHARED)
|
||||||
|
# if defined(ALIBABACLOUD_SAFCONSOLE_LIBRARY)
|
||||||
|
# define ALIBABACLOUD_SAFCONSOLE_EXPORT ALIBABACLOUD_DECL_EXPORT
|
||||||
|
# else
|
||||||
|
# define ALIBABACLOUD_SAFCONSOLE_EXPORT ALIBABACLOUD_DECL_IMPORT
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# define ALIBABACLOUD_SAFCONSOLE_EXPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // !ALIBABACLOUD_SAFCONSOLE_SAFCONSOLEEXPORT_H_
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_SAFCONSOLE_MODEL_REVOKEFEEDBACKREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_SAFCONSOLE_MODEL_REVOKEFEEDBACKREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/safconsole/SafconsoleExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Safconsole
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_SAFCONSOLE_EXPORT RevokeFeedbackRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
RevokeFeedbackRequest();
|
||||||
|
~RevokeFeedbackRequest();
|
||||||
|
|
||||||
|
std::string getSampleType()const;
|
||||||
|
void setSampleType(const std::string& sampleType);
|
||||||
|
std::string getValue()const;
|
||||||
|
void setValue(const std::string& value);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string sampleType_;
|
||||||
|
std::string value_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_SAFCONSOLE_MODEL_REVOKEFEEDBACKREQUEST_H_
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
* 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_SAFCONSOLE_MODEL_REVOKEFEEDBACKRESULT_H_
|
||||||
|
#define ALIBABACLOUD_SAFCONSOLE_MODEL_REVOKEFEEDBACKRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/safconsole/SafconsoleExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Safconsole
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_SAFCONSOLE_EXPORT RevokeFeedbackResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
RevokeFeedbackResult();
|
||||||
|
explicit RevokeFeedbackResult(const std::string &payload);
|
||||||
|
~RevokeFeedbackResult();
|
||||||
|
std::string getMessage()const;
|
||||||
|
std::string getCode()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
std::string message_;
|
||||||
|
std::string code_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_SAFCONSOLE_MODEL_REVOKEFEEDBACKRESULT_H_
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_SAFCONSOLE_MODEL_SENDFEEDBACKREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_SAFCONSOLE_MODEL_SENDFEEDBACKREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/safconsole/SafconsoleExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Safconsole
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_SAFCONSOLE_EXPORT SendFeedbackRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
SendFeedbackRequest();
|
||||||
|
~SendFeedbackRequest();
|
||||||
|
|
||||||
|
std::string getRiskLabel()const;
|
||||||
|
void setRiskLabel(const std::string& riskLabel);
|
||||||
|
std::string getSampleType()const;
|
||||||
|
void setSampleType(const std::string& sampleType);
|
||||||
|
std::string getValue()const;
|
||||||
|
void setValue(const std::string& value);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string riskLabel_;
|
||||||
|
std::string sampleType_;
|
||||||
|
std::string value_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_SAFCONSOLE_MODEL_SENDFEEDBACKREQUEST_H_
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
* 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_SAFCONSOLE_MODEL_SENDFEEDBACKRESULT_H_
|
||||||
|
#define ALIBABACLOUD_SAFCONSOLE_MODEL_SENDFEEDBACKRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/safconsole/SafconsoleExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Safconsole
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_SAFCONSOLE_EXPORT SendFeedbackResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
SendFeedbackResult();
|
||||||
|
explicit SendFeedbackResult(const std::string &payload);
|
||||||
|
~SendFeedbackResult();
|
||||||
|
std::string getMessage()const;
|
||||||
|
int getCode()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
std::string message_;
|
||||||
|
int code_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_SAFCONSOLE_MODEL_SENDFEEDBACKRESULT_H_
|
||||||
125
safconsole/src/SafconsoleClient.cc
Normal file
125
safconsole/src/SafconsoleClient.cc
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
/*
|
||||||
|
* 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/safconsole/SafconsoleClient.h>
|
||||||
|
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud;
|
||||||
|
using namespace AlibabaCloud::Location;
|
||||||
|
using namespace AlibabaCloud::Safconsole;
|
||||||
|
using namespace AlibabaCloud::Safconsole::Model;
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
const std::string SERVICE_NAME = "safconsole";
|
||||||
|
}
|
||||||
|
|
||||||
|
SafconsoleClient::SafconsoleClient(const Credentials &credentials, const ClientConfiguration &configuration) :
|
||||||
|
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, "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, "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, "saf");
|
||||||
|
}
|
||||||
|
|
||||||
|
SafconsoleClient::~SafconsoleClient()
|
||||||
|
{}
|
||||||
|
|
||||||
|
SafconsoleClient::RevokeFeedbackOutcome SafconsoleClient::revokeFeedback(const RevokeFeedbackRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return RevokeFeedbackOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return RevokeFeedbackOutcome(RevokeFeedbackResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return RevokeFeedbackOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void SafconsoleClient::revokeFeedbackAsync(const RevokeFeedbackRequest& request, const RevokeFeedbackAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, revokeFeedback(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
SafconsoleClient::RevokeFeedbackOutcomeCallable SafconsoleClient::revokeFeedbackCallable(const RevokeFeedbackRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<RevokeFeedbackOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->revokeFeedback(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
|
SafconsoleClient::SendFeedbackOutcome SafconsoleClient::sendFeedback(const SendFeedbackRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return SendFeedbackOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return SendFeedbackOutcome(SendFeedbackResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return SendFeedbackOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void SafconsoleClient::sendFeedbackAsync(const SendFeedbackRequest& request, const SendFeedbackAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, sendFeedback(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
SafconsoleClient::SendFeedbackOutcomeCallable SafconsoleClient::sendFeedbackCallable(const SendFeedbackRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<SendFeedbackOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->sendFeedback(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
51
safconsole/src/model/RevokeFeedbackRequest.cc
Normal file
51
safconsole/src/model/RevokeFeedbackRequest.cc
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <alibabacloud/safconsole/model/RevokeFeedbackRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Safconsole::Model::RevokeFeedbackRequest;
|
||||||
|
|
||||||
|
RevokeFeedbackRequest::RevokeFeedbackRequest() :
|
||||||
|
RpcServiceRequest("safconsole", "2021-01-12", "RevokeFeedback")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
RevokeFeedbackRequest::~RevokeFeedbackRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
std::string RevokeFeedbackRequest::getSampleType()const
|
||||||
|
{
|
||||||
|
return sampleType_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RevokeFeedbackRequest::setSampleType(const std::string& sampleType)
|
||||||
|
{
|
||||||
|
sampleType_ = sampleType;
|
||||||
|
setBodyParameter("SampleType", sampleType);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string RevokeFeedbackRequest::getValue()const
|
||||||
|
{
|
||||||
|
return value_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RevokeFeedbackRequest::setValue(const std::string& value)
|
||||||
|
{
|
||||||
|
value_ = value;
|
||||||
|
setBodyParameter("Value", value);
|
||||||
|
}
|
||||||
|
|
||||||
58
safconsole/src/model/RevokeFeedbackResult.cc
Normal file
58
safconsole/src/model/RevokeFeedbackResult.cc
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
* 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/safconsole/model/RevokeFeedbackResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Safconsole;
|
||||||
|
using namespace AlibabaCloud::Safconsole::Model;
|
||||||
|
|
||||||
|
RevokeFeedbackResult::RevokeFeedbackResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
RevokeFeedbackResult::RevokeFeedbackResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
RevokeFeedbackResult::~RevokeFeedbackResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void RevokeFeedbackResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
if(!value["Code"].isNull())
|
||||||
|
code_ = value["Code"].asString();
|
||||||
|
if(!value["Message"].isNull())
|
||||||
|
message_ = value["Message"].asString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string RevokeFeedbackResult::getMessage()const
|
||||||
|
{
|
||||||
|
return message_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string RevokeFeedbackResult::getCode()const
|
||||||
|
{
|
||||||
|
return code_;
|
||||||
|
}
|
||||||
|
|
||||||
62
safconsole/src/model/SendFeedbackRequest.cc
Normal file
62
safconsole/src/model/SendFeedbackRequest.cc
Normal 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/safconsole/model/SendFeedbackRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Safconsole::Model::SendFeedbackRequest;
|
||||||
|
|
||||||
|
SendFeedbackRequest::SendFeedbackRequest() :
|
||||||
|
RpcServiceRequest("safconsole", "2021-01-12", "SendFeedback")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
SendFeedbackRequest::~SendFeedbackRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
std::string SendFeedbackRequest::getRiskLabel()const
|
||||||
|
{
|
||||||
|
return riskLabel_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SendFeedbackRequest::setRiskLabel(const std::string& riskLabel)
|
||||||
|
{
|
||||||
|
riskLabel_ = riskLabel;
|
||||||
|
setParameter("RiskLabel", riskLabel);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string SendFeedbackRequest::getSampleType()const
|
||||||
|
{
|
||||||
|
return sampleType_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SendFeedbackRequest::setSampleType(const std::string& sampleType)
|
||||||
|
{
|
||||||
|
sampleType_ = sampleType;
|
||||||
|
setParameter("SampleType", sampleType);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string SendFeedbackRequest::getValue()const
|
||||||
|
{
|
||||||
|
return value_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SendFeedbackRequest::setValue(const std::string& value)
|
||||||
|
{
|
||||||
|
value_ = value;
|
||||||
|
setParameter("Value", value);
|
||||||
|
}
|
||||||
|
|
||||||
58
safconsole/src/model/SendFeedbackResult.cc
Normal file
58
safconsole/src/model/SendFeedbackResult.cc
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
* 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/safconsole/model/SendFeedbackResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Safconsole;
|
||||||
|
using namespace AlibabaCloud::Safconsole::Model;
|
||||||
|
|
||||||
|
SendFeedbackResult::SendFeedbackResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
SendFeedbackResult::SendFeedbackResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
SendFeedbackResult::~SendFeedbackResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void SendFeedbackResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
if(!value["Code"].isNull())
|
||||||
|
code_ = std::stoi(value["Code"].asString());
|
||||||
|
if(!value["Message"].isNull())
|
||||||
|
message_ = value["Message"].asString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string SendFeedbackResult::getMessage()const
|
||||||
|
{
|
||||||
|
return message_;
|
||||||
|
}
|
||||||
|
|
||||||
|
int SendFeedbackResult::getCode()const
|
||||||
|
{
|
||||||
|
return code_;
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user