Export new API for predictive dialer.

This commit is contained in:
sdk-team
2021-03-19 06:47:12 +00:00
parent edf8a946ea
commit 5b50c4167b
9 changed files with 327 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
2021-03-19 Version: 1.36.643
- Export new API for predictive dialer.
2021-03-18 Version: 1.36.642
- Edit GetTrace api.
- Edit GetMultipleTrace api.

View File

@@ -1 +1 @@
1.36.642
1.36.643

View File

@@ -27,6 +27,8 @@ set(ccc_public_header_model
include/alibabacloud/ccc/model/AddAgentDeviceResult.h
include/alibabacloud/ccc/model/AddBulkPhoneNumbersRequest.h
include/alibabacloud/ccc/model/AddBulkPhoneNumbersResult.h
include/alibabacloud/ccc/model/AddJobsToPredictiveJobGroupRequest.h
include/alibabacloud/ccc/model/AddJobsToPredictiveJobGroupResult.h
include/alibabacloud/ccc/model/AddPhoneNumberRequest.h
include/alibabacloud/ccc/model/AddPhoneNumberResult.h
include/alibabacloud/ccc/model/AddPhoneTagsRequest.h
@@ -334,6 +336,8 @@ set(ccc_src
src/model/AddAgentDeviceResult.cc
src/model/AddBulkPhoneNumbersRequest.cc
src/model/AddBulkPhoneNumbersResult.cc
src/model/AddJobsToPredictiveJobGroupRequest.cc
src/model/AddJobsToPredictiveJobGroupResult.cc
src/model/AddPhoneNumberRequest.cc
src/model/AddPhoneNumberResult.cc
src/model/AddPhoneTagsRequest.cc

View File

@@ -28,6 +28,8 @@
#include "model/AddAgentDeviceResult.h"
#include "model/AddBulkPhoneNumbersRequest.h"
#include "model/AddBulkPhoneNumbersResult.h"
#include "model/AddJobsToPredictiveJobGroupRequest.h"
#include "model/AddJobsToPredictiveJobGroupResult.h"
#include "model/AddPhoneNumberRequest.h"
#include "model/AddPhoneNumberResult.h"
#include "model/AddPhoneTagsRequest.h"
@@ -344,6 +346,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::AddBulkPhoneNumbersResult> AddBulkPhoneNumbersOutcome;
typedef std::future<AddBulkPhoneNumbersOutcome> AddBulkPhoneNumbersOutcomeCallable;
typedef std::function<void(const CCCClient*, const Model::AddBulkPhoneNumbersRequest&, const AddBulkPhoneNumbersOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddBulkPhoneNumbersAsyncHandler;
typedef Outcome<Error, Model::AddJobsToPredictiveJobGroupResult> AddJobsToPredictiveJobGroupOutcome;
typedef std::future<AddJobsToPredictiveJobGroupOutcome> AddJobsToPredictiveJobGroupOutcomeCallable;
typedef std::function<void(const CCCClient*, const Model::AddJobsToPredictiveJobGroupRequest&, const AddJobsToPredictiveJobGroupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddJobsToPredictiveJobGroupAsyncHandler;
typedef Outcome<Error, Model::AddPhoneNumberResult> AddPhoneNumberOutcome;
typedef std::future<AddPhoneNumberOutcome> AddPhoneNumberOutcomeCallable;
typedef std::function<void(const CCCClient*, const Model::AddPhoneNumberRequest&, const AddPhoneNumberOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddPhoneNumberAsyncHandler;
@@ -805,6 +810,9 @@ namespace AlibabaCloud
AddBulkPhoneNumbersOutcome addBulkPhoneNumbers(const Model::AddBulkPhoneNumbersRequest &request)const;
void addBulkPhoneNumbersAsync(const Model::AddBulkPhoneNumbersRequest& request, const AddBulkPhoneNumbersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
AddBulkPhoneNumbersOutcomeCallable addBulkPhoneNumbersCallable(const Model::AddBulkPhoneNumbersRequest& request) const;
AddJobsToPredictiveJobGroupOutcome addJobsToPredictiveJobGroup(const Model::AddJobsToPredictiveJobGroupRequest &request)const;
void addJobsToPredictiveJobGroupAsync(const Model::AddJobsToPredictiveJobGroupRequest& request, const AddJobsToPredictiveJobGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
AddJobsToPredictiveJobGroupOutcomeCallable addJobsToPredictiveJobGroupCallable(const Model::AddJobsToPredictiveJobGroupRequest& request) const;
AddPhoneNumberOutcome addPhoneNumber(const Model::AddPhoneNumberRequest &request)const;
void addPhoneNumberAsync(const Model::AddPhoneNumberRequest& request, const AddPhoneNumberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
AddPhoneNumberOutcomeCallable addPhoneNumberCallable(const Model::AddPhoneNumberRequest& request) const;

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_CCC_MODEL_ADDJOBSTOPREDICTIVEJOBGROUPREQUEST_H_
#define ALIBABACLOUD_CCC_MODEL_ADDJOBSTOPREDICTIVEJOBGROUPREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ccc/CCCExport.h>
namespace AlibabaCloud
{
namespace CCC
{
namespace Model
{
class ALIBABACLOUD_CCC_EXPORT AddJobsToPredictiveJobGroupRequest : public RpcServiceRequest
{
public:
AddJobsToPredictiveJobGroupRequest();
~AddJobsToPredictiveJobGroupRequest();
std::string getClientToken()const;
void setClientToken(const std::string& clientToken);
std::vector<std::string> getJobsJson()const;
void setJobsJson(const std::vector<std::string>& jobsJson);
std::string getInstanceId()const;
void setInstanceId(const std::string& instanceId);
std::string getSkillGroupId()const;
void setSkillGroupId(const std::string& skillGroupId);
std::string getJobGroupId()const;
void setJobGroupId(const std::string& jobGroupId);
private:
std::string clientToken_;
std::vector<std::string> jobsJson_;
std::string instanceId_;
std::string skillGroupId_;
std::string jobGroupId_;
};
}
}
}
#endif // !ALIBABACLOUD_CCC_MODEL_ADDJOBSTOPREDICTIVEJOBGROUPREQUEST_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_CCC_MODEL_ADDJOBSTOPREDICTIVEJOBGROUPRESULT_H_
#define ALIBABACLOUD_CCC_MODEL_ADDJOBSTOPREDICTIVEJOBGROUPRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ccc/CCCExport.h>
namespace AlibabaCloud
{
namespace CCC
{
namespace Model
{
class ALIBABACLOUD_CCC_EXPORT AddJobsToPredictiveJobGroupResult : public ServiceResult
{
public:
AddJobsToPredictiveJobGroupResult();
explicit AddJobsToPredictiveJobGroupResult(const std::string &payload);
~AddJobsToPredictiveJobGroupResult();
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_CCC_MODEL_ADDJOBSTOPREDICTIVEJOBGROUPRESULT_H_

View File

@@ -159,6 +159,42 @@ CCCClient::AddBulkPhoneNumbersOutcomeCallable CCCClient::addBulkPhoneNumbersCall
return task->get_future();
}
CCCClient::AddJobsToPredictiveJobGroupOutcome CCCClient::addJobsToPredictiveJobGroup(const AddJobsToPredictiveJobGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return AddJobsToPredictiveJobGroupOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AddJobsToPredictiveJobGroupOutcome(AddJobsToPredictiveJobGroupResult(outcome.result()));
else
return AddJobsToPredictiveJobGroupOutcome(outcome.error());
}
void CCCClient::addJobsToPredictiveJobGroupAsync(const AddJobsToPredictiveJobGroupRequest& request, const AddJobsToPredictiveJobGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, addJobsToPredictiveJobGroup(request), context);
};
asyncExecute(new Runnable(fn));
}
CCCClient::AddJobsToPredictiveJobGroupOutcomeCallable CCCClient::addJobsToPredictiveJobGroupCallable(const AddJobsToPredictiveJobGroupRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AddJobsToPredictiveJobGroupOutcome()>>(
[this, request]()
{
return this->addJobsToPredictiveJobGroup(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CCCClient::AddPhoneNumberOutcome CCCClient::addPhoneNumber(const AddPhoneNumberRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,86 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ccc/model/AddJobsToPredictiveJobGroupRequest.h>
using AlibabaCloud::CCC::Model::AddJobsToPredictiveJobGroupRequest;
AddJobsToPredictiveJobGroupRequest::AddJobsToPredictiveJobGroupRequest() :
RpcServiceRequest("ccc", "2017-07-05", "AddJobsToPredictiveJobGroup")
{
setMethod(HttpRequest::Method::Post);
}
AddJobsToPredictiveJobGroupRequest::~AddJobsToPredictiveJobGroupRequest()
{}
std::string AddJobsToPredictiveJobGroupRequest::getClientToken()const
{
return clientToken_;
}
void AddJobsToPredictiveJobGroupRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setParameter("ClientToken", clientToken);
}
std::vector<std::string> AddJobsToPredictiveJobGroupRequest::getJobsJson()const
{
return jobsJson_;
}
void AddJobsToPredictiveJobGroupRequest::setJobsJson(const std::vector<std::string>& jobsJson)
{
jobsJson_ = jobsJson;
for(int dep1 = 0; dep1!= jobsJson.size(); dep1++) {
setBodyParameter("JobsJson."+ std::to_string(dep1), jobsJson.at(dep1));
}
}
std::string AddJobsToPredictiveJobGroupRequest::getInstanceId()const
{
return instanceId_;
}
void AddJobsToPredictiveJobGroupRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string AddJobsToPredictiveJobGroupRequest::getSkillGroupId()const
{
return skillGroupId_;
}
void AddJobsToPredictiveJobGroupRequest::setSkillGroupId(const std::string& skillGroupId)
{
skillGroupId_ = skillGroupId;
setParameter("SkillGroupId", skillGroupId);
}
std::string AddJobsToPredictiveJobGroupRequest::getJobGroupId()const
{
return jobGroupId_;
}
void AddJobsToPredictiveJobGroupRequest::setJobGroupId(const std::string& jobGroupId)
{
jobGroupId_ = jobGroupId;
setParameter("JobGroupId", jobGroupId);
}

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/ccc/model/AddJobsToPredictiveJobGroupResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
AddJobsToPredictiveJobGroupResult::AddJobsToPredictiveJobGroupResult() :
ServiceResult()
{}
AddJobsToPredictiveJobGroupResult::AddJobsToPredictiveJobGroupResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AddJobsToPredictiveJobGroupResult::~AddJobsToPredictiveJobGroupResult()
{}
void AddJobsToPredictiveJobGroupResult::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 AddJobsToPredictiveJobGroupResult::getMessage()const
{
return message_;
}
int AddJobsToPredictiveJobGroupResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string AddJobsToPredictiveJobGroupResult::getCode()const
{
return code_;
}
bool AddJobsToPredictiveJobGroupResult::getSuccess()const
{
return success_;
}