Add Content.
This commit is contained in:
@@ -123,78 +123,6 @@ Industry_brainClient::GetAlgorithmHistoryResultOutcomeCallable Industry_brainCli
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Industry_brainClient::GetPointReckoningValueOutcome Industry_brainClient::getPointReckoningValue(const GetPointReckoningValueRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetPointReckoningValueOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetPointReckoningValueOutcome(GetPointReckoningValueResult(outcome.result()));
|
||||
else
|
||||
return GetPointReckoningValueOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Industry_brainClient::getPointReckoningValueAsync(const GetPointReckoningValueRequest& request, const GetPointReckoningValueAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getPointReckoningValue(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Industry_brainClient::GetPointReckoningValueOutcomeCallable Industry_brainClient::getPointReckoningValueCallable(const GetPointReckoningValueRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetPointReckoningValueOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getPointReckoningValue(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Industry_brainClient::GetPointSampleValueOutcome Industry_brainClient::getPointSampleValue(const GetPointSampleValueRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetPointSampleValueOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetPointSampleValueOutcome(GetPointSampleValueResult(outcome.result()));
|
||||
else
|
||||
return GetPointSampleValueOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Industry_brainClient::getPointSampleValueAsync(const GetPointSampleValueRequest& request, const GetPointSampleValueAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getPointSampleValue(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Industry_brainClient::GetPointSampleValueOutcomeCallable Industry_brainClient::getPointSampleValueCallable(const GetPointSampleValueRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetPointSampleValueOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getPointSampleValue(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Industry_brainClient::GetServiceResultAsyncOutcome Industry_brainClient::getServiceResultAsync(const GetServiceResultAsyncRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
using AlibabaCloud::Industry_brain::Model::AsyncResponsePostRequest;
|
||||
|
||||
AsyncResponsePostRequest::AsyncResponsePostRequest() :
|
||||
RpcServiceRequest("industry-brain", "2019-06-30", "AsyncResponsePost")
|
||||
RpcServiceRequest("industry-brain", "2019-06-29", "AsyncResponsePost")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
using AlibabaCloud::Industry_brain::Model::GetAlgorithmHistoryResultRequest;
|
||||
|
||||
GetAlgorithmHistoryResultRequest::GetAlgorithmHistoryResultRequest() :
|
||||
RpcServiceRequest("industry-brain", "2019-06-30", "GetAlgorithmHistoryResult")
|
||||
RpcServiceRequest("industry-brain", "2019-06-29", "GetAlgorithmHistoryResult")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* 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/industry-brain/model/GetPointReckoningValueRequest.h>
|
||||
|
||||
using AlibabaCloud::Industry_brain::Model::GetPointReckoningValueRequest;
|
||||
|
||||
GetPointReckoningValueRequest::GetPointReckoningValueRequest() :
|
||||
RpcServiceRequest("industry-brain", "2019-06-30", "GetPointReckoningValue")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetPointReckoningValueRequest::~GetPointReckoningValueRequest()
|
||||
{}
|
||||
|
||||
std::string GetPointReckoningValueRequest::getTimeType()const
|
||||
{
|
||||
return timeType_;
|
||||
}
|
||||
|
||||
void GetPointReckoningValueRequest::setTimeType(const std::string& timeType)
|
||||
{
|
||||
timeType_ = timeType;
|
||||
setParameter("TimeType", timeType);
|
||||
}
|
||||
|
||||
std::string GetPointReckoningValueRequest::getTemplateId()const
|
||||
{
|
||||
return templateId_;
|
||||
}
|
||||
|
||||
void GetPointReckoningValueRequest::setTemplateId(const std::string& templateId)
|
||||
{
|
||||
templateId_ = templateId;
|
||||
setParameter("TemplateId", templateId);
|
||||
}
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
/*
|
||||
* 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/industry-brain/model/GetPointReckoningValueResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Industry_brain;
|
||||
using namespace AlibabaCloud::Industry_brain::Model;
|
||||
|
||||
GetPointReckoningValueResult::GetPointReckoningValueResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetPointReckoningValueResult::GetPointReckoningValueResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetPointReckoningValueResult::~GetPointReckoningValueResult()
|
||||
{}
|
||||
|
||||
void GetPointReckoningValueResult::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();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetPointReckoningValueResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string GetPointReckoningValueResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string GetPointReckoningValueResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* 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/industry-brain/model/GetPointSampleValueRequest.h>
|
||||
|
||||
using AlibabaCloud::Industry_brain::Model::GetPointSampleValueRequest;
|
||||
|
||||
GetPointSampleValueRequest::GetPointSampleValueRequest() :
|
||||
RpcServiceRequest("industry-brain", "2019-06-30", "GetPointSampleValue")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetPointSampleValueRequest::~GetPointSampleValueRequest()
|
||||
{}
|
||||
|
||||
std::string GetPointSampleValueRequest::getTimeType()const
|
||||
{
|
||||
return timeType_;
|
||||
}
|
||||
|
||||
void GetPointSampleValueRequest::setTimeType(const std::string& timeType)
|
||||
{
|
||||
timeType_ = timeType;
|
||||
setParameter("TimeType", timeType);
|
||||
}
|
||||
|
||||
std::string GetPointSampleValueRequest::getTemplateId()const
|
||||
{
|
||||
return templateId_;
|
||||
}
|
||||
|
||||
void GetPointSampleValueRequest::setTemplateId(const std::string& templateId)
|
||||
{
|
||||
templateId_ = templateId;
|
||||
setParameter("TemplateId", templateId);
|
||||
}
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
/*
|
||||
* 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/industry-brain/model/GetPointSampleValueResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Industry_brain;
|
||||
using namespace AlibabaCloud::Industry_brain::Model;
|
||||
|
||||
GetPointSampleValueResult::GetPointSampleValueResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetPointSampleValueResult::GetPointSampleValueResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetPointSampleValueResult::~GetPointSampleValueResult()
|
||||
{}
|
||||
|
||||
void GetPointSampleValueResult::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();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetPointSampleValueResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string GetPointSampleValueResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string GetPointSampleValueResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
using AlibabaCloud::Industry_brain::Model::GetServiceResultAsyncRequest;
|
||||
|
||||
GetServiceResultAsyncRequest::GetServiceResultAsyncRequest() :
|
||||
RpcServiceRequest("industry-brain", "2019-06-30", "GetServiceResultAsync")
|
||||
RpcServiceRequest("industry-brain", "2019-06-29", "GetServiceResultAsync")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetServiceResultAsyncRequest::~GetServiceResultAsyncRequest()
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
using AlibabaCloud::Industry_brain::Model::InvokeServiceAsyncRequest;
|
||||
|
||||
InvokeServiceAsyncRequest::InvokeServiceAsyncRequest() :
|
||||
RpcServiceRequest("industry-brain", "2019-06-30", "InvokeServiceAsync")
|
||||
RpcServiceRequest("industry-brain", "2019-06-29", "InvokeServiceAsync")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
@@ -38,17 +38,6 @@ void InvokeServiceAsyncRequest::setIsShowInput(bool isShowInput)
|
||||
setParameter("IsShowInput", isShowInput ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string InvokeServiceAsyncRequest::getContext()const
|
||||
{
|
||||
return context_;
|
||||
}
|
||||
|
||||
void InvokeServiceAsyncRequest::setContext(const std::string& context)
|
||||
{
|
||||
context_ = context;
|
||||
setParameter("Context", context);
|
||||
}
|
||||
|
||||
std::string InvokeServiceAsyncRequest::getServiceId()const
|
||||
{
|
||||
return serviceId_;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
using AlibabaCloud::Industry_brain::Model::InvokeServiceRequest;
|
||||
|
||||
InvokeServiceRequest::InvokeServiceRequest() :
|
||||
RpcServiceRequest("industry-brain", "2019-06-30", "InvokeService")
|
||||
RpcServiceRequest("industry-brain", "2019-06-29", "InvokeService")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
@@ -45,9 +45,16 @@ void InvokeServiceResult::parse(const std::string &payload)
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Context"].isNull())
|
||||
context_ = value["Context"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string InvokeServiceResult::getContext()const
|
||||
{
|
||||
return context_;
|
||||
}
|
||||
|
||||
std::string InvokeServiceResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
|
||||
Reference in New Issue
Block a user