CCS SDK Auto Released By wilson.liuw,Version:1.26.2

Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
This commit is contained in:
yixiong.jxy
2018-09-25 20:09:14 +08:00
parent 857329972e
commit 6e9b1bebe0
15 changed files with 1179 additions and 2 deletions

View File

@@ -1,3 +1,6 @@
2018-09-25 Version: 1.26.2
1, Add GetHotlineRecord and QueryHotlineRecord interface, version 1.0.0
2018-09-17 Version: 1.26.1
1, Add field for AddCasterVideoResource, DescribeCasterVideoResources, ModifyCasterVideoResource.

View File

@@ -87,4 +87,5 @@ add_subdirectory(iot)
add_subdirectory(linkface)
add_subdirectory(ots)
add_subdirectory(smartag)
add_subdirectory(vod)
add_subdirectory(vod)
add_subdirectory(ccs)

View File

@@ -1 +1 @@
1.26.1
1.26.2

90
ccs/CMakeLists.txt Executable file
View 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(ccs_public_header
include/alibabacloud/ccs/CcsClient.h
include/alibabacloud/ccs/CcsExport.h )
set(ccs_public_header_model
include/alibabacloud/ccs/model/GetHotlineRecordRequest.h
include/alibabacloud/ccs/model/GetHotlineRecordResult.h
include/alibabacloud/ccs/model/QueryHotlineRecordRequest.h
include/alibabacloud/ccs/model/QueryHotlineRecordResult.h )
set(ccs_src
src/CcsClient.cc
src/model/GetHotlineRecordRequest.cc
src/model/GetHotlineRecordResult.cc
src/model/QueryHotlineRecordRequest.cc
src/model/QueryHotlineRecordResult.cc )
add_library(ccs ${LIB_TYPE}
${ccs_public_header}
${ccs_public_header_model}
${ccs_src})
set_target_properties(ccs
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}ccs
)
if(${LIB_TYPE} STREQUAL "SHARED")
set_target_properties(ccs
PROPERTIES
DEFINE_SYMBOL ALIBABACLOUD_CCS_LIBRARY)
endif()
target_include_directories(ccs
PRIVATE include
${CMAKE_SOURCE_DIR}/core/include
)
target_link_libraries(ccs
core)
if(CMAKE_HOST_WIN32)
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
set(jsoncpp_install_dir ${INSTALL_DIR})
add_dependencies(ccs
jsoncpp)
target_include_directories(ccs
PRIVATE ${jsoncpp_install_dir}/include)
target_link_libraries(ccs
${jsoncpp_install_dir}/lib/jsoncpp.lib)
set_target_properties(ccs
PROPERTIES
COMPILE_OPTIONS "/bigobj")
else()
target_include_directories(ccs
PRIVATE /usr/include/jsoncpp)
target_link_libraries(ccs
jsoncpp)
endif()
install(FILES ${ccs_public_header}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/ccs)
install(FILES ${ccs_public_header_model}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/ccs/model)
install(TARGETS ccs
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_CCS_CCSCLIENT_H_
#define ALIBABACLOUD_CCS_CCSCLIENT_H_
#include <future>
#include <alibabacloud/core/AsyncCallerContext.h>
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RpcServiceClient.h>
#include "CcsExport.h"
#include "model/GetHotlineRecordRequest.h"
#include "model/GetHotlineRecordResult.h"
#include "model/QueryHotlineRecordRequest.h"
#include "model/QueryHotlineRecordResult.h"
namespace AlibabaCloud
{
namespace Ccs
{
class ALIBABACLOUD_CCS_EXPORT CcsClient : public RpcServiceClient
{
public:
typedef Outcome<Error, Model::GetHotlineRecordResult> GetHotlineRecordOutcome;
typedef std::future<GetHotlineRecordOutcome> GetHotlineRecordOutcomeCallable;
typedef std::function<void(const CcsClient*, const Model::GetHotlineRecordRequest&, const GetHotlineRecordOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetHotlineRecordAsyncHandler;
typedef Outcome<Error, Model::QueryHotlineRecordResult> QueryHotlineRecordOutcome;
typedef std::future<QueryHotlineRecordOutcome> QueryHotlineRecordOutcomeCallable;
typedef std::function<void(const CcsClient*, const Model::QueryHotlineRecordRequest&, const QueryHotlineRecordOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryHotlineRecordAsyncHandler;
CcsClient(const Credentials &credentials, const ClientConfiguration &configuration);
CcsClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
CcsClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
~CcsClient();
GetHotlineRecordOutcome getHotlineRecord(const Model::GetHotlineRecordRequest &request)const;
void getHotlineRecordAsync(const Model::GetHotlineRecordRequest& request, const GetHotlineRecordAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetHotlineRecordOutcomeCallable getHotlineRecordCallable(const Model::GetHotlineRecordRequest& request) const;
QueryHotlineRecordOutcome queryHotlineRecord(const Model::QueryHotlineRecordRequest &request)const;
void queryHotlineRecordAsync(const Model::QueryHotlineRecordRequest& request, const QueryHotlineRecordAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
QueryHotlineRecordOutcomeCallable queryHotlineRecordCallable(const Model::QueryHotlineRecordRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;
};
}
}
#endif // !ALIBABACLOUD_CCS_CCSCLIENT_H_

View File

@@ -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_CCS_CCSEXPORT_H_
#define ALIBABACLOUD_CCS_CCSEXPORT_H_
#include <alibabacloud/core/Global.h>
#if defined(ALIBABACLOUD_SHARED)
# if defined(ALIBABACLOUD_CCS_LIBRARY)
# define ALIBABACLOUD_CCS_EXPORT ALIBABACLOUD_DECL_EXPORT
# else
# define ALIBABACLOUD_CCS_EXPORT ALIBABACLOUD_DECL_IMPORT
# endif
#else
# define ALIBABACLOUD_CCS_EXPORT
#endif
#endif // !ALIBABACLOUD_CCS_CCSEXPORT_H_

View 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.
*/
#ifndef ALIBABACLOUD_CCS_MODEL_GETHOTLINERECORDREQUEST_H_
#define ALIBABACLOUD_CCS_MODEL_GETHOTLINERECORDREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ccs/CcsExport.h>
namespace AlibabaCloud
{
namespace Ccs
{
namespace Model
{
class ALIBABACLOUD_CCS_EXPORT GetHotlineRecordRequest : public RpcServiceRequest
{
public:
GetHotlineRecordRequest();
~GetHotlineRecordRequest();
std::string getId()const;
void setId(const std::string& id);
std::string getCcsInstanceId()const;
void setCcsInstanceId(const std::string& ccsInstanceId);
private:
std::string id_;
std::string ccsInstanceId_;
};
}
}
}
#endif // !ALIBABACLOUD_CCS_MODEL_GETHOTLINERECORDREQUEST_H_

View File

@@ -0,0 +1,89 @@
/*
* 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_CCS_MODEL_GETHOTLINERECORDRESULT_H_
#define ALIBABACLOUD_CCS_MODEL_GETHOTLINERECORDRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ccs/CcsExport.h>
namespace AlibabaCloud
{
namespace Ccs
{
namespace Model
{
class ALIBABACLOUD_CCS_EXPORT GetHotlineRecordResult : public ServiceResult
{
public:
GetHotlineRecordResult();
explicit GetHotlineRecordResult(const std::string &payload);
~GetHotlineRecordResult();
std::string getStatus()const;
std::string getGroupName()const;
std::string getVisitorId()const;
std::string getOutboundTaskId()const;
std::string getCategories()const;
long getTalkDuration()const;
std::string getVisitorPhone()const;
std::string getCreateTime()const;
std::string getSatisfaction()const;
std::string getCallType()const;
std::string getVisitorProvince()const;
std::string getCcsInstanceId()const;
std::string getGroupId()const;
std::string getSceneId()const;
std::string getFinishTime()const;
std::string getHangupType()const;
std::string getId()const;
std::string getAgentId()const;
std::string getAgentName()const;
std::string getMemo()const;
protected:
void parse(const std::string &payload);
private:
std::string status_;
std::string groupName_;
std::string visitorId_;
std::string outboundTaskId_;
std::string categories_;
long talkDuration_;
std::string visitorPhone_;
std::string createTime_;
std::string satisfaction_;
std::string callType_;
std::string visitorProvince_;
std::string ccsInstanceId_;
std::string groupId_;
std::string sceneId_;
std::string finishTime_;
std::string hangupType_;
std::string id_;
std::string agentId_;
std::string agentName_;
std::string memo_;
};
}
}
}
#endif // !ALIBABACLOUD_CCS_MODEL_GETHOTLINERECORDRESULT_H_

View File

@@ -0,0 +1,93 @@
/*
* 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_CCS_MODEL_QUERYHOTLINERECORDREQUEST_H_
#define ALIBABACLOUD_CCS_MODEL_QUERYHOTLINERECORDREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ccs/CcsExport.h>
namespace AlibabaCloud
{
namespace Ccs
{
namespace Model
{
class ALIBABACLOUD_CCS_EXPORT QueryHotlineRecordRequest : public RpcServiceRequest
{
public:
QueryHotlineRecordRequest();
~QueryHotlineRecordRequest();
std::string getAgentId()const;
void setAgentId(const std::string& agentId);
long getMaxTalkDuration()const;
void setMaxTalkDuration(long maxTalkDuration);
std::string getGroupId()const;
void setGroupId(const std::string& groupId);
std::string getEndTime()const;
void setEndTime(const std::string& endTime);
std::string getStartTime()const;
void setStartTime(const std::string& startTime);
int getPageNum()const;
void setPageNum(int pageNum);
std::string getSatisfaction()const;
void setSatisfaction(const std::string& satisfaction);
long getMinTalkDuratoin()const;
void setMinTalkDuratoin(long minTalkDuratoin);
std::string getCategoryIds()const;
void setCategoryIds(const std::string& categoryIds);
std::string getVisitorProvince()const;
void setVisitorProvince(const std::string& visitorProvince);
int getPageSize()const;
void setPageSize(int pageSize);
std::string getCallType()const;
void setCallType(const std::string& callType);
std::string getCcsInstanceId()const;
void setCcsInstanceId(const std::string& ccsInstanceId);
std::string getVisitorPhone()const;
void setVisitorPhone(const std::string& visitorPhone);
std::string getVisitorId()const;
void setVisitorId(const std::string& visitorId);
std::string getStatus()const;
void setStatus(const std::string& status);
private:
std::string agentId_;
long maxTalkDuration_;
std::string groupId_;
std::string endTime_;
std::string startTime_;
int pageNum_;
std::string satisfaction_;
long minTalkDuratoin_;
std::string categoryIds_;
std::string visitorProvince_;
int pageSize_;
std::string callType_;
std::string ccsInstanceId_;
std::string visitorPhone_;
std::string visitorId_;
std::string status_;
};
}
}
}
#endif // !ALIBABACLOUD_CCS_MODEL_QUERYHOTLINERECORDREQUEST_H_

View File

@@ -0,0 +1,79 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_CCS_MODEL_QUERYHOTLINERECORDRESULT_H_
#define ALIBABACLOUD_CCS_MODEL_QUERYHOTLINERECORDRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ccs/CcsExport.h>
namespace AlibabaCloud
{
namespace Ccs
{
namespace Model
{
class ALIBABACLOUD_CCS_EXPORT QueryHotlineRecordResult : public ServiceResult
{
public:
struct HotlineRecord
{
std::string groupName;
std::string status;
std::string visitorId;
std::string outboundTaskId;
std::string categories;
long talkDuration;
std::string visitorPhone;
std::string createTime;
std::string satisfaction;
std::string callType;
std::string visitorProvince;
std::string ccsInstanceId;
std::string groupId;
std::string finishTime;
std::string hangupType;
std::string id;
std::string agentId;
std::string agentName;
std::string memo;
};
QueryHotlineRecordResult();
explicit QueryHotlineRecordResult(const std::string &payload);
~QueryHotlineRecordResult();
int getTotalCount()const;
int getPageNum()const;
int getPageSize()const;
std::vector<HotlineRecord> getRecords()const;
protected:
void parse(const std::string &payload);
private:
int totalCount_;
int pageNum_;
int pageSize_;
std::vector<HotlineRecord> records_;
};
}
}
}
#endif // !ALIBABACLOUD_CCS_MODEL_QUERYHOTLINERECORDRESULT_H_

125
ccs/src/CcsClient.cc Executable file
View 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/ccs/CcsClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::Ccs;
using namespace AlibabaCloud::Ccs::Model;
namespace
{
const std::string SERVICE_NAME = "Ccs";
}
CcsClient::CcsClient(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, "ccs");
}
CcsClient::CcsClient(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, "ccs");
}
CcsClient::CcsClient(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, "ccs");
}
CcsClient::~CcsClient()
{}
CcsClient::GetHotlineRecordOutcome CcsClient::getHotlineRecord(const GetHotlineRecordRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetHotlineRecordOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetHotlineRecordOutcome(GetHotlineRecordResult(outcome.result()));
else
return GetHotlineRecordOutcome(outcome.error());
}
void CcsClient::getHotlineRecordAsync(const GetHotlineRecordRequest& request, const GetHotlineRecordAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getHotlineRecord(request), context);
};
asyncExecute(new Runnable(fn));
}
CcsClient::GetHotlineRecordOutcomeCallable CcsClient::getHotlineRecordCallable(const GetHotlineRecordRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetHotlineRecordOutcome()>>(
[this, request]()
{
return this->getHotlineRecord(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CcsClient::QueryHotlineRecordOutcome CcsClient::queryHotlineRecord(const QueryHotlineRecordRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return QueryHotlineRecordOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return QueryHotlineRecordOutcome(QueryHotlineRecordResult(outcome.result()));
else
return QueryHotlineRecordOutcome(outcome.error());
}
void CcsClient::queryHotlineRecordAsync(const QueryHotlineRecordRequest& request, const QueryHotlineRecordAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, queryHotlineRecord(request), context);
};
asyncExecute(new Runnable(fn));
}
CcsClient::QueryHotlineRecordOutcomeCallable CcsClient::queryHotlineRecordCallable(const QueryHotlineRecordRequest &request) const
{
auto task = std::make_shared<std::packaged_task<QueryHotlineRecordOutcome()>>(
[this, request]()
{
return this->queryHotlineRecord(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ccs/model/GetHotlineRecordRequest.h>
using AlibabaCloud::Ccs::Model::GetHotlineRecordRequest;
GetHotlineRecordRequest::GetHotlineRecordRequest() :
RpcServiceRequest("ccs", "2017-10-01", "GetHotlineRecord")
{}
GetHotlineRecordRequest::~GetHotlineRecordRequest()
{}
std::string GetHotlineRecordRequest::getId()const
{
return id_;
}
void GetHotlineRecordRequest::setId(const std::string& id)
{
id_ = id;
setParameter("Id", id);
}
std::string GetHotlineRecordRequest::getCcsInstanceId()const
{
return ccsInstanceId_;
}
void GetHotlineRecordRequest::setCcsInstanceId(const std::string& ccsInstanceId)
{
ccsInstanceId_ = ccsInstanceId;
setParameter("CcsInstanceId", ccsInstanceId);
}

View File

@@ -0,0 +1,185 @@
/*
* 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/ccs/model/GetHotlineRecordResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ccs;
using namespace AlibabaCloud::Ccs::Model;
GetHotlineRecordResult::GetHotlineRecordResult() :
ServiceResult()
{}
GetHotlineRecordResult::GetHotlineRecordResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetHotlineRecordResult::~GetHotlineRecordResult()
{}
void GetHotlineRecordResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Id"].isNull())
id_ = value["Id"].asString();
if(!value["CallType"].isNull())
callType_ = value["CallType"].asString();
if(!value["VisitorId"].isNull())
visitorId_ = value["VisitorId"].asString();
if(!value["VisitorPhone"].isNull())
visitorPhone_ = value["VisitorPhone"].asString();
if(!value["VisitorProvince"].isNull())
visitorProvince_ = value["VisitorProvince"].asString();
if(!value["SceneId"].isNull())
sceneId_ = value["SceneId"].asString();
if(!value["AgentId"].isNull())
agentId_ = value["AgentId"].asString();
if(!value["AgentName"].isNull())
agentName_ = value["AgentName"].asString();
if(!value["CreateTime"].isNull())
createTime_ = value["CreateTime"].asString();
if(!value["FinishTime"].isNull())
finishTime_ = value["FinishTime"].asString();
if(!value["Status"].isNull())
status_ = value["Status"].asString();
if(!value["Memo"].isNull())
memo_ = value["Memo"].asString();
if(!value["HangupType"].isNull())
hangupType_ = value["HangupType"].asString();
if(!value["Satisfaction"].isNull())
satisfaction_ = value["Satisfaction"].asString();
if(!value["OutboundTaskId"].isNull())
outboundTaskId_ = value["OutboundTaskId"].asString();
if(!value["Categories"].isNull())
categories_ = value["Categories"].asString();
if(!value["CcsInstanceId"].isNull())
ccsInstanceId_ = value["CcsInstanceId"].asString();
if(!value["TalkDuration"].isNull())
talkDuration_ = std::stol(value["TalkDuration"].asString());
if(!value["GroupId"].isNull())
groupId_ = value["GroupId"].asString();
if(!value["GroupName"].isNull())
groupName_ = value["GroupName"].asString();
}
std::string GetHotlineRecordResult::getStatus()const
{
return status_;
}
std::string GetHotlineRecordResult::getGroupName()const
{
return groupName_;
}
std::string GetHotlineRecordResult::getVisitorId()const
{
return visitorId_;
}
std::string GetHotlineRecordResult::getOutboundTaskId()const
{
return outboundTaskId_;
}
std::string GetHotlineRecordResult::getCategories()const
{
return categories_;
}
long GetHotlineRecordResult::getTalkDuration()const
{
return talkDuration_;
}
std::string GetHotlineRecordResult::getVisitorPhone()const
{
return visitorPhone_;
}
std::string GetHotlineRecordResult::getCreateTime()const
{
return createTime_;
}
std::string GetHotlineRecordResult::getSatisfaction()const
{
return satisfaction_;
}
std::string GetHotlineRecordResult::getCallType()const
{
return callType_;
}
std::string GetHotlineRecordResult::getVisitorProvince()const
{
return visitorProvince_;
}
std::string GetHotlineRecordResult::getCcsInstanceId()const
{
return ccsInstanceId_;
}
std::string GetHotlineRecordResult::getGroupId()const
{
return groupId_;
}
std::string GetHotlineRecordResult::getSceneId()const
{
return sceneId_;
}
std::string GetHotlineRecordResult::getFinishTime()const
{
return finishTime_;
}
std::string GetHotlineRecordResult::getHangupType()const
{
return hangupType_;
}
std::string GetHotlineRecordResult::getId()const
{
return id_;
}
std::string GetHotlineRecordResult::getAgentId()const
{
return agentId_;
}
std::string GetHotlineRecordResult::getAgentName()const
{
return agentName_;
}
std::string GetHotlineRecordResult::getMemo()const
{
return memo_;
}

View File

@@ -0,0 +1,203 @@
/*
* 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/ccs/model/QueryHotlineRecordRequest.h>
using AlibabaCloud::Ccs::Model::QueryHotlineRecordRequest;
QueryHotlineRecordRequest::QueryHotlineRecordRequest() :
RpcServiceRequest("ccs", "2017-10-01", "QueryHotlineRecord")
{}
QueryHotlineRecordRequest::~QueryHotlineRecordRequest()
{}
std::string QueryHotlineRecordRequest::getAgentId()const
{
return agentId_;
}
void QueryHotlineRecordRequest::setAgentId(const std::string& agentId)
{
agentId_ = agentId;
setParameter("AgentId", agentId);
}
long QueryHotlineRecordRequest::getMaxTalkDuration()const
{
return maxTalkDuration_;
}
void QueryHotlineRecordRequest::setMaxTalkDuration(long maxTalkDuration)
{
maxTalkDuration_ = maxTalkDuration;
setParameter("MaxTalkDuration", std::to_string(maxTalkDuration));
}
std::string QueryHotlineRecordRequest::getGroupId()const
{
return groupId_;
}
void QueryHotlineRecordRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setParameter("GroupId", groupId);
}
std::string QueryHotlineRecordRequest::getEndTime()const
{
return endTime_;
}
void QueryHotlineRecordRequest::setEndTime(const std::string& endTime)
{
endTime_ = endTime;
setParameter("EndTime", endTime);
}
std::string QueryHotlineRecordRequest::getStartTime()const
{
return startTime_;
}
void QueryHotlineRecordRequest::setStartTime(const std::string& startTime)
{
startTime_ = startTime;
setParameter("StartTime", startTime);
}
int QueryHotlineRecordRequest::getPageNum()const
{
return pageNum_;
}
void QueryHotlineRecordRequest::setPageNum(int pageNum)
{
pageNum_ = pageNum;
setParameter("PageNum", std::to_string(pageNum));
}
std::string QueryHotlineRecordRequest::getSatisfaction()const
{
return satisfaction_;
}
void QueryHotlineRecordRequest::setSatisfaction(const std::string& satisfaction)
{
satisfaction_ = satisfaction;
setParameter("Satisfaction", satisfaction);
}
long QueryHotlineRecordRequest::getMinTalkDuratoin()const
{
return minTalkDuratoin_;
}
void QueryHotlineRecordRequest::setMinTalkDuratoin(long minTalkDuratoin)
{
minTalkDuratoin_ = minTalkDuratoin;
setParameter("MinTalkDuratoin", std::to_string(minTalkDuratoin));
}
std::string QueryHotlineRecordRequest::getCategoryIds()const
{
return categoryIds_;
}
void QueryHotlineRecordRequest::setCategoryIds(const std::string& categoryIds)
{
categoryIds_ = categoryIds;
setParameter("CategoryIds", categoryIds);
}
std::string QueryHotlineRecordRequest::getVisitorProvince()const
{
return visitorProvince_;
}
void QueryHotlineRecordRequest::setVisitorProvince(const std::string& visitorProvince)
{
visitorProvince_ = visitorProvince;
setParameter("VisitorProvince", visitorProvince);
}
int QueryHotlineRecordRequest::getPageSize()const
{
return pageSize_;
}
void QueryHotlineRecordRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string QueryHotlineRecordRequest::getCallType()const
{
return callType_;
}
void QueryHotlineRecordRequest::setCallType(const std::string& callType)
{
callType_ = callType;
setParameter("CallType", callType);
}
std::string QueryHotlineRecordRequest::getCcsInstanceId()const
{
return ccsInstanceId_;
}
void QueryHotlineRecordRequest::setCcsInstanceId(const std::string& ccsInstanceId)
{
ccsInstanceId_ = ccsInstanceId;
setParameter("CcsInstanceId", ccsInstanceId);
}
std::string QueryHotlineRecordRequest::getVisitorPhone()const
{
return visitorPhone_;
}
void QueryHotlineRecordRequest::setVisitorPhone(const std::string& visitorPhone)
{
visitorPhone_ = visitorPhone;
setParameter("VisitorPhone", visitorPhone);
}
std::string QueryHotlineRecordRequest::getVisitorId()const
{
return visitorId_;
}
void QueryHotlineRecordRequest::setVisitorId(const std::string& visitorId)
{
visitorId_ = visitorId;
setParameter("VisitorId", visitorId);
}
std::string QueryHotlineRecordRequest::getStatus()const
{
return status_;
}
void QueryHotlineRecordRequest::setStatus(const std::string& status)
{
status_ = status;
setParameter("Status", status);
}

View File

@@ -0,0 +1,115 @@
/*
* 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/ccs/model/QueryHotlineRecordResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ccs;
using namespace AlibabaCloud::Ccs::Model;
QueryHotlineRecordResult::QueryHotlineRecordResult() :
ServiceResult()
{}
QueryHotlineRecordResult::QueryHotlineRecordResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryHotlineRecordResult::~QueryHotlineRecordResult()
{}
void QueryHotlineRecordResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allRecords = value["Records"]["HotlineRecord"];
for (auto value : allRecords)
{
HotlineRecord recordsObject;
if(!value["Id"].isNull())
recordsObject.id = value["Id"].asString();
if(!value["VisitorId"].isNull())
recordsObject.visitorId = value["VisitorId"].asString();
if(!value["VisitorPhone"].isNull())
recordsObject.visitorPhone = value["VisitorPhone"].asString();
if(!value["VisitorProvince"].isNull())
recordsObject.visitorProvince = value["VisitorProvince"].asString();
if(!value["CallType"].isNull())
recordsObject.callType = value["CallType"].asString();
if(!value["AgentId"].isNull())
recordsObject.agentId = value["AgentId"].asString();
if(!value["AgentName"].isNull())
recordsObject.agentName = value["AgentName"].asString();
if(!value["GroupId"].isNull())
recordsObject.groupId = value["GroupId"].asString();
if(!value["GroupName"].isNull())
recordsObject.groupName = value["GroupName"].asString();
if(!value["CreateTime"].isNull())
recordsObject.createTime = value["CreateTime"].asString();
if(!value["FinishTime"].isNull())
recordsObject.finishTime = value["FinishTime"].asString();
if(!value["Status"].isNull())
recordsObject.status = value["Status"].asString();
if(!value["Memo"].isNull())
recordsObject.memo = value["Memo"].asString();
if(!value["HangupType"].isNull())
recordsObject.hangupType = value["HangupType"].asString();
if(!value["Satisfaction"].isNull())
recordsObject.satisfaction = value["Satisfaction"].asString();
if(!value["OutboundTaskId"].isNull())
recordsObject.outboundTaskId = value["OutboundTaskId"].asString();
if(!value["Categories"].isNull())
recordsObject.categories = value["Categories"].asString();
if(!value["CcsInstanceId"].isNull())
recordsObject.ccsInstanceId = value["CcsInstanceId"].asString();
if(!value["TalkDuration"].isNull())
recordsObject.talkDuration = std::stol(value["TalkDuration"].asString());
records_.push_back(recordsObject);
}
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
if(!value["PageNum"].isNull())
pageNum_ = std::stoi(value["PageNum"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
}
int QueryHotlineRecordResult::getTotalCount()const
{
return totalCount_;
}
int QueryHotlineRecordResult::getPageNum()const
{
return pageNum_;
}
int QueryHotlineRecordResult::getPageSize()const
{
return pageSize_;
}
std::vector<QueryHotlineRecordResult::HotlineRecord> QueryHotlineRecordResult::getRecords()const
{
return records_;
}