CCC SDK Auto Released By yonghong.lyh,Version:1.22.1

Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
This commit is contained in:
yixiong.jxy
2018-08-14 09:59:40 +08:00
parent 9a2a29f308
commit 5aaae25e49
11 changed files with 352 additions and 1 deletions

View File

@@ -2211,6 +2211,42 @@ CCCClient::ListConfigOutcomeCallable CCCClient::listConfigCallable(const ListCon
return task->get_future();
}
CCCClient::LaunchShortMessageAppraiseOutcome CCCClient::launchShortMessageAppraise(const LaunchShortMessageAppraiseRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return LaunchShortMessageAppraiseOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return LaunchShortMessageAppraiseOutcome(LaunchShortMessageAppraiseResult(outcome.result()));
else
return LaunchShortMessageAppraiseOutcome(outcome.error());
}
void CCCClient::launchShortMessageAppraiseAsync(const LaunchShortMessageAppraiseRequest& request, const LaunchShortMessageAppraiseAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, launchShortMessageAppraise(request), context);
};
asyncExecute(new Runnable(fn));
}
CCCClient::LaunchShortMessageAppraiseOutcomeCallable CCCClient::launchShortMessageAppraiseCallable(const LaunchShortMessageAppraiseRequest &request) const
{
auto task = std::make_shared<std::packaged_task<LaunchShortMessageAppraiseOutcome()>>(
[this, request]()
{
return this->launchShortMessageAppraise(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CCCClient::ModifyPhoneNumberOutcome CCCClient::modifyPhoneNumber(const ModifyPhoneNumberRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -69,6 +69,17 @@ void DialogueRequest::setCalledNumber(const std::string& calledNumber)
setParameter("CalledNumber", calledNumber);
}
std::string DialogueRequest::getActionKey()const
{
return actionKey_;
}
void DialogueRequest::setActionKey(const std::string& actionKey)
{
actionKey_ = actionKey;
setParameter("ActionKey", actionKey);
}
std::string DialogueRequest::getActionParams()const
{
return actionParams_;

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.
*/
#include <alibabacloud/ccc/model/LaunchShortMessageAppraiseRequest.h>
using AlibabaCloud::CCC::Model::LaunchShortMessageAppraiseRequest;
LaunchShortMessageAppraiseRequest::LaunchShortMessageAppraiseRequest() :
RpcServiceRequest("ccc", "2017-07-05", "LaunchShortMessageAppraise")
{}
LaunchShortMessageAppraiseRequest::~LaunchShortMessageAppraiseRequest()
{}
std::string LaunchShortMessageAppraiseRequest::getAcid()const
{
return acid_;
}
void LaunchShortMessageAppraiseRequest::setAcid(const std::string& acid)
{
acid_ = acid;
setParameter("Acid", acid);
}
std::string LaunchShortMessageAppraiseRequest::getInstanceId()const
{
return instanceId_;
}
void LaunchShortMessageAppraiseRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
int LaunchShortMessageAppraiseRequest::getContactType()const
{
return contactType_;
}
void LaunchShortMessageAppraiseRequest::setContactType(int contactType)
{
contactType_ = contactType;
setParameter("ContactType", std::to_string(contactType));
}
std::string LaunchShortMessageAppraiseRequest::getPhoneNumbers()const
{
return phoneNumbers_;
}
void LaunchShortMessageAppraiseRequest::setPhoneNumbers(const std::string& phoneNumbers)
{
phoneNumbers_ = phoneNumbers;
setParameter("PhoneNumbers", phoneNumbers);
}
std::string LaunchShortMessageAppraiseRequest::getSkillGroupId()const
{
return skillGroupId_;
}
void LaunchShortMessageAppraiseRequest::setSkillGroupId(const std::string& skillGroupId)
{
skillGroupId_ = skillGroupId;
setParameter("SkillGroupId", skillGroupId);
}
std::string LaunchShortMessageAppraiseRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void LaunchShortMessageAppraiseRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

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/LaunchShortMessageAppraiseResult.h>
#include <json/json.h>
using namespace AlibabaCloud::CCC;
using namespace AlibabaCloud::CCC::Model;
LaunchShortMessageAppraiseResult::LaunchShortMessageAppraiseResult() :
ServiceResult()
{}
LaunchShortMessageAppraiseResult::LaunchShortMessageAppraiseResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
LaunchShortMessageAppraiseResult::~LaunchShortMessageAppraiseResult()
{}
void LaunchShortMessageAppraiseResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["HttpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
}
std::string LaunchShortMessageAppraiseResult::getMessage()const
{
return message_;
}
int LaunchShortMessageAppraiseResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string LaunchShortMessageAppraiseResult::getCode()const
{
return code_;
}
bool LaunchShortMessageAppraiseResult::getSuccess()const
{
return success_;
}