Add ManualRunMailTask, GetMailTaskStatus and GetWorksEmbedList apis.
This commit is contained in:
@@ -1203,6 +1203,42 @@ Quickbi_publicClient::DeleteUserTagMetaOutcomeCallable Quickbi_publicClient::del
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Quickbi_publicClient::GetMailTaskStatusOutcome Quickbi_publicClient::getMailTaskStatus(const GetMailTaskStatusRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetMailTaskStatusOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetMailTaskStatusOutcome(GetMailTaskStatusResult(outcome.result()));
|
||||
else
|
||||
return GetMailTaskStatusOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Quickbi_publicClient::getMailTaskStatusAsync(const GetMailTaskStatusRequest& request, const GetMailTaskStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getMailTaskStatus(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Quickbi_publicClient::GetMailTaskStatusOutcomeCallable Quickbi_publicClient::getMailTaskStatusCallable(const GetMailTaskStatusRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetMailTaskStatusOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getMailTaskStatus(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Quickbi_publicClient::GetUserGroupInfoOutcome Quickbi_publicClient::getUserGroupInfo(const GetUserGroupInfoRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1239,6 +1275,42 @@ Quickbi_publicClient::GetUserGroupInfoOutcomeCallable Quickbi_publicClient::getU
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Quickbi_publicClient::GetWorksEmbedListOutcome Quickbi_publicClient::getWorksEmbedList(const GetWorksEmbedListRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetWorksEmbedListOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetWorksEmbedListOutcome(GetWorksEmbedListResult(outcome.result()));
|
||||
else
|
||||
return GetWorksEmbedListOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Quickbi_publicClient::getWorksEmbedListAsync(const GetWorksEmbedListRequest& request, const GetWorksEmbedListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getWorksEmbedList(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Quickbi_publicClient::GetWorksEmbedListOutcomeCallable Quickbi_publicClient::getWorksEmbedListCallable(const GetWorksEmbedListRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetWorksEmbedListOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getWorksEmbedList(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Quickbi_publicClient::ListApiDatasourceOutcome Quickbi_publicClient::listApiDatasource(const ListApiDatasourceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1779,6 +1851,42 @@ Quickbi_publicClient::ListWorkspaceRolesOutcomeCallable Quickbi_publicClient::li
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Quickbi_publicClient::ManualRunMailTaskOutcome Quickbi_publicClient::manualRunMailTask(const ManualRunMailTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ManualRunMailTaskOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ManualRunMailTaskOutcome(ManualRunMailTaskResult(outcome.result()));
|
||||
else
|
||||
return ManualRunMailTaskOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Quickbi_publicClient::manualRunMailTaskAsync(const ManualRunMailTaskRequest& request, const ManualRunMailTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, manualRunMailTask(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Quickbi_publicClient::ManualRunMailTaskOutcomeCallable Quickbi_publicClient::manualRunMailTaskCallable(const ManualRunMailTaskRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ManualRunMailTaskOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->manualRunMailTask(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Quickbi_publicClient::ModifyApiDatasourceParametersOutcome Quickbi_publicClient::modifyApiDatasourceParameters(const ModifyApiDatasourceParametersRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
63
quickbi-public/src/model/GetMailTaskStatusRequest.cc
Normal file
63
quickbi-public/src/model/GetMailTaskStatusRequest.cc
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* 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/quickbi-public/model/GetMailTaskStatusRequest.h>
|
||||
|
||||
using AlibabaCloud::Quickbi_public::Model::GetMailTaskStatusRequest;
|
||||
|
||||
GetMailTaskStatusRequest::GetMailTaskStatusRequest()
|
||||
: RpcServiceRequest("quickbi-public", "2022-01-01", "GetMailTaskStatus") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetMailTaskStatusRequest::~GetMailTaskStatusRequest() {}
|
||||
|
||||
std::string GetMailTaskStatusRequest::getAccessPoint() const {
|
||||
return accessPoint_;
|
||||
}
|
||||
|
||||
void GetMailTaskStatusRequest::setAccessPoint(const std::string &accessPoint) {
|
||||
accessPoint_ = accessPoint;
|
||||
setParameter(std::string("AccessPoint"), accessPoint);
|
||||
}
|
||||
|
||||
std::string GetMailTaskStatusRequest::getSignType() const {
|
||||
return signType_;
|
||||
}
|
||||
|
||||
void GetMailTaskStatusRequest::setSignType(const std::string &signType) {
|
||||
signType_ = signType;
|
||||
setParameter(std::string("SignType"), signType);
|
||||
}
|
||||
|
||||
std::string GetMailTaskStatusRequest::getMailId() const {
|
||||
return mailId_;
|
||||
}
|
||||
|
||||
void GetMailTaskStatusRequest::setMailId(const std::string &mailId) {
|
||||
mailId_ = mailId;
|
||||
setParameter(std::string("MailId"), mailId);
|
||||
}
|
||||
|
||||
long GetMailTaskStatusRequest::getTaskId() const {
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
void GetMailTaskStatusRequest::setTaskId(long taskId) {
|
||||
taskId_ = taskId;
|
||||
setParameter(std::string("TaskId"), std::to_string(taskId));
|
||||
}
|
||||
|
||||
70
quickbi-public/src/model/GetMailTaskStatusResult.cc
Normal file
70
quickbi-public/src/model/GetMailTaskStatusResult.cc
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* 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/quickbi-public/model/GetMailTaskStatusResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Quickbi_public;
|
||||
using namespace AlibabaCloud::Quickbi_public::Model;
|
||||
|
||||
GetMailTaskStatusResult::GetMailTaskStatusResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetMailTaskStatusResult::GetMailTaskStatusResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetMailTaskStatusResult::~GetMailTaskStatusResult()
|
||||
{}
|
||||
|
||||
void GetMailTaskStatusResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allResultNode = value["Result"]["DATA"];
|
||||
for (auto valueResultDATA : allResultNode)
|
||||
{
|
||||
DATA resultObject;
|
||||
if(!valueResultDATA["execTime"].isNull())
|
||||
resultObject.execTime = valueResultDATA["execTime"].asString();
|
||||
if(!valueResultDATA["mailId"].isNull())
|
||||
resultObject.mailId = valueResultDATA["mailId"].asString();
|
||||
if(!valueResultDATA["status"].isNull())
|
||||
resultObject.status = valueResultDATA["status"].asString();
|
||||
if(!valueResultDATA["taskId"].isNull())
|
||||
resultObject.taskId = std::stol(valueResultDATA["taskId"].asString());
|
||||
result_.push_back(resultObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
bool GetMailTaskStatusResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
std::vector<GetMailTaskStatusResult::DATA> GetMailTaskStatusResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
90
quickbi-public/src/model/GetWorksEmbedListRequest.cc
Normal file
90
quickbi-public/src/model/GetWorksEmbedListRequest.cc
Normal file
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* 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/quickbi-public/model/GetWorksEmbedListRequest.h>
|
||||
|
||||
using AlibabaCloud::Quickbi_public::Model::GetWorksEmbedListRequest;
|
||||
|
||||
GetWorksEmbedListRequest::GetWorksEmbedListRequest()
|
||||
: RpcServiceRequest("quickbi-public", "2022-01-01", "GetWorksEmbedList") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetWorksEmbedListRequest::~GetWorksEmbedListRequest() {}
|
||||
|
||||
std::string GetWorksEmbedListRequest::getWsId() const {
|
||||
return wsId_;
|
||||
}
|
||||
|
||||
void GetWorksEmbedListRequest::setWsId(const std::string &wsId) {
|
||||
wsId_ = wsId;
|
||||
setParameter(std::string("WsId"), wsId);
|
||||
}
|
||||
|
||||
std::string GetWorksEmbedListRequest::getAccessPoint() const {
|
||||
return accessPoint_;
|
||||
}
|
||||
|
||||
void GetWorksEmbedListRequest::setAccessPoint(const std::string &accessPoint) {
|
||||
accessPoint_ = accessPoint;
|
||||
setParameter(std::string("AccessPoint"), accessPoint);
|
||||
}
|
||||
|
||||
int GetWorksEmbedListRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void GetWorksEmbedListRequest::setPageSize(int pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setParameter(std::string("PageSize"), std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string GetWorksEmbedListRequest::getKeyword() const {
|
||||
return keyword_;
|
||||
}
|
||||
|
||||
void GetWorksEmbedListRequest::setKeyword(const std::string &keyword) {
|
||||
keyword_ = keyword;
|
||||
setParameter(std::string("Keyword"), keyword);
|
||||
}
|
||||
|
||||
std::string GetWorksEmbedListRequest::getWorksType() const {
|
||||
return worksType_;
|
||||
}
|
||||
|
||||
void GetWorksEmbedListRequest::setWorksType(const std::string &worksType) {
|
||||
worksType_ = worksType;
|
||||
setParameter(std::string("WorksType"), worksType);
|
||||
}
|
||||
|
||||
std::string GetWorksEmbedListRequest::getSignType() const {
|
||||
return signType_;
|
||||
}
|
||||
|
||||
void GetWorksEmbedListRequest::setSignType(const std::string &signType) {
|
||||
signType_ = signType;
|
||||
setParameter(std::string("SignType"), signType);
|
||||
}
|
||||
|
||||
int GetWorksEmbedListRequest::getPageNo() const {
|
||||
return pageNo_;
|
||||
}
|
||||
|
||||
void GetWorksEmbedListRequest::setPageNo(int pageNo) {
|
||||
pageNo_ = pageNo;
|
||||
setParameter(std::string("PageNo"), std::to_string(pageNo));
|
||||
}
|
||||
|
||||
81
quickbi-public/src/model/GetWorksEmbedListResult.cc
Normal file
81
quickbi-public/src/model/GetWorksEmbedListResult.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/quickbi-public/model/GetWorksEmbedListResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Quickbi_public;
|
||||
using namespace AlibabaCloud::Quickbi_public::Model;
|
||||
|
||||
GetWorksEmbedListResult::GetWorksEmbedListResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetWorksEmbedListResult::GetWorksEmbedListResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetWorksEmbedListResult::~GetWorksEmbedListResult()
|
||||
{}
|
||||
|
||||
void GetWorksEmbedListResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resultNode = value["Result"];
|
||||
if(!resultNode["PageNo"].isNull())
|
||||
result_.pageNo = std::stol(resultNode["PageNo"].asString());
|
||||
if(!resultNode["PageSize"].isNull())
|
||||
result_.pageSize = std::stol(resultNode["PageSize"].asString());
|
||||
if(!resultNode["TotalNum"].isNull())
|
||||
result_.totalNum = std::stol(resultNode["TotalNum"].asString());
|
||||
if(!resultNode["TotalPages"].isNull())
|
||||
result_.totalPages = std::stol(resultNode["TotalPages"].asString());
|
||||
auto allDataNode = resultNode["Data"]["DataItem"];
|
||||
for (auto resultNodeDataDataItem : allDataNode)
|
||||
{
|
||||
Result::DataItem dataItemObject;
|
||||
if(!resultNodeDataDataItem["EmbedTime"].isNull())
|
||||
dataItemObject.embedTime = resultNodeDataDataItem["EmbedTime"].asString();
|
||||
if(!resultNodeDataDataItem["WorksId"].isNull())
|
||||
dataItemObject.worksId = resultNodeDataDataItem["WorksId"].asString();
|
||||
if(!resultNodeDataDataItem["WorksName"].isNull())
|
||||
dataItemObject.worksName = resultNodeDataDataItem["WorksName"].asString();
|
||||
if(!resultNodeDataDataItem["WorksType"].isNull())
|
||||
dataItemObject.worksType = resultNodeDataDataItem["WorksType"].asString();
|
||||
if(!resultNodeDataDataItem["WorkspaceId"].isNull())
|
||||
dataItemObject.workspaceId = resultNodeDataDataItem["WorkspaceId"].asString();
|
||||
result_.data.push_back(dataItemObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
bool GetWorksEmbedListResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
GetWorksEmbedListResult::Result GetWorksEmbedListResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
54
quickbi-public/src/model/ManualRunMailTaskRequest.cc
Normal file
54
quickbi-public/src/model/ManualRunMailTaskRequest.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/quickbi-public/model/ManualRunMailTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::Quickbi_public::Model::ManualRunMailTaskRequest;
|
||||
|
||||
ManualRunMailTaskRequest::ManualRunMailTaskRequest()
|
||||
: RpcServiceRequest("quickbi-public", "2022-01-01", "ManualRunMailTask") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ManualRunMailTaskRequest::~ManualRunMailTaskRequest() {}
|
||||
|
||||
std::string ManualRunMailTaskRequest::getAccessPoint() const {
|
||||
return accessPoint_;
|
||||
}
|
||||
|
||||
void ManualRunMailTaskRequest::setAccessPoint(const std::string &accessPoint) {
|
||||
accessPoint_ = accessPoint;
|
||||
setParameter(std::string("AccessPoint"), accessPoint);
|
||||
}
|
||||
|
||||
std::string ManualRunMailTaskRequest::getSignType() const {
|
||||
return signType_;
|
||||
}
|
||||
|
||||
void ManualRunMailTaskRequest::setSignType(const std::string &signType) {
|
||||
signType_ = signType;
|
||||
setParameter(std::string("SignType"), signType);
|
||||
}
|
||||
|
||||
std::string ManualRunMailTaskRequest::getMailId() const {
|
||||
return mailId_;
|
||||
}
|
||||
|
||||
void ManualRunMailTaskRequest::setMailId(const std::string &mailId) {
|
||||
mailId_ = mailId;
|
||||
setParameter(std::string("MailId"), mailId);
|
||||
}
|
||||
|
||||
58
quickbi-public/src/model/ManualRunMailTaskResult.cc
Normal file
58
quickbi-public/src/model/ManualRunMailTaskResult.cc
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* 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/quickbi-public/model/ManualRunMailTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Quickbi_public;
|
||||
using namespace AlibabaCloud::Quickbi_public::Model;
|
||||
|
||||
ManualRunMailTaskResult::ManualRunMailTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ManualRunMailTaskResult::ManualRunMailTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ManualRunMailTaskResult::~ManualRunMailTaskResult()
|
||||
{}
|
||||
|
||||
void ManualRunMailTaskResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Result"].isNull())
|
||||
result_ = value["Result"].asString() == "true";
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
bool ManualRunMailTaskResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
bool ManualRunMailTaskResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user