fixed #51
This commit is contained in:
@@ -123,6 +123,42 @@ DyvmsapiClient::BatchRobotSmartCallOutcomeCallable DyvmsapiClient::batchRobotSma
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DyvmsapiClient::BindNumberAndVoipIdOutcome DyvmsapiClient::bindNumberAndVoipId(const BindNumberAndVoipIdRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return BindNumberAndVoipIdOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return BindNumberAndVoipIdOutcome(BindNumberAndVoipIdResult(outcome.result()));
|
||||
else
|
||||
return BindNumberAndVoipIdOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DyvmsapiClient::bindNumberAndVoipIdAsync(const BindNumberAndVoipIdRequest& request, const BindNumberAndVoipIdAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, bindNumberAndVoipId(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DyvmsapiClient::BindNumberAndVoipIdOutcomeCallable DyvmsapiClient::bindNumberAndVoipIdCallable(const BindNumberAndVoipIdRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<BindNumberAndVoipIdOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->bindNumberAndVoipId(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DyvmsapiClient::CancelCallOutcome DyvmsapiClient::cancelCall(const CancelCallRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -915,6 +951,42 @@ DyvmsapiClient::StopRobotTaskOutcomeCallable DyvmsapiClient::stopRobotTaskCallab
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DyvmsapiClient::UnbindNumberAndVoipIdOutcome DyvmsapiClient::unbindNumberAndVoipId(const UnbindNumberAndVoipIdRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UnbindNumberAndVoipIdOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UnbindNumberAndVoipIdOutcome(UnbindNumberAndVoipIdResult(outcome.result()));
|
||||
else
|
||||
return UnbindNumberAndVoipIdOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DyvmsapiClient::unbindNumberAndVoipIdAsync(const UnbindNumberAndVoipIdRequest& request, const UnbindNumberAndVoipIdAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, unbindNumberAndVoipId(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DyvmsapiClient::UnbindNumberAndVoipIdOutcomeCallable DyvmsapiClient::unbindNumberAndVoipIdCallable(const UnbindNumberAndVoipIdRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UnbindNumberAndVoipIdOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->unbindNumberAndVoipId(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DyvmsapiClient::UploadRobotTaskCalledFileOutcome DyvmsapiClient::uploadRobotTaskCalledFile(const UploadRobotTaskCalledFileRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
93
dyvmsapi/src/model/BindNumberAndVoipIdRequest.cc
Normal file
93
dyvmsapi/src/model/BindNumberAndVoipIdRequest.cc
Normal 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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/dyvmsapi/model/BindNumberAndVoipIdRequest.h>
|
||||
|
||||
using AlibabaCloud::Dyvmsapi::Model::BindNumberAndVoipIdRequest;
|
||||
|
||||
BindNumberAndVoipIdRequest::BindNumberAndVoipIdRequest() :
|
||||
RpcServiceRequest("dyvmsapi", "2017-05-25", "BindNumberAndVoipId")
|
||||
{}
|
||||
|
||||
BindNumberAndVoipIdRequest::~BindNumberAndVoipIdRequest()
|
||||
{}
|
||||
|
||||
long BindNumberAndVoipIdRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void BindNumberAndVoipIdRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setCoreParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string BindNumberAndVoipIdRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void BindNumberAndVoipIdRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setCoreParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string BindNumberAndVoipIdRequest::getPhoneNumber()const
|
||||
{
|
||||
return phoneNumber_;
|
||||
}
|
||||
|
||||
void BindNumberAndVoipIdRequest::setPhoneNumber(const std::string& phoneNumber)
|
||||
{
|
||||
phoneNumber_ = phoneNumber;
|
||||
setCoreParameter("PhoneNumber", phoneNumber);
|
||||
}
|
||||
|
||||
long BindNumberAndVoipIdRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void BindNumberAndVoipIdRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setCoreParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string BindNumberAndVoipIdRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void BindNumberAndVoipIdRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string BindNumberAndVoipIdRequest::getVoipId()const
|
||||
{
|
||||
return voipId_;
|
||||
}
|
||||
|
||||
void BindNumberAndVoipIdRequest::setVoipId(const std::string& voipId)
|
||||
{
|
||||
voipId_ = voipId;
|
||||
setCoreParameter("VoipId", voipId);
|
||||
}
|
||||
|
||||
65
dyvmsapi/src/model/BindNumberAndVoipIdResult.cc
Normal file
65
dyvmsapi/src/model/BindNumberAndVoipIdResult.cc
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* 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/dyvmsapi/model/BindNumberAndVoipIdResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dyvmsapi;
|
||||
using namespace AlibabaCloud::Dyvmsapi::Model;
|
||||
|
||||
BindNumberAndVoipIdResult::BindNumberAndVoipIdResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
BindNumberAndVoipIdResult::BindNumberAndVoipIdResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
BindNumberAndVoipIdResult::~BindNumberAndVoipIdResult()
|
||||
{}
|
||||
|
||||
void BindNumberAndVoipIdResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Module"].isNull())
|
||||
module_ = value["Module"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string BindNumberAndVoipIdResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string BindNumberAndVoipIdResult::getModule()const
|
||||
{
|
||||
return module_;
|
||||
}
|
||||
|
||||
std::string BindNumberAndVoipIdResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
93
dyvmsapi/src/model/UnbindNumberAndVoipIdRequest.cc
Normal file
93
dyvmsapi/src/model/UnbindNumberAndVoipIdRequest.cc
Normal 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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/dyvmsapi/model/UnbindNumberAndVoipIdRequest.h>
|
||||
|
||||
using AlibabaCloud::Dyvmsapi::Model::UnbindNumberAndVoipIdRequest;
|
||||
|
||||
UnbindNumberAndVoipIdRequest::UnbindNumberAndVoipIdRequest() :
|
||||
RpcServiceRequest("dyvmsapi", "2017-05-25", "UnbindNumberAndVoipId")
|
||||
{}
|
||||
|
||||
UnbindNumberAndVoipIdRequest::~UnbindNumberAndVoipIdRequest()
|
||||
{}
|
||||
|
||||
long UnbindNumberAndVoipIdRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void UnbindNumberAndVoipIdRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setCoreParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string UnbindNumberAndVoipIdRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void UnbindNumberAndVoipIdRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setCoreParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string UnbindNumberAndVoipIdRequest::getPhoneNumber()const
|
||||
{
|
||||
return phoneNumber_;
|
||||
}
|
||||
|
||||
void UnbindNumberAndVoipIdRequest::setPhoneNumber(const std::string& phoneNumber)
|
||||
{
|
||||
phoneNumber_ = phoneNumber;
|
||||
setCoreParameter("PhoneNumber", phoneNumber);
|
||||
}
|
||||
|
||||
long UnbindNumberAndVoipIdRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void UnbindNumberAndVoipIdRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setCoreParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string UnbindNumberAndVoipIdRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void UnbindNumberAndVoipIdRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string UnbindNumberAndVoipIdRequest::getVoipId()const
|
||||
{
|
||||
return voipId_;
|
||||
}
|
||||
|
||||
void UnbindNumberAndVoipIdRequest::setVoipId(const std::string& voipId)
|
||||
{
|
||||
voipId_ = voipId;
|
||||
setCoreParameter("VoipId", voipId);
|
||||
}
|
||||
|
||||
65
dyvmsapi/src/model/UnbindNumberAndVoipIdResult.cc
Normal file
65
dyvmsapi/src/model/UnbindNumberAndVoipIdResult.cc
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* 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/dyvmsapi/model/UnbindNumberAndVoipIdResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dyvmsapi;
|
||||
using namespace AlibabaCloud::Dyvmsapi::Model;
|
||||
|
||||
UnbindNumberAndVoipIdResult::UnbindNumberAndVoipIdResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UnbindNumberAndVoipIdResult::UnbindNumberAndVoipIdResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UnbindNumberAndVoipIdResult::~UnbindNumberAndVoipIdResult()
|
||||
{}
|
||||
|
||||
void UnbindNumberAndVoipIdResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Module"].isNull())
|
||||
module_ = value["Module"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string UnbindNumberAndVoipIdResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string UnbindNumberAndVoipIdResult::getModule()const
|
||||
{
|
||||
return module_;
|
||||
}
|
||||
|
||||
std::string UnbindNumberAndVoipIdResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user