Supported more api for user.
This commit is contained in:
@@ -519,6 +519,42 @@ AlinlpClient::GetEcEnGeneralOutcomeCallable AlinlpClient::getEcEnGeneralCallable
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AlinlpClient::GetEmbeddingOutcome AlinlpClient::getEmbedding(const GetEmbeddingRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetEmbeddingOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetEmbeddingOutcome(GetEmbeddingResult(outcome.result()));
|
||||
else
|
||||
return GetEmbeddingOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AlinlpClient::getEmbeddingAsync(const GetEmbeddingRequest& request, const GetEmbeddingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getEmbedding(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AlinlpClient::GetEmbeddingOutcomeCallable AlinlpClient::getEmbeddingCallable(const GetEmbeddingRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetEmbeddingOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getEmbedding(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AlinlpClient::GetItemPubChEcomOutcome AlinlpClient::getItemPubChEcom(const GetItemPubChEcomRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -807,6 +843,78 @@ AlinlpClient::GetNerCustomizedSeaEcomOutcomeCallable AlinlpClient::getNerCustomi
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AlinlpClient::GetOpenNLUOutcome AlinlpClient::getOpenNLU(const GetOpenNLURequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetOpenNLUOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetOpenNLUOutcome(GetOpenNLUResult(outcome.result()));
|
||||
else
|
||||
return GetOpenNLUOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AlinlpClient::getOpenNLUAsync(const GetOpenNLURequest& request, const GetOpenNLUAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getOpenNLU(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AlinlpClient::GetOpenNLUOutcomeCallable AlinlpClient::getOpenNLUCallable(const GetOpenNLURequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetOpenNLUOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getOpenNLU(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AlinlpClient::GetOpenNLUHighRecallOutcome AlinlpClient::getOpenNLUHighRecall(const GetOpenNLUHighRecallRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetOpenNLUHighRecallOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetOpenNLUHighRecallOutcome(GetOpenNLUHighRecallResult(outcome.result()));
|
||||
else
|
||||
return GetOpenNLUHighRecallOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AlinlpClient::getOpenNLUHighRecallAsync(const GetOpenNLUHighRecallRequest& request, const GetOpenNLUHighRecallAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getOpenNLUHighRecall(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AlinlpClient::GetOpenNLUHighRecallOutcomeCallable AlinlpClient::getOpenNLUHighRecallCallable(const GetOpenNLUHighRecallRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetOpenNLUHighRecallOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getOpenNLUHighRecall(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AlinlpClient::GetOperationChMedicalOutcome AlinlpClient::getOperationChMedical(const GetOperationChMedicalRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -951,6 +1059,42 @@ AlinlpClient::GetPriceChEcomOutcomeCallable AlinlpClient::getPriceChEcomCallable
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AlinlpClient::GetSSETestOutcome AlinlpClient::getSSETest(const GetSSETestRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetSSETestOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetSSETestOutcome(GetSSETestResult(outcome.result()));
|
||||
else
|
||||
return GetSSETestOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AlinlpClient::getSSETestAsync(const GetSSETestRequest& request, const GetSSETestAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getSSETest(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AlinlpClient::GetSSETestOutcomeCallable AlinlpClient::getSSETestCallable(const GetSSETestRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetSSETestOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getSSETest(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AlinlpClient::GetSaChGeneralOutcome AlinlpClient::getSaChGeneral(const GetSaChGeneralRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
54
alinlp/src/model/GetEmbeddingRequest.cc
Normal file
54
alinlp/src/model/GetEmbeddingRequest.cc
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* 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/alinlp/model/GetEmbeddingRequest.h>
|
||||
|
||||
using AlibabaCloud::Alinlp::Model::GetEmbeddingRequest;
|
||||
|
||||
GetEmbeddingRequest::GetEmbeddingRequest()
|
||||
: RpcServiceRequest("alinlp", "2020-06-29", "GetEmbedding") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetEmbeddingRequest::~GetEmbeddingRequest() {}
|
||||
|
||||
std::string GetEmbeddingRequest::getBusiness() const {
|
||||
return business_;
|
||||
}
|
||||
|
||||
void GetEmbeddingRequest::setBusiness(const std::string &business) {
|
||||
business_ = business;
|
||||
setParameter(std::string("Business"), business);
|
||||
}
|
||||
|
||||
std::string GetEmbeddingRequest::getServiceCode() const {
|
||||
return serviceCode_;
|
||||
}
|
||||
|
||||
void GetEmbeddingRequest::setServiceCode(const std::string &serviceCode) {
|
||||
serviceCode_ = serviceCode;
|
||||
setBodyParameter(std::string("ServiceCode"), serviceCode);
|
||||
}
|
||||
|
||||
std::string GetEmbeddingRequest::getText() const {
|
||||
return text_;
|
||||
}
|
||||
|
||||
void GetEmbeddingRequest::setText(const std::string &text) {
|
||||
text_ = text;
|
||||
setBodyParameter(std::string("Text"), text);
|
||||
}
|
||||
|
||||
51
alinlp/src/model/GetEmbeddingResult.cc
Normal file
51
alinlp/src/model/GetEmbeddingResult.cc
Normal 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/alinlp/model/GetEmbeddingResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Alinlp;
|
||||
using namespace AlibabaCloud::Alinlp::Model;
|
||||
|
||||
GetEmbeddingResult::GetEmbeddingResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetEmbeddingResult::GetEmbeddingResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetEmbeddingResult::~GetEmbeddingResult()
|
||||
{}
|
||||
|
||||
void GetEmbeddingResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Data"].isNull())
|
||||
data_ = value["Data"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetEmbeddingResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
81
alinlp/src/model/GetOpenNLUHighRecallRequest.cc
Normal file
81
alinlp/src/model/GetOpenNLUHighRecallRequest.cc
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* 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/alinlp/model/GetOpenNLUHighRecallRequest.h>
|
||||
|
||||
using AlibabaCloud::Alinlp::Model::GetOpenNLUHighRecallRequest;
|
||||
|
||||
GetOpenNLUHighRecallRequest::GetOpenNLUHighRecallRequest()
|
||||
: RpcServiceRequest("alinlp", "2020-06-29", "GetOpenNLUHighRecall") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetOpenNLUHighRecallRequest::~GetOpenNLUHighRecallRequest() {}
|
||||
|
||||
std::string GetOpenNLUHighRecallRequest::getSentence() const {
|
||||
return sentence_;
|
||||
}
|
||||
|
||||
void GetOpenNLUHighRecallRequest::setSentence(const std::string &sentence) {
|
||||
sentence_ = sentence;
|
||||
setBodyParameter(std::string("Sentence"), sentence);
|
||||
}
|
||||
|
||||
std::string GetOpenNLUHighRecallRequest::getBusiness() const {
|
||||
return business_;
|
||||
}
|
||||
|
||||
void GetOpenNLUHighRecallRequest::setBusiness(const std::string &business) {
|
||||
business_ = business;
|
||||
setParameter(std::string("Business"), business);
|
||||
}
|
||||
|
||||
std::string GetOpenNLUHighRecallRequest::getLabels() const {
|
||||
return labels_;
|
||||
}
|
||||
|
||||
void GetOpenNLUHighRecallRequest::setLabels(const std::string &labels) {
|
||||
labels_ = labels;
|
||||
setBodyParameter(std::string("Labels"), labels);
|
||||
}
|
||||
|
||||
std::string GetOpenNLUHighRecallRequest::getTask() const {
|
||||
return task_;
|
||||
}
|
||||
|
||||
void GetOpenNLUHighRecallRequest::setTask(const std::string &task) {
|
||||
task_ = task;
|
||||
setBodyParameter(std::string("Task"), task);
|
||||
}
|
||||
|
||||
std::string GetOpenNLUHighRecallRequest::getServiceCode() const {
|
||||
return serviceCode_;
|
||||
}
|
||||
|
||||
void GetOpenNLUHighRecallRequest::setServiceCode(const std::string &serviceCode) {
|
||||
serviceCode_ = serviceCode;
|
||||
setBodyParameter(std::string("ServiceCode"), serviceCode);
|
||||
}
|
||||
|
||||
std::string GetOpenNLUHighRecallRequest::getExamples() const {
|
||||
return examples_;
|
||||
}
|
||||
|
||||
void GetOpenNLUHighRecallRequest::setExamples(const std::string &examples) {
|
||||
examples_ = examples;
|
||||
setBodyParameter(std::string("Examples"), examples);
|
||||
}
|
||||
|
||||
51
alinlp/src/model/GetOpenNLUHighRecallResult.cc
Normal file
51
alinlp/src/model/GetOpenNLUHighRecallResult.cc
Normal 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/alinlp/model/GetOpenNLUHighRecallResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Alinlp;
|
||||
using namespace AlibabaCloud::Alinlp::Model;
|
||||
|
||||
GetOpenNLUHighRecallResult::GetOpenNLUHighRecallResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetOpenNLUHighRecallResult::GetOpenNLUHighRecallResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetOpenNLUHighRecallResult::~GetOpenNLUHighRecallResult()
|
||||
{}
|
||||
|
||||
void GetOpenNLUHighRecallResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Data"].isNull())
|
||||
data_ = value["Data"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetOpenNLUHighRecallResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
81
alinlp/src/model/GetOpenNLURequest.cc
Normal file
81
alinlp/src/model/GetOpenNLURequest.cc
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* 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/alinlp/model/GetOpenNLURequest.h>
|
||||
|
||||
using AlibabaCloud::Alinlp::Model::GetOpenNLURequest;
|
||||
|
||||
GetOpenNLURequest::GetOpenNLURequest()
|
||||
: RpcServiceRequest("alinlp", "2020-06-29", "GetOpenNLU") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetOpenNLURequest::~GetOpenNLURequest() {}
|
||||
|
||||
std::string GetOpenNLURequest::getSentence() const {
|
||||
return sentence_;
|
||||
}
|
||||
|
||||
void GetOpenNLURequest::setSentence(const std::string &sentence) {
|
||||
sentence_ = sentence;
|
||||
setBodyParameter(std::string("Sentence"), sentence);
|
||||
}
|
||||
|
||||
std::string GetOpenNLURequest::getBusiness() const {
|
||||
return business_;
|
||||
}
|
||||
|
||||
void GetOpenNLURequest::setBusiness(const std::string &business) {
|
||||
business_ = business;
|
||||
setParameter(std::string("Business"), business);
|
||||
}
|
||||
|
||||
std::string GetOpenNLURequest::getLabels() const {
|
||||
return labels_;
|
||||
}
|
||||
|
||||
void GetOpenNLURequest::setLabels(const std::string &labels) {
|
||||
labels_ = labels;
|
||||
setBodyParameter(std::string("Labels"), labels);
|
||||
}
|
||||
|
||||
std::string GetOpenNLURequest::getTask() const {
|
||||
return task_;
|
||||
}
|
||||
|
||||
void GetOpenNLURequest::setTask(const std::string &task) {
|
||||
task_ = task;
|
||||
setBodyParameter(std::string("Task"), task);
|
||||
}
|
||||
|
||||
std::string GetOpenNLURequest::getServiceCode() const {
|
||||
return serviceCode_;
|
||||
}
|
||||
|
||||
void GetOpenNLURequest::setServiceCode(const std::string &serviceCode) {
|
||||
serviceCode_ = serviceCode;
|
||||
setBodyParameter(std::string("ServiceCode"), serviceCode);
|
||||
}
|
||||
|
||||
std::string GetOpenNLURequest::getExamples() const {
|
||||
return examples_;
|
||||
}
|
||||
|
||||
void GetOpenNLURequest::setExamples(const std::string &examples) {
|
||||
examples_ = examples;
|
||||
setBodyParameter(std::string("Examples"), examples);
|
||||
}
|
||||
|
||||
51
alinlp/src/model/GetOpenNLUResult.cc
Normal file
51
alinlp/src/model/GetOpenNLUResult.cc
Normal 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/alinlp/model/GetOpenNLUResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Alinlp;
|
||||
using namespace AlibabaCloud::Alinlp::Model;
|
||||
|
||||
GetOpenNLUResult::GetOpenNLUResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetOpenNLUResult::GetOpenNLUResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetOpenNLUResult::~GetOpenNLUResult()
|
||||
{}
|
||||
|
||||
void GetOpenNLUResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Data"].isNull())
|
||||
data_ = value["Data"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetOpenNLUResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
45
alinlp/src/model/GetSSETestRequest.cc
Normal file
45
alinlp/src/model/GetSSETestRequest.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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/alinlp/model/GetSSETestRequest.h>
|
||||
|
||||
using AlibabaCloud::Alinlp::Model::GetSSETestRequest;
|
||||
|
||||
GetSSETestRequest::GetSSETestRequest()
|
||||
: RpcServiceRequest("alinlp", "2020-06-29", "GetSSETest") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetSSETestRequest::~GetSSETestRequest() {}
|
||||
|
||||
std::string GetSSETestRequest::getParams() const {
|
||||
return params_;
|
||||
}
|
||||
|
||||
void GetSSETestRequest::setParams(const std::string ¶ms) {
|
||||
params_ = params;
|
||||
setBodyParameter(std::string("Params"), params);
|
||||
}
|
||||
|
||||
std::string GetSSETestRequest::getServiceCode() const {
|
||||
return serviceCode_;
|
||||
}
|
||||
|
||||
void GetSSETestRequest::setServiceCode(const std::string &serviceCode) {
|
||||
serviceCode_ = serviceCode;
|
||||
setBodyParameter(std::string("ServiceCode"), serviceCode);
|
||||
}
|
||||
|
||||
51
alinlp/src/model/GetSSETestResult.cc
Normal file
51
alinlp/src/model/GetSSETestResult.cc
Normal 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/alinlp/model/GetSSETestResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Alinlp;
|
||||
using namespace AlibabaCloud::Alinlp::Model;
|
||||
|
||||
GetSSETestResult::GetSSETestResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetSSETestResult::GetSSETestResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetSSETestResult::~GetSSETestResult()
|
||||
{}
|
||||
|
||||
void GetSSETestResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Data"].isNull())
|
||||
data_ = value["Data"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetSSETestResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user