Fix build failed on windows
This commit is contained in:
@@ -22,46 +22,38 @@ using namespace AlibabaCloud::Location;
|
||||
using namespace AlibabaCloud::CCC;
|
||||
using namespace AlibabaCloud::CCC::Model;
|
||||
|
||||
namespace
|
||||
{
|
||||
const std::string SERVICE_NAME = "CCC";
|
||||
}
|
||||
|
||||
CCCClient::CCCClient(const Credentials &credentials, const ClientConfiguration &configuration) :
|
||||
RpcServiceClient(std::make_shared<SimpleCredentialsProvider>(credentials), 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(), "CCC");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "CCC");
|
||||
}
|
||||
|
||||
CCCClient::CCCClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(credentialsProvider, configuration)
|
||||
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), "CCC");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "CCC");
|
||||
}
|
||||
|
||||
CCCClient::CCCClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), 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(), "CCC");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "CCC");
|
||||
}
|
||||
|
||||
CCCClient::~CCCClient()
|
||||
{}
|
||||
|
||||
CoreClient::EndpointOutcome CCCClient::endpoint()const
|
||||
{
|
||||
if(!configuration().endpoint().empty())
|
||||
return CoreClient::EndpointOutcome(configuration().endpoint());
|
||||
|
||||
auto endpoint = endpointProvider_->getEndpoint();
|
||||
|
||||
if (endpoint.empty())
|
||||
return CoreClient::EndpointOutcome(Error("InvalidEndpoint",""));
|
||||
else
|
||||
return CoreClient::EndpointOutcome(endpoint);
|
||||
}
|
||||
|
||||
CCCClient::ListRecordingsByContactIdOutcome CCCClient::listRecordingsByContactId(const ListRecordingsByContactIdRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListRecordingsByContactIdOutcome(endpointOutcome.error());
|
||||
|
||||
@@ -94,10 +86,10 @@ CCCClient::ListRecordingsByContactIdOutcomeCallable CCCClient::listRecordingsByC
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
CCCClient::ListUsersOfSkillGroupOutcome CCCClient::listUsersOfSkillGroup(const ListUsersOfSkillGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListUsersOfSkillGroupOutcome(endpointOutcome.error());
|
||||
|
||||
@@ -130,10 +122,10 @@ CCCClient::ListUsersOfSkillGroupOutcomeCallable CCCClient::listUsersOfSkillGroup
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
CCCClient::DeleteSkillGroupOutcome CCCClient::deleteSkillGroup(const DeleteSkillGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteSkillGroupOutcome(endpointOutcome.error());
|
||||
|
||||
@@ -166,10 +158,10 @@ CCCClient::DeleteSkillGroupOutcomeCallable CCCClient::deleteSkillGroupCallable(c
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
CCCClient::ModifyPhoneNumberOutcome CCCClient::modifyPhoneNumber(const ModifyPhoneNumberRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ModifyPhoneNumberOutcome(endpointOutcome.error());
|
||||
|
||||
@@ -202,10 +194,10 @@ CCCClient::ModifyPhoneNumberOutcomeCallable CCCClient::modifyPhoneNumberCallable
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
CCCClient::ListUsersOutcome CCCClient::listUsers(const ListUsersRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListUsersOutcome(endpointOutcome.error());
|
||||
|
||||
@@ -238,10 +230,10 @@ CCCClient::ListUsersOutcomeCallable CCCClient::listUsersCallable(const ListUsers
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
CCCClient::ListSkillGroupsOutcome CCCClient::listSkillGroups(const ListSkillGroupsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListSkillGroupsOutcome(endpointOutcome.error());
|
||||
|
||||
@@ -274,10 +266,10 @@ CCCClient::ListSkillGroupsOutcomeCallable CCCClient::listSkillGroupsCallable(con
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
CCCClient::ListSkillGroupsOfUserOutcome CCCClient::listSkillGroupsOfUser(const ListSkillGroupsOfUserRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListSkillGroupsOfUserOutcome(endpointOutcome.error());
|
||||
|
||||
@@ -310,10 +302,10 @@ CCCClient::ListSkillGroupsOfUserOutcomeCallable CCCClient::listSkillGroupsOfUser
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
CCCClient::RemovePhoneNumberOutcome CCCClient::removePhoneNumber(const RemovePhoneNumberRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RemovePhoneNumberOutcome(endpointOutcome.error());
|
||||
|
||||
@@ -346,10 +338,10 @@ CCCClient::RemovePhoneNumberOutcomeCallable CCCClient::removePhoneNumberCallable
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
CCCClient::ListCallDetailRecordsOutcome CCCClient::listCallDetailRecords(const ListCallDetailRecordsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListCallDetailRecordsOutcome(endpointOutcome.error());
|
||||
|
||||
@@ -382,10 +374,10 @@ CCCClient::ListCallDetailRecordsOutcomeCallable CCCClient::listCallDetailRecords
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
CCCClient::AddPhoneNumberOutcome CCCClient::addPhoneNumber(const AddPhoneNumberRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return AddPhoneNumberOutcome(endpointOutcome.error());
|
||||
|
||||
@@ -418,10 +410,10 @@ CCCClient::AddPhoneNumberOutcomeCallable CCCClient::addPhoneNumberCallable(const
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
CCCClient::ListRecordingsOutcome CCCClient::listRecordings(const ListRecordingsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListRecordingsOutcome(endpointOutcome.error());
|
||||
|
||||
@@ -454,10 +446,10 @@ CCCClient::ListRecordingsOutcomeCallable CCCClient::listRecordingsCallable(const
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
CCCClient::GetConfigOutcome CCCClient::getConfig(const GetConfigRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetConfigOutcome(endpointOutcome.error());
|
||||
|
||||
@@ -490,10 +482,10 @@ CCCClient::GetConfigOutcomeCallable CCCClient::getConfigCallable(const GetConfig
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
CCCClient::DownloadRecordingOutcome CCCClient::downloadRecording(const DownloadRecordingRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DownloadRecordingOutcome(endpointOutcome.error());
|
||||
|
||||
@@ -526,10 +518,10 @@ CCCClient::DownloadRecordingOutcomeCallable CCCClient::downloadRecordingCallable
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
CCCClient::ListPhoneNumbersOutcome CCCClient::listPhoneNumbers(const ListPhoneNumbersRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListPhoneNumbersOutcome(endpointOutcome.error());
|
||||
|
||||
@@ -562,10 +554,10 @@ CCCClient::ListPhoneNumbersOutcomeCallable CCCClient::listPhoneNumbersCallable(c
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
CCCClient::RefreshTokenOutcome CCCClient::refreshToken(const RefreshTokenRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RefreshTokenOutcome(endpointOutcome.error());
|
||||
|
||||
@@ -598,10 +590,10 @@ CCCClient::RefreshTokenOutcomeCallable CCCClient::refreshTokenCallable(const Ref
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
CCCClient::RequestLoginInfoOutcome CCCClient::requestLoginInfo(const RequestLoginInfoRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RequestLoginInfoOutcome(endpointOutcome.error());
|
||||
|
||||
@@ -634,10 +626,10 @@ CCCClient::RequestLoginInfoOutcomeCallable CCCClient::requestLoginInfoCallable(c
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
CCCClient::GetServiceExtensionsOutcome CCCClient::getServiceExtensions(const GetServiceExtensionsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetServiceExtensionsOutcome(endpointOutcome.error());
|
||||
|
||||
@@ -670,10 +662,10 @@ CCCClient::GetServiceExtensionsOutcomeCallable CCCClient::getServiceExtensionsCa
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
CCCClient::ListContactFlowsOutcome CCCClient::listContactFlows(const ListContactFlowsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListContactFlowsOutcome(endpointOutcome.error());
|
||||
|
||||
@@ -706,10 +698,10 @@ CCCClient::ListContactFlowsOutcomeCallable CCCClient::listContactFlowsCallable(c
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
CCCClient::ListRolesOutcome CCCClient::listRoles(const ListRolesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListRolesOutcome(endpointOutcome.error());
|
||||
|
||||
@@ -742,10 +734,10 @@ CCCClient::ListRolesOutcomeCallable CCCClient::listRolesCallable(const ListRoles
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
CCCClient::GetUserOutcome CCCClient::getUser(const GetUserRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetUserOutcome(endpointOutcome.error());
|
||||
|
||||
@@ -778,4 +770,4 @@ CCCClient::GetUserOutcomeCallable CCCClient::getUserCallable(const GetUserReques
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user