Support SIP phone management.

This commit is contained in:
sdk-team
2022-01-28 07:40:22 +00:00
parent 63135520bc
commit 47cbc71c7f
21 changed files with 645 additions and 11 deletions

View File

@@ -65,6 +65,8 @@ set(ccc_public_header_model
include/alibabacloud/ccc/model/GetCallDetailRecordResult.h
include/alibabacloud/ccc/model/GetCampaignRequest.h
include/alibabacloud/ccc/model/GetCampaignResult.h
include/alibabacloud/ccc/model/GetCaseFileUploadUrlRequest.h
include/alibabacloud/ccc/model/GetCaseFileUploadUrlResult.h
include/alibabacloud/ccc/model/GetHistoricalCallerReportRequest.h
include/alibabacloud/ccc/model/GetHistoricalCallerReportResult.h
include/alibabacloud/ccc/model/GetHistoricalInstanceReportRequest.h
@@ -197,6 +199,8 @@ set(ccc_public_header_model
include/alibabacloud/ccc/model/ReadyForServiceResult.h
include/alibabacloud/ccc/model/RegisterDeviceRequest.h
include/alibabacloud/ccc/model/RegisterDeviceResult.h
include/alibabacloud/ccc/model/RegisterDevicesRequest.h
include/alibabacloud/ccc/model/RegisterDevicesResult.h
include/alibabacloud/ccc/model/ReleaseCallRequest.h
include/alibabacloud/ccc/model/ReleaseCallResult.h
include/alibabacloud/ccc/model/RemovePersonalNumbersFromUserRequest.h
@@ -294,6 +298,8 @@ set(ccc_src
src/model/GetCallDetailRecordResult.cc
src/model/GetCampaignRequest.cc
src/model/GetCampaignResult.cc
src/model/GetCaseFileUploadUrlRequest.cc
src/model/GetCaseFileUploadUrlResult.cc
src/model/GetHistoricalCallerReportRequest.cc
src/model/GetHistoricalCallerReportResult.cc
src/model/GetHistoricalInstanceReportRequest.cc
@@ -426,6 +432,8 @@ set(ccc_src
src/model/ReadyForServiceResult.cc
src/model/RegisterDeviceRequest.cc
src/model/RegisterDeviceResult.cc
src/model/RegisterDevicesRequest.cc
src/model/RegisterDevicesResult.cc
src/model/ReleaseCallRequest.cc
src/model/ReleaseCallResult.cc
src/model/RemovePersonalNumbersFromUserRequest.cc

View File

@@ -66,6 +66,8 @@
#include "model/GetCallDetailRecordResult.h"
#include "model/GetCampaignRequest.h"
#include "model/GetCampaignResult.h"
#include "model/GetCaseFileUploadUrlRequest.h"
#include "model/GetCaseFileUploadUrlResult.h"
#include "model/GetHistoricalCallerReportRequest.h"
#include "model/GetHistoricalCallerReportResult.h"
#include "model/GetHistoricalInstanceReportRequest.h"
@@ -198,6 +200,8 @@
#include "model/ReadyForServiceResult.h"
#include "model/RegisterDeviceRequest.h"
#include "model/RegisterDeviceResult.h"
#include "model/RegisterDevicesRequest.h"
#include "model/RegisterDevicesResult.h"
#include "model/ReleaseCallRequest.h"
#include "model/ReleaseCallResult.h"
#include "model/RemovePersonalNumbersFromUserRequest.h"
@@ -323,6 +327,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::GetCampaignResult> GetCampaignOutcome;
typedef std::future<GetCampaignOutcome> GetCampaignOutcomeCallable;
typedef std::function<void(const CCCClient*, const Model::GetCampaignRequest&, const GetCampaignOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetCampaignAsyncHandler;
typedef Outcome<Error, Model::GetCaseFileUploadUrlResult> GetCaseFileUploadUrlOutcome;
typedef std::future<GetCaseFileUploadUrlOutcome> GetCaseFileUploadUrlOutcomeCallable;
typedef std::function<void(const CCCClient*, const Model::GetCaseFileUploadUrlRequest&, const GetCaseFileUploadUrlOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetCaseFileUploadUrlAsyncHandler;
typedef Outcome<Error, Model::GetHistoricalCallerReportResult> GetHistoricalCallerReportOutcome;
typedef std::future<GetHistoricalCallerReportOutcome> GetHistoricalCallerReportOutcomeCallable;
typedef std::function<void(const CCCClient*, const Model::GetHistoricalCallerReportRequest&, const GetHistoricalCallerReportOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetHistoricalCallerReportAsyncHandler;
@@ -521,6 +528,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::RegisterDeviceResult> RegisterDeviceOutcome;
typedef std::future<RegisterDeviceOutcome> RegisterDeviceOutcomeCallable;
typedef std::function<void(const CCCClient*, const Model::RegisterDeviceRequest&, const RegisterDeviceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RegisterDeviceAsyncHandler;
typedef Outcome<Error, Model::RegisterDevicesResult> RegisterDevicesOutcome;
typedef std::future<RegisterDevicesOutcome> RegisterDevicesOutcomeCallable;
typedef std::function<void(const CCCClient*, const Model::RegisterDevicesRequest&, const RegisterDevicesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RegisterDevicesAsyncHandler;
typedef Outcome<Error, Model::ReleaseCallResult> ReleaseCallOutcome;
typedef std::future<ReleaseCallOutcome> ReleaseCallOutcomeCallable;
typedef std::function<void(const CCCClient*, const Model::ReleaseCallRequest&, const ReleaseCallOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ReleaseCallAsyncHandler;
@@ -667,6 +677,9 @@ namespace AlibabaCloud
GetCampaignOutcome getCampaign(const Model::GetCampaignRequest &request)const;
void getCampaignAsync(const Model::GetCampaignRequest& request, const GetCampaignAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetCampaignOutcomeCallable getCampaignCallable(const Model::GetCampaignRequest& request) const;
GetCaseFileUploadUrlOutcome getCaseFileUploadUrl(const Model::GetCaseFileUploadUrlRequest &request)const;
void getCaseFileUploadUrlAsync(const Model::GetCaseFileUploadUrlRequest& request, const GetCaseFileUploadUrlAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetCaseFileUploadUrlOutcomeCallable getCaseFileUploadUrlCallable(const Model::GetCaseFileUploadUrlRequest& request) const;
GetHistoricalCallerReportOutcome getHistoricalCallerReport(const Model::GetHistoricalCallerReportRequest &request)const;
void getHistoricalCallerReportAsync(const Model::GetHistoricalCallerReportRequest& request, const GetHistoricalCallerReportAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetHistoricalCallerReportOutcomeCallable getHistoricalCallerReportCallable(const Model::GetHistoricalCallerReportRequest& request) const;
@@ -865,6 +878,9 @@ namespace AlibabaCloud
RegisterDeviceOutcome registerDevice(const Model::RegisterDeviceRequest &request)const;
void registerDeviceAsync(const Model::RegisterDeviceRequest& request, const RegisterDeviceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RegisterDeviceOutcomeCallable registerDeviceCallable(const Model::RegisterDeviceRequest& request) const;
RegisterDevicesOutcome registerDevices(const Model::RegisterDevicesRequest &request)const;
void registerDevicesAsync(const Model::RegisterDevicesRequest& request, const RegisterDevicesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RegisterDevicesOutcomeCallable registerDevicesCallable(const Model::RegisterDevicesRequest& request) const;
ReleaseCallOutcome releaseCall(const Model::ReleaseCallRequest &request)const;
void releaseCallAsync(const Model::ReleaseCallRequest& request, const ReleaseCallAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ReleaseCallOutcomeCallable releaseCallCallable(const Model::ReleaseCallRequest& request) const;

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_CCC_MODEL_GETCASEFILEUPLOADURLREQUEST_H_
#define ALIBABACLOUD_CCC_MODEL_GETCASEFILEUPLOADURLREQUEST_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 GetCaseFileUploadUrlRequest : public RpcServiceRequest
{
public:
GetCaseFileUploadUrlRequest();
~GetCaseFileUploadUrlRequest();
std::string getInstanceId()const;
void setInstanceId(const std::string& instanceId);
std::string getFileName()const;
void setFileName(const std::string& fileName);
private:
std::string instanceId_;
std::string fileName_;
};
}
}
}
#endif // !ALIBABACLOUD_CCC_MODEL_GETCASEFILEUPLOADURLREQUEST_H_

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_CCC_MODEL_GETCASEFILEUPLOADURLRESULT_H_
#define ALIBABACLOUD_CCC_MODEL_GETCASEFILEUPLOADURLRESULT_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 GetCaseFileUploadUrlResult : public ServiceResult
{
public:
struct Data
{
std::string caseFileKey;
std::string url;
};
GetCaseFileUploadUrlResult();
explicit GetCaseFileUploadUrlResult(const std::string &payload);
~GetCaseFileUploadUrlResult();
std::string getMessage()const;
int getHttpStatusCode()const;
Data getData()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
int httpStatusCode_;
Data data_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_CCC_MODEL_GETCASEFILEUPLOADURLRESULT_H_

View File

@@ -34,14 +34,18 @@ namespace AlibabaCloud
public:
struct Data
{
std::string extension;
std::string agentServerUrl;
std::string sipServerUrl;
std::string deviceId;
std::string userKey;
std::string userKey2;
std::string extension;
std::string agentServerUrl;
std::string deviceState;
std::string userId;
std::string signature;
std::string userKey;
std::string displayName;
std::string deviceExt;
std::string signature2;
std::string workMode;
};

View File

@@ -34,15 +34,18 @@ namespace AlibabaCloud
public:
struct Data
{
std::string extension;
std::string loginName;
std::string roleName;
std::string email;
std::string instanceId;
std::string userId;
std::string displayName;
std::string deviceId;
std::string mobile;
std::string roleId;
std::string extension;
std::string roleName;
std::string deviceState;
std::string userId;
std::string displayName;
std::string deviceExt;
std::string workMode;
};

View File

@@ -52,6 +52,7 @@ namespace AlibabaCloud
};
std::string loginName;
std::string email;
std::string deviceId;
std::vector<UserDetail::UserSkillLevel> skillLevelList;
bool primaryAccount;
long ramId;
@@ -59,9 +60,12 @@ namespace AlibabaCloud
std::string displayId;
std::string mobile;
std::string roleId;
std::string extension;
std::string roleName;
std::string deviceState;
std::string userId;
std::string displayName;
std::string deviceExt;
std::string workMode;
};
int totalCount;

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_REGISTERDEVICESREQUEST_H_
#define ALIBABACLOUD_CCC_MODEL_REGISTERDEVICESREQUEST_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 RegisterDevicesRequest : public RpcServiceRequest
{
public:
RegisterDevicesRequest();
~RegisterDevicesRequest();
std::string getUserIdListJson()const;
void setUserIdListJson(const std::string& userIdListJson);
std::string getDeviceId()const;
void setDeviceId(const std::string& deviceId);
std::string getPassword()const;
void setPassword(const std::string& password);
std::string getInstanceId()const;
void setInstanceId(const std::string& instanceId);
private:
std::string userIdListJson_;
std::string deviceId_;
std::string password_;
std::string instanceId_;
};
}
}
}
#endif // !ALIBABACLOUD_CCC_MODEL_REGISTERDEVICESREQUEST_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_REGISTERDEVICESRESULT_H_
#define ALIBABACLOUD_CCC_MODEL_REGISTERDEVICESRESULT_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 RegisterDevicesResult : public ServiceResult
{
public:
RegisterDevicesResult();
explicit RegisterDevicesResult(const std::string &payload);
~RegisterDevicesResult();
std::string getMessage()const;
int getHttpStatusCode()const;
std::vector<std::string> getParams()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
int httpStatusCode_;
std::vector<std::string> params_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_CCC_MODEL_REGISTERDEVICESRESULT_H_

View File

@@ -69,6 +69,7 @@ namespace AlibabaCloud
std::vector<std::string> signedSkillGroupIdList;
};
UserContext userContext;
long contextId;
CallContext callContext;
};

View File

@@ -31,21 +31,21 @@ CCCClient::CCCClient(const Credentials &credentials, const ClientConfiguration &
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "CCC");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
CCCClient::CCCClient(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, "CCC");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
CCCClient::CCCClient(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, "CCC");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
CCCClient::~CCCClient()
@@ -843,6 +843,42 @@ CCCClient::GetCampaignOutcomeCallable CCCClient::getCampaignCallable(const GetCa
return task->get_future();
}
CCCClient::GetCaseFileUploadUrlOutcome CCCClient::getCaseFileUploadUrl(const GetCaseFileUploadUrlRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetCaseFileUploadUrlOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetCaseFileUploadUrlOutcome(GetCaseFileUploadUrlResult(outcome.result()));
else
return GetCaseFileUploadUrlOutcome(outcome.error());
}
void CCCClient::getCaseFileUploadUrlAsync(const GetCaseFileUploadUrlRequest& request, const GetCaseFileUploadUrlAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getCaseFileUploadUrl(request), context);
};
asyncExecute(new Runnable(fn));
}
CCCClient::GetCaseFileUploadUrlOutcomeCallable CCCClient::getCaseFileUploadUrlCallable(const GetCaseFileUploadUrlRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetCaseFileUploadUrlOutcome()>>(
[this, request]()
{
return this->getCaseFileUploadUrl(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CCCClient::GetHistoricalCallerReportOutcome CCCClient::getHistoricalCallerReport(const GetHistoricalCallerReportRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -3219,6 +3255,42 @@ CCCClient::RegisterDeviceOutcomeCallable CCCClient::registerDeviceCallable(const
return task->get_future();
}
CCCClient::RegisterDevicesOutcome CCCClient::registerDevices(const RegisterDevicesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return RegisterDevicesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return RegisterDevicesOutcome(RegisterDevicesResult(outcome.result()));
else
return RegisterDevicesOutcome(outcome.error());
}
void CCCClient::registerDevicesAsync(const RegisterDevicesRequest& request, const RegisterDevicesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, registerDevices(request), context);
};
asyncExecute(new Runnable(fn));
}
CCCClient::RegisterDevicesOutcomeCallable CCCClient::registerDevicesCallable(const RegisterDevicesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<RegisterDevicesOutcome()>>(
[this, request]()
{
return this->registerDevices(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CCCClient::ReleaseCallOutcome CCCClient::releaseCall(const ReleaseCallRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

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.
*/
#include <alibabacloud/ccc/model/GetCaseFileUploadUrlRequest.h>
using AlibabaCloud::CCC::Model::GetCaseFileUploadUrlRequest;
GetCaseFileUploadUrlRequest::GetCaseFileUploadUrlRequest() :
RpcServiceRequest("ccc", "2020-07-01", "GetCaseFileUploadUrl")
{
setMethod(HttpRequest::Method::Post);
}
GetCaseFileUploadUrlRequest::~GetCaseFileUploadUrlRequest()
{}
std::string GetCaseFileUploadUrlRequest::getInstanceId()const
{
return instanceId_;
}
void GetCaseFileUploadUrlRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string GetCaseFileUploadUrlRequest::getFileName()const
{
return fileName_;
}
void GetCaseFileUploadUrlRequest::setFileName(const std::string& fileName)
{
fileName_ = fileName;
setParameter("FileName", fileName);
}

View File

@@ -0,0 +1,75 @@
/*
* 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/GetCaseFileUploadUrlResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
GetCaseFileUploadUrlResult::GetCaseFileUploadUrlResult() :
ServiceResult()
{}
GetCaseFileUploadUrlResult::GetCaseFileUploadUrlResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetCaseFileUploadUrlResult::~GetCaseFileUploadUrlResult()
{}
void GetCaseFileUploadUrlResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["Url"].isNull())
data_.url = dataNode["Url"].asString();
if(!dataNode["CaseFileKey"].isNull())
data_.caseFileKey = dataNode["CaseFileKey"].asString();
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string GetCaseFileUploadUrlResult::getMessage()const
{
return message_;
}
int GetCaseFileUploadUrlResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
GetCaseFileUploadUrlResult::Data GetCaseFileUploadUrlResult::getData()const
{
return data_;
}
std::string GetCaseFileUploadUrlResult::getCode()const
{
return code_;
}

View File

@@ -58,6 +58,14 @@ void GetLoginDetailsResult::parse(const std::string &payload)
data_.userKey = dataNode["UserKey"].asString();
if(!dataNode["WorkMode"].isNull())
data_.workMode = dataNode["WorkMode"].asString();
if(!dataNode["UserKey2"].isNull())
data_.userKey2 = dataNode["UserKey2"].asString();
if(!dataNode["Signature2"].isNull())
data_.signature2 = dataNode["Signature2"].asString();
if(!dataNode["DeviceExt"].isNull())
data_.deviceExt = dataNode["DeviceExt"].asString();
if(!dataNode["DeviceState"].isNull())
data_.deviceState = dataNode["DeviceState"].asString();
auto allParams = value["Params"]["Param"];
for (const auto &item : allParams)
params_.push_back(item.asString());

View File

@@ -60,6 +60,12 @@ void GetUserResult::parse(const std::string &payload)
data_.instanceId = dataNode["InstanceId"].asString();
if(!dataNode["RoleId"].isNull())
data_.roleId = dataNode["RoleId"].asString();
if(!dataNode["DeviceId"].isNull())
data_.deviceId = dataNode["DeviceId"].asString();
if(!dataNode["DeviceExt"].isNull())
data_.deviceExt = dataNode["DeviceExt"].asString();
if(!dataNode["DeviceState"].isNull())
data_.deviceState = dataNode["DeviceState"].asString();
auto allParams = value["Params"]["Param"];
for (const auto &item : allParams)
params_.push_back(item.asString());

View File

@@ -72,6 +72,14 @@ void ListUsersResult::parse(const std::string &payload)
userDetailObject.primaryAccount = dataNodeListUserDetail["PrimaryAccount"].asString() == "true";
if(!dataNodeListUserDetail["RamId"].isNull())
userDetailObject.ramId = std::stol(dataNodeListUserDetail["RamId"].asString());
if(!dataNodeListUserDetail["Extension"].isNull())
userDetailObject.extension = dataNodeListUserDetail["Extension"].asString();
if(!dataNodeListUserDetail["DeviceId"].isNull())
userDetailObject.deviceId = dataNodeListUserDetail["DeviceId"].asString();
if(!dataNodeListUserDetail["DeviceExt"].isNull())
userDetailObject.deviceExt = dataNodeListUserDetail["DeviceExt"].asString();
if(!dataNodeListUserDetail["DeviceState"].isNull())
userDetailObject.deviceState = dataNodeListUserDetail["DeviceState"].asString();
auto allPersonalOutboundNumberListNode = dataNodeListUserDetail["PersonalOutboundNumberList"]["PhoneNumber"];
for (auto dataNodeListUserDetailPersonalOutboundNumberListPhoneNumber : allPersonalOutboundNumberListNode)
{

View File

@@ -0,0 +1,73 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ccc/model/RegisterDevicesRequest.h>
using AlibabaCloud::CCC::Model::RegisterDevicesRequest;
RegisterDevicesRequest::RegisterDevicesRequest() :
RpcServiceRequest("ccc", "2020-07-01", "RegisterDevices")
{
setMethod(HttpRequest::Method::Post);
}
RegisterDevicesRequest::~RegisterDevicesRequest()
{}
std::string RegisterDevicesRequest::getUserIdListJson()const
{
return userIdListJson_;
}
void RegisterDevicesRequest::setUserIdListJson(const std::string& userIdListJson)
{
userIdListJson_ = userIdListJson;
setParameter("UserIdListJson", userIdListJson);
}
std::string RegisterDevicesRequest::getDeviceId()const
{
return deviceId_;
}
void RegisterDevicesRequest::setDeviceId(const std::string& deviceId)
{
deviceId_ = deviceId;
setParameter("DeviceId", deviceId);
}
std::string RegisterDevicesRequest::getPassword()const
{
return password_;
}
void RegisterDevicesRequest::setPassword(const std::string& password)
{
password_ = password;
setParameter("Password", password);
}
std::string RegisterDevicesRequest::getInstanceId()const
{
return instanceId_;
}
void RegisterDevicesRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}

View File

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

View File

@@ -40,6 +40,8 @@ void ReleaseCallResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["ContextId"].isNull())
data_.contextId = std::stol(dataNode["ContextId"].asString());
auto callContextNode = dataNode["CallContext"];
if(!callContextNode["JobId"].isNull())
data_.callContext.jobId = callContextNode["JobId"].asString();