New API Version of Work Order System.

This commit is contained in:
sdk-team
2021-06-05 11:41:48 +00:00
parent 77822cfe63
commit 4ee03ced70
36 changed files with 533 additions and 465 deletions

View File

@@ -1,3 +1,6 @@
2021-06-05 Version: 1.36.768
- New API Version of Work Order System.
2021-06-04 Version: 1.36.767
- Add Emon-Service support.
- Remove Deprecated Interfaces.

View File

@@ -1 +1 @@
1.36.767
1.36.768

View File

@@ -25,6 +25,8 @@ set(workorder_public_header_model
include/alibabacloud/workorder/model/CloseTicketResult.h
include/alibabacloud/workorder/model/CreateTicketRequest.h
include/alibabacloud/workorder/model/CreateTicketResult.h
include/alibabacloud/workorder/model/GetMessageTagRequest.h
include/alibabacloud/workorder/model/GetMessageTagResult.h
include/alibabacloud/workorder/model/ListCategoriesRequest.h
include/alibabacloud/workorder/model/ListCategoriesResult.h
include/alibabacloud/workorder/model/ListProductsRequest.h
@@ -42,6 +44,8 @@ set(workorder_src
src/model/CloseTicketResult.cc
src/model/CreateTicketRequest.cc
src/model/CreateTicketResult.cc
src/model/GetMessageTagRequest.cc
src/model/GetMessageTagResult.cc
src/model/ListCategoriesRequest.cc
src/model/ListCategoriesResult.cc
src/model/ListProductsRequest.cc

View File

@@ -26,6 +26,8 @@
#include "model/CloseTicketResult.h"
#include "model/CreateTicketRequest.h"
#include "model/CreateTicketResult.h"
#include "model/GetMessageTagRequest.h"
#include "model/GetMessageTagResult.h"
#include "model/ListCategoriesRequest.h"
#include "model/ListCategoriesResult.h"
#include "model/ListProductsRequest.h"
@@ -51,6 +53,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::CreateTicketResult> CreateTicketOutcome;
typedef std::future<CreateTicketOutcome> CreateTicketOutcomeCallable;
typedef std::function<void(const WorkorderClient*, const Model::CreateTicketRequest&, const CreateTicketOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateTicketAsyncHandler;
typedef Outcome<Error, Model::GetMessageTagResult> GetMessageTagOutcome;
typedef std::future<GetMessageTagOutcome> GetMessageTagOutcomeCallable;
typedef std::function<void(const WorkorderClient*, const Model::GetMessageTagRequest&, const GetMessageTagOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetMessageTagAsyncHandler;
typedef Outcome<Error, Model::ListCategoriesResult> ListCategoriesOutcome;
typedef std::future<ListCategoriesOutcome> ListCategoriesOutcomeCallable;
typedef std::function<void(const WorkorderClient*, const Model::ListCategoriesRequest&, const ListCategoriesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListCategoriesAsyncHandler;
@@ -77,6 +82,9 @@ namespace AlibabaCloud
CreateTicketOutcome createTicket(const Model::CreateTicketRequest &request)const;
void createTicketAsync(const Model::CreateTicketRequest& request, const CreateTicketAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateTicketOutcomeCallable createTicketCallable(const Model::CreateTicketRequest& request) const;
GetMessageTagOutcome getMessageTag(const Model::GetMessageTagRequest &request)const;
void getMessageTagAsync(const Model::GetMessageTagRequest& request, const GetMessageTagAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetMessageTagOutcomeCallable getMessageTagCallable(const Model::GetMessageTagRequest& request) const;
ListCategoriesOutcome listCategories(const Model::ListCategoriesRequest &request)const;
void listCategoriesAsync(const Model::ListCategoriesRequest& request, const ListCategoriesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListCategoriesOutcomeCallable listCategoriesCallable(const Model::ListCategoriesRequest& request) const;

View File

@@ -35,13 +35,10 @@ namespace AlibabaCloud
CloseTicketRequest();
~CloseTicketRequest();
std::string getLanguage()const;
void setLanguage(const std::string& language);
std::string getTicketId()const;
void setTicketId(const std::string& ticketId);
private:
std::string language_;
std::string ticketId_;
};

View File

@@ -35,35 +35,17 @@ namespace AlibabaCloud
CreateTicketRequest();
~CreateTicketRequest();
std::string getProductCode()const;
void setProductCode(const std::string& productCode);
std::string getLanguage()const;
void setLanguage(const std::string& language);
std::string getTitle()const;
void setTitle(const std::string& title);
std::string getContent()const;
void setContent(const std::string& content);
std::string getNotifyTimeRange()const;
void setNotifyTimeRange(const std::string& notifyTimeRange);
std::string getPhone()const;
void setPhone(const std::string& phone);
std::string getCategory()const;
void setCategory(const std::string& category);
std::string getEmail()const;
void setEmail(const std::string& email);
std::string getSecretContent()const;
void setSecretContent(const std::string& secretContent);
int getSeverity()const;
void setSeverity(int severity);
std::string getDescription()const;
void setDescription(const std::string& description);
std::string getCategoryId()const;
void setCategoryId(const std::string& categoryId);
private:
std::string productCode_;
std::string language_;
std::string title_;
std::string content_;
std::string notifyTimeRange_;
std::string phone_;
std::string category_;
std::string email_;
std::string secretContent_;
int severity_;
std::string description_;
std::string categoryId_;
};
}

View File

@@ -39,7 +39,7 @@ namespace AlibabaCloud
~CreateTicketResult();
std::string getMessage()const;
std::string getData()const;
std::string getCode()const;
int getCode()const;
bool getSuccess()const;
protected:
@@ -47,7 +47,7 @@ namespace AlibabaCloud
private:
std::string message_;
std::string data_;
std::string code_;
int code_;
bool success_;
};

View 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.
*/
#ifndef ALIBABACLOUD_WORKORDER_MODEL_GETMESSAGETAGREQUEST_H_
#define ALIBABACLOUD_WORKORDER_MODEL_GETMESSAGETAGREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/workorder/WorkorderExport.h>
namespace AlibabaCloud
{
namespace Workorder
{
namespace Model
{
class ALIBABACLOUD_WORKORDER_EXPORT GetMessageTagRequest : public RpcServiceRequest
{
public:
GetMessageTagRequest();
~GetMessageTagRequest();
private:
};
}
}
}
#endif // !ALIBABACLOUD_WORKORDER_MODEL_GETMESSAGETAGREQUEST_H_

View File

@@ -0,0 +1,57 @@
/*
* 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.
*/
#ifndef ALIBABACLOUD_WORKORDER_MODEL_GETMESSAGETAGRESULT_H_
#define ALIBABACLOUD_WORKORDER_MODEL_GETMESSAGETAGRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/workorder/WorkorderExport.h>
namespace AlibabaCloud
{
namespace Workorder
{
namespace Model
{
class ALIBABACLOUD_WORKORDER_EXPORT GetMessageTagResult : public ServiceResult
{
public:
GetMessageTagResult();
explicit GetMessageTagResult(const std::string &payload);
~GetMessageTagResult();
std::string getMessage()const;
std::string getData()const;
int getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::string data_;
int code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_WORKORDER_MODEL_GETMESSAGETAGRESULT_H_

View File

@@ -35,14 +35,11 @@ namespace AlibabaCloud
ListCategoriesRequest();
~ListCategoriesRequest();
std::string getProductCode()const;
void setProductCode(const std::string& productCode);
std::string getLanguage()const;
void setLanguage(const std::string& language);
long getParentId()const;
void setParentId(long parentId);
private:
std::string productCode_;
std::string language_;
long parentId_;
};
}

View File

@@ -32,14 +32,10 @@ namespace AlibabaCloud
class ALIBABACLOUD_WORKORDER_EXPORT ListCategoriesResult : public ServiceResult
{
public:
struct Data
struct DataItem
{
struct ListItem
{
int id;
std::string name;
};
std::vector<ListItem> list;
long categoryId;
std::string categoryName;
};
@@ -47,7 +43,7 @@ namespace AlibabaCloud
explicit ListCategoriesResult(const std::string &payload);
~ListCategoriesResult();
std::string getMessage()const;
Data getData()const;
std::vector<DataItem> getData()const;
int getCode()const;
bool getSuccess()const;
@@ -55,7 +51,7 @@ namespace AlibabaCloud
void parse(const std::string &payload);
private:
std::string message_;
Data data_;
std::vector<DataItem> data_;
int code_;
bool success_;

View File

@@ -35,11 +35,11 @@ namespace AlibabaCloud
ListProductsRequest();
~ListProductsRequest();
std::string getLanguage()const;
void setLanguage(const std::string& language);
std::string getName()const;
void setName(const std::string& name);
private:
std::string language_;
std::string name_;
};
}

View File

@@ -32,41 +32,17 @@ namespace AlibabaCloud
class ALIBABACLOUD_WORKORDER_EXPORT ListProductsResult : public ServiceResult
{
public:
struct Data
struct DataItem
{
struct TechMoreItem
struct RootsItem
{
struct ProductListItem
{
std::string description;
std::string productCode;
std::string name;
};
std::vector<TechMoreItem::ProductListItem> productList;
std::string groupName;
long categoryId;
std::string categoryName;
};
struct HotConsultationItem
{
std::string description;
std::string productCode;
std::string name;
};
struct ConsultationMoreItem
{
std::string description;
std::string productCode;
std::string name;
};
struct HotTechItem
{
std::string description;
std::string productCode;
std::string name;
};
std::vector<ConsultationMoreItem> consultationMore;
std::vector<HotTechItem> hotTech;
std::vector<HotConsultationItem> hotConsultation;
std::vector<TechMoreItem> techMore;
std::string topCategoryName;
long topCategoryId;
std::vector<DataItem::RootsItem> roots;
int orderNumber;
};
@@ -74,7 +50,7 @@ namespace AlibabaCloud
explicit ListProductsResult(const std::string &payload);
~ListProductsResult();
std::string getMessage()const;
Data getData()const;
std::vector<DataItem> getData()const;
int getCode()const;
bool getSuccess()const;
@@ -82,7 +58,7 @@ namespace AlibabaCloud
void parse(const std::string &payload);
private:
std::string message_;
Data data_;
std::vector<DataItem> data_;
int code_;
bool success_;

View File

@@ -35,13 +35,10 @@ namespace AlibabaCloud
ListTicketNotesRequest();
~ListTicketNotesRequest();
std::string getLanguage()const;
void setLanguage(const std::string& language);
std::string getTicketId()const;
void setTicketId(const std::string& ticketId);
private:
std::string language_;
std::string ticketId_;
};

View File

@@ -32,16 +32,25 @@ namespace AlibabaCloud
class ALIBABACLOUD_WORKORDER_EXPORT ListTicketNotesResult : public ServiceResult
{
public:
struct Data
struct DataItem
{
struct ListItem
struct DataInfo
{
std::string noteId;
bool fromOfficial;
std::string content;
int gmtCreated;
std::string schema;
};
std::vector<ListItem> list;
struct UserInfo
{
int role;
std::string userName;
};
DataInfo dataInfo;
int status;
int type;
long createTime;
long dialogId;
UserInfo userInfo;
std::string tip;
};
@@ -49,7 +58,7 @@ namespace AlibabaCloud
explicit ListTicketNotesResult(const std::string &payload);
~ListTicketNotesResult();
std::string getMessage()const;
Data getData()const;
std::vector<DataItem> getData()const;
int getCode()const;
bool getSuccess()const;
@@ -57,7 +66,7 @@ namespace AlibabaCloud
void parse(const std::string &payload);
private:
std::string message_;
Data data_;
std::vector<DataItem> data_;
int code_;
bool success_;

View File

@@ -35,35 +35,29 @@ namespace AlibabaCloud
ListTicketsRequest();
~ListTicketsRequest();
std::string getProductCode()const;
void setProductCode(const std::string& productCode);
std::string getLanguage()const;
void setLanguage(const std::string& language);
std::string getSubUserId()const;
void setSubUserId(const std::string& subUserId);
long getCreatedBeforeTime()const;
void setCreatedBeforeTime(long createdBeforeTime);
long getBeginDate()const;
void setBeginDate(long beginDate);
std::vector<std::string> getStatusList()const;
void setStatusList(const std::vector<std::string>& statusList);
int getPageNumber()const;
void setPageNumber(int pageNumber);
long getEndDate()const;
void setEndDate(long endDate);
int getPageSize()const;
void setPageSize(int pageSize);
std::string getIds()const;
void setIds(const std::string& ids);
std::string getTicketStatus()const;
void setTicketStatus(const std::string& ticketStatus);
int getPageStart()const;
void setPageStart(int pageStart);
long getCreatedAfterTime()const;
void setCreatedAfterTime(long createdAfterTime);
std::string getKeyword()const;
void setKeyword(const std::string& keyword);
std::string getTicketId()const;
void setTicketId(const std::string& ticketId);
private:
std::string productCode_;
std::string language_;
std::string subUserId_;
long createdBeforeTime_;
long beginDate_;
std::vector<std::string> statusList_;
int pageNumber_;
long endDate_;
int pageSize_;
std::string ids_;
std::string ticketStatus_;
int pageStart_;
long createdAfterTime_;
std::string keyword_;
std::string ticketId_;
};
}

View File

@@ -32,36 +32,38 @@ namespace AlibabaCloud
class ALIBABACLOUD_WORKORDER_EXPORT ListTicketsResult : public ServiceResult
{
public:
struct Data
struct DataItem
{
struct ListItem
struct Status
{
std::string creatorId;
std::string title;
std::string ticketStatus;
std::string id;
int addTime;
std::string label;
std::string value;
};
int pageSize;
int currentPage;
int total;
std::vector<ListItem> list;
Status status;
std::string ticketId;
std::string title;
};
ListTicketsResult();
explicit ListTicketsResult(const std::string &payload);
~ListTicketsResult();
long getTotalCount()const;
std::string getMessage()const;
Data getData()const;
int getPageSize()const;
int getPageNumber()const;
std::vector<DataItem> getData()const;
int getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
long totalCount_;
std::string message_;
Data data_;
int pageSize_;
int pageNumber_;
std::vector<DataItem> data_;
int code_;
bool success_;

View File

@@ -35,20 +35,17 @@ namespace AlibabaCloud
ReplyTicketRequest();
~ReplyTicketRequest();
std::string getLanguage()const;
void setLanguage(const std::string& language);
std::string getTicketId()const;
void setTicketId(const std::string& ticketId);
std::string getSecContent()const;
void setSecContent(const std::string& secContent);
std::string getContent()const;
void setContent(const std::string& content);
std::string getSecretContent()const;
void setSecretContent(const std::string& secretContent);
std::string getTicketId()const;
void setTicketId(const std::string& ticketId);
private:
std::string language_;
std::string ticketId_;
std::string secContent_;
std::string content_;
std::string secretContent_;
std::string ticketId_;
};
}

View File

@@ -38,6 +38,7 @@ namespace AlibabaCloud
explicit ReplyTicketResult(const std::string &payload);
~ReplyTicketResult();
std::string getMessage()const;
std::string getData()const;
int getCode()const;
bool getSuccess()const;
@@ -45,6 +46,7 @@ namespace AlibabaCloud
void parse(const std::string &payload);
private:
std::string message_;
std::string data_;
int code_;
bool success_;

View File

@@ -31,21 +31,21 @@ WorkorderClient::WorkorderClient(const Credentials &credentials, const ClientCon
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "workorder");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
WorkorderClient::WorkorderClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "workorder");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
WorkorderClient::WorkorderClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "workorder");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
WorkorderClient::~WorkorderClient()
@@ -123,6 +123,42 @@ WorkorderClient::CreateTicketOutcomeCallable WorkorderClient::createTicketCallab
return task->get_future();
}
WorkorderClient::GetMessageTagOutcome WorkorderClient::getMessageTag(const GetMessageTagRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetMessageTagOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetMessageTagOutcome(GetMessageTagResult(outcome.result()));
else
return GetMessageTagOutcome(outcome.error());
}
void WorkorderClient::getMessageTagAsync(const GetMessageTagRequest& request, const GetMessageTagAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getMessageTag(request), context);
};
asyncExecute(new Runnable(fn));
}
WorkorderClient::GetMessageTagOutcomeCallable WorkorderClient::getMessageTagCallable(const GetMessageTagRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetMessageTagOutcome()>>(
[this, request]()
{
return this->getMessageTag(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
WorkorderClient::ListCategoriesOutcome WorkorderClient::listCategories(const ListCategoriesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Workorder::Model::CloseTicketRequest;
CloseTicketRequest::CloseTicketRequest() :
RpcServiceRequest("workorder", "2020-03-26", "CloseTicket")
RpcServiceRequest("workorder", "2021-05-10", "CloseTicket")
{
setMethod(HttpRequest::Method::Post);
}
@@ -27,17 +27,6 @@ CloseTicketRequest::CloseTicketRequest() :
CloseTicketRequest::~CloseTicketRequest()
{}
std::string CloseTicketRequest::getLanguage()const
{
return language_;
}
void CloseTicketRequest::setLanguage(const std::string& language)
{
language_ = language;
setParameter("Language", language);
}
std::string CloseTicketRequest::getTicketId()const
{
return ticketId_;
@@ -46,6 +35,6 @@ std::string CloseTicketRequest::getTicketId()const
void CloseTicketRequest::setTicketId(const std::string& ticketId)
{
ticketId_ = ticketId;
setParameter("TicketId", ticketId);
setBodyParameter("TicketId", ticketId);
}

View File

@@ -41,10 +41,10 @@ void CloseTicketResult::parse(const std::string &payload)
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Workorder::Model::CreateTicketRequest;
CreateTicketRequest::CreateTicketRequest() :
RpcServiceRequest("workorder", "2020-03-26", "CreateTicket")
RpcServiceRequest("workorder", "2021-05-10", "CreateTicket")
{
setMethod(HttpRequest::Method::Post);
}
@@ -27,102 +27,36 @@ CreateTicketRequest::CreateTicketRequest() :
CreateTicketRequest::~CreateTicketRequest()
{}
std::string CreateTicketRequest::getProductCode()const
int CreateTicketRequest::getSeverity()const
{
return productCode_;
return severity_;
}
void CreateTicketRequest::setProductCode(const std::string& productCode)
void CreateTicketRequest::setSeverity(int severity)
{
productCode_ = productCode;
setParameter("ProductCode", productCode);
severity_ = severity;
setBodyParameter("Severity", std::to_string(severity));
}
std::string CreateTicketRequest::getLanguage()const
std::string CreateTicketRequest::getDescription()const
{
return language_;
return description_;
}
void CreateTicketRequest::setLanguage(const std::string& language)
void CreateTicketRequest::setDescription(const std::string& description)
{
language_ = language;
setParameter("Language", language);
description_ = description;
setBodyParameter("Description", description);
}
std::string CreateTicketRequest::getTitle()const
std::string CreateTicketRequest::getCategoryId()const
{
return title_;
return categoryId_;
}
void CreateTicketRequest::setTitle(const std::string& title)
void CreateTicketRequest::setCategoryId(const std::string& categoryId)
{
title_ = title;
setParameter("Title", title);
}
std::string CreateTicketRequest::getContent()const
{
return content_;
}
void CreateTicketRequest::setContent(const std::string& content)
{
content_ = content;
setParameter("Content", content);
}
std::string CreateTicketRequest::getNotifyTimeRange()const
{
return notifyTimeRange_;
}
void CreateTicketRequest::setNotifyTimeRange(const std::string& notifyTimeRange)
{
notifyTimeRange_ = notifyTimeRange;
setParameter("NotifyTimeRange", notifyTimeRange);
}
std::string CreateTicketRequest::getPhone()const
{
return phone_;
}
void CreateTicketRequest::setPhone(const std::string& phone)
{
phone_ = phone;
setParameter("Phone", phone);
}
std::string CreateTicketRequest::getCategory()const
{
return category_;
}
void CreateTicketRequest::setCategory(const std::string& category)
{
category_ = category;
setParameter("Category", category);
}
std::string CreateTicketRequest::getEmail()const
{
return email_;
}
void CreateTicketRequest::setEmail(const std::string& email)
{
email_ = email;
setParameter("Email", email);
}
std::string CreateTicketRequest::getSecretContent()const
{
return secretContent_;
}
void CreateTicketRequest::setSecretContent(const std::string& secretContent)
{
secretContent_ = secretContent;
setParameter("SecretContent", secretContent);
categoryId_ = categoryId;
setBodyParameter("CategoryId", categoryId);
}

View File

@@ -40,13 +40,13 @@ void CreateTicketResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
code_ = std::stoi(value["Code"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Data"].isNull())
data_ = value["Data"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
@@ -60,7 +60,7 @@ std::string CreateTicketResult::getData()const
return data_;
}
std::string CreateTicketResult::getCode()const
int CreateTicketResult::getCode()const
{
return code_;
}

View File

@@ -0,0 +1,29 @@
/*
* 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/workorder/model/GetMessageTagRequest.h>
using AlibabaCloud::Workorder::Model::GetMessageTagRequest;
GetMessageTagRequest::GetMessageTagRequest() :
RpcServiceRequest("workorder", "2021-05-10", "GetMessageTag")
{
setMethod(HttpRequest::Method::Post);
}
GetMessageTagRequest::~GetMessageTagRequest()
{}

View File

@@ -0,0 +1,72 @@
/*
* 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/workorder/model/GetMessageTagResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Workorder;
using namespace AlibabaCloud::Workorder::Model;
GetMessageTagResult::GetMessageTagResult() :
ServiceResult()
{}
GetMessageTagResult::GetMessageTagResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetMessageTagResult::~GetMessageTagResult()
{}
void GetMessageTagResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Data"].isNull())
data_ = value["Data"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string GetMessageTagResult::getMessage()const
{
return message_;
}
std::string GetMessageTagResult::getData()const
{
return data_;
}
int GetMessageTagResult::getCode()const
{
return code_;
}
bool GetMessageTagResult::getSuccess()const
{
return success_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Workorder::Model::ListCategoriesRequest;
ListCategoriesRequest::ListCategoriesRequest() :
RpcServiceRequest("workorder", "2020-03-26", "ListCategories")
RpcServiceRequest("workorder", "2021-05-10", "ListCategories")
{
setMethod(HttpRequest::Method::Post);
}
@@ -27,25 +27,14 @@ ListCategoriesRequest::ListCategoriesRequest() :
ListCategoriesRequest::~ListCategoriesRequest()
{}
std::string ListCategoriesRequest::getProductCode()const
long ListCategoriesRequest::getParentId()const
{
return productCode_;
return parentId_;
}
void ListCategoriesRequest::setProductCode(const std::string& productCode)
void ListCategoriesRequest::setParentId(long parentId)
{
productCode_ = productCode;
setParameter("ProductCode", productCode);
}
std::string ListCategoriesRequest::getLanguage()const
{
return language_;
}
void ListCategoriesRequest::setLanguage(const std::string& language)
{
language_ = language;
setParameter("Language", language);
parentId_ = parentId;
setParameter("ParentId", std::to_string(parentId));
}

View File

@@ -39,16 +39,15 @@ void ListCategoriesResult::parse(const std::string &payload)
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allListNode = dataNode["List"]["ListItem"];
for (auto dataNodeListListItem : allListNode)
auto allDataNode = value["Data"]["DataItem"];
for (auto valueDataDataItem : allDataNode)
{
Data::ListItem listItemObject;
if(!dataNodeListListItem["Id"].isNull())
listItemObject.id = std::stoi(dataNodeListListItem["Id"].asString());
if(!dataNodeListListItem["Name"].isNull())
listItemObject.name = dataNodeListListItem["Name"].asString();
data_.list.push_back(listItemObject);
DataItem dataObject;
if(!valueDataDataItem["CategoryName"].isNull())
dataObject.categoryName = valueDataDataItem["CategoryName"].asString();
if(!valueDataDataItem["CategoryId"].isNull())
dataObject.categoryId = std::stol(valueDataDataItem["CategoryId"].asString());
data_.push_back(dataObject);
}
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
@@ -64,7 +63,7 @@ std::string ListCategoriesResult::getMessage()const
return message_;
}
ListCategoriesResult::Data ListCategoriesResult::getData()const
std::vector<ListCategoriesResult::DataItem> ListCategoriesResult::getData()const
{
return data_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Workorder::Model::ListProductsRequest;
ListProductsRequest::ListProductsRequest() :
RpcServiceRequest("workorder", "2020-03-26", "ListProducts")
RpcServiceRequest("workorder", "2021-05-10", "ListProducts")
{
setMethod(HttpRequest::Method::Post);
}
@@ -27,14 +27,14 @@ ListProductsRequest::ListProductsRequest() :
ListProductsRequest::~ListProductsRequest()
{}
std::string ListProductsRequest::getLanguage()const
std::string ListProductsRequest::getName()const
{
return language_;
return name_;
}
void ListProductsRequest::setLanguage(const std::string& language)
void ListProductsRequest::setName(const std::string& name)
{
language_ = language;
setParameter("Language", language);
name_ = name;
setParameter("Name", name);
}

View File

@@ -39,69 +39,34 @@ void ListProductsResult::parse(const std::string &payload)
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allTechMoreNode = dataNode["TechMore"]["TechMoreItem"];
for (auto dataNodeTechMoreTechMoreItem : allTechMoreNode)
auto allDataNode = value["Data"]["DataItem"];
for (auto valueDataDataItem : allDataNode)
{
Data::TechMoreItem techMoreItemObject;
if(!dataNodeTechMoreTechMoreItem["GroupName"].isNull())
techMoreItemObject.groupName = dataNodeTechMoreTechMoreItem["GroupName"].asString();
auto allProductListNode = allTechMoreNode["ProductList"]["ProductListItem"];
for (auto allTechMoreNodeProductListProductListItem : allProductListNode)
DataItem dataObject;
if(!valueDataDataItem["TopCategoryName"].isNull())
dataObject.topCategoryName = valueDataDataItem["TopCategoryName"].asString();
if(!valueDataDataItem["TopCategoryId"].isNull())
dataObject.topCategoryId = std::stol(valueDataDataItem["TopCategoryId"].asString());
if(!valueDataDataItem["OrderNumber"].isNull())
dataObject.orderNumber = std::stoi(valueDataDataItem["OrderNumber"].asString());
auto allRootsNode = valueDataDataItem["Roots"]["RootsItem"];
for (auto valueDataDataItemRootsRootsItem : allRootsNode)
{
Data::TechMoreItem::ProductListItem productListObject;
if(!allTechMoreNodeProductListProductListItem["Name"].isNull())
productListObject.name = allTechMoreNodeProductListProductListItem["Name"].asString();
if(!allTechMoreNodeProductListProductListItem["ProductCode"].isNull())
productListObject.productCode = allTechMoreNodeProductListProductListItem["ProductCode"].asString();
if(!allTechMoreNodeProductListProductListItem["Description"].isNull())
productListObject.description = allTechMoreNodeProductListProductListItem["Description"].asString();
techMoreItemObject.productList.push_back(productListObject);
DataItem::RootsItem rootsObject;
if(!valueDataDataItemRootsRootsItem["CategoryId"].isNull())
rootsObject.categoryId = std::stol(valueDataDataItemRootsRootsItem["CategoryId"].asString());
if(!valueDataDataItemRootsRootsItem["CategoryName"].isNull())
rootsObject.categoryName = valueDataDataItemRootsRootsItem["CategoryName"].asString();
dataObject.roots.push_back(rootsObject);
}
data_.techMore.push_back(techMoreItemObject);
}
auto allHotConsultationNode = dataNode["HotConsultation"]["HotConsultationItem"];
for (auto dataNodeHotConsultationHotConsultationItem : allHotConsultationNode)
{
Data::HotConsultationItem hotConsultationItemObject;
if(!dataNodeHotConsultationHotConsultationItem["Name"].isNull())
hotConsultationItemObject.name = dataNodeHotConsultationHotConsultationItem["Name"].asString();
if(!dataNodeHotConsultationHotConsultationItem["ProductCode"].isNull())
hotConsultationItemObject.productCode = dataNodeHotConsultationHotConsultationItem["ProductCode"].asString();
if(!dataNodeHotConsultationHotConsultationItem["Description"].isNull())
hotConsultationItemObject.description = dataNodeHotConsultationHotConsultationItem["Description"].asString();
data_.hotConsultation.push_back(hotConsultationItemObject);
}
auto allConsultationMoreNode = dataNode["ConsultationMore"]["ConsultationMoreItem"];
for (auto dataNodeConsultationMoreConsultationMoreItem : allConsultationMoreNode)
{
Data::ConsultationMoreItem consultationMoreItemObject;
if(!dataNodeConsultationMoreConsultationMoreItem["Name"].isNull())
consultationMoreItemObject.name = dataNodeConsultationMoreConsultationMoreItem["Name"].asString();
if(!dataNodeConsultationMoreConsultationMoreItem["ProductCode"].isNull())
consultationMoreItemObject.productCode = dataNodeConsultationMoreConsultationMoreItem["ProductCode"].asString();
if(!dataNodeConsultationMoreConsultationMoreItem["Description"].isNull())
consultationMoreItemObject.description = dataNodeConsultationMoreConsultationMoreItem["Description"].asString();
data_.consultationMore.push_back(consultationMoreItemObject);
}
auto allHotTechNode = dataNode["HotTech"]["HotTechItem"];
for (auto dataNodeHotTechHotTechItem : allHotTechNode)
{
Data::HotTechItem hotTechItemObject;
if(!dataNodeHotTechHotTechItem["Name"].isNull())
hotTechItemObject.name = dataNodeHotTechHotTechItem["Name"].asString();
if(!dataNodeHotTechHotTechItem["ProductCode"].isNull())
hotTechItemObject.productCode = dataNodeHotTechHotTechItem["ProductCode"].asString();
if(!dataNodeHotTechHotTechItem["Description"].isNull())
hotTechItemObject.description = dataNodeHotTechHotTechItem["Description"].asString();
data_.hotTech.push_back(hotTechItemObject);
data_.push_back(dataObject);
}
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
@@ -110,7 +75,7 @@ std::string ListProductsResult::getMessage()const
return message_;
}
ListProductsResult::Data ListProductsResult::getData()const
std::vector<ListProductsResult::DataItem> ListProductsResult::getData()const
{
return data_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Workorder::Model::ListTicketNotesRequest;
ListTicketNotesRequest::ListTicketNotesRequest() :
RpcServiceRequest("workorder", "2020-03-26", "ListTicketNotes")
RpcServiceRequest("workorder", "2021-05-10", "ListTicketNotes")
{
setMethod(HttpRequest::Method::Post);
}
@@ -27,17 +27,6 @@ ListTicketNotesRequest::ListTicketNotesRequest() :
ListTicketNotesRequest::~ListTicketNotesRequest()
{}
std::string ListTicketNotesRequest::getLanguage()const
{
return language_;
}
void ListTicketNotesRequest::setLanguage(const std::string& language)
{
language_ = language;
setParameter("Language", language);
}
std::string ListTicketNotesRequest::getTicketId()const
{
return ticketId_;

View File

@@ -39,27 +39,38 @@ void ListTicketNotesResult::parse(const std::string &payload)
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allListNode = dataNode["List"]["ListItem"];
for (auto dataNodeListListItem : allListNode)
auto allDataNode = value["Data"]["DataItem"];
for (auto valueDataDataItem : allDataNode)
{
Data::ListItem listItemObject;
if(!dataNodeListListItem["FromOfficial"].isNull())
listItemObject.fromOfficial = dataNodeListListItem["FromOfficial"].asString() == "true";
if(!dataNodeListListItem["GmtCreated"].isNull())
listItemObject.gmtCreated = std::stoi(dataNodeListListItem["GmtCreated"].asString());
if(!dataNodeListListItem["NoteId"].isNull())
listItemObject.noteId = dataNodeListListItem["NoteId"].asString();
if(!dataNodeListListItem["Content"].isNull())
listItemObject.content = dataNodeListListItem["Content"].asString();
data_.list.push_back(listItemObject);
DataItem dataObject;
if(!valueDataDataItem["Status"].isNull())
dataObject.status = std::stoi(valueDataDataItem["Status"].asString());
if(!valueDataDataItem["CreateTime"].isNull())
dataObject.createTime = std::stol(valueDataDataItem["CreateTime"].asString());
if(!valueDataDataItem["Type"].isNull())
dataObject.type = std::stoi(valueDataDataItem["Type"].asString());
if(!valueDataDataItem["DialogId"].isNull())
dataObject.dialogId = std::stol(valueDataDataItem["DialogId"].asString());
if(!valueDataDataItem["Tip"].isNull())
dataObject.tip = valueDataDataItem["Tip"].asString();
auto dataInfoNode = value["DataInfo"];
if(!dataInfoNode["Content"].isNull())
dataObject.dataInfo.content = dataInfoNode["Content"].asString();
if(!dataInfoNode["Schema"].isNull())
dataObject.dataInfo.schema = dataInfoNode["Schema"].asString();
auto userInfoNode = value["UserInfo"];
if(!userInfoNode["UserName"].isNull())
dataObject.userInfo.userName = userInfoNode["UserName"].asString();
if(!userInfoNode["Role"].isNull())
dataObject.userInfo.role = std::stoi(userInfoNode["Role"].asString());
data_.push_back(dataObject);
}
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
@@ -68,7 +79,7 @@ std::string ListTicketNotesResult::getMessage()const
return message_;
}
ListTicketNotesResult::Data ListTicketNotesResult::getData()const
std::vector<ListTicketNotesResult::DataItem> ListTicketNotesResult::getData()const
{
return data_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Workorder::Model::ListTicketsRequest;
ListTicketsRequest::ListTicketsRequest() :
RpcServiceRequest("workorder", "2020-03-26", "ListTickets")
RpcServiceRequest("workorder", "2021-05-10", "ListTickets")
{
setMethod(HttpRequest::Method::Post);
}
@@ -27,48 +27,50 @@ ListTicketsRequest::ListTicketsRequest() :
ListTicketsRequest::~ListTicketsRequest()
{}
std::string ListTicketsRequest::getProductCode()const
long ListTicketsRequest::getBeginDate()const
{
return productCode_;
return beginDate_;
}
void ListTicketsRequest::setProductCode(const std::string& productCode)
void ListTicketsRequest::setBeginDate(long beginDate)
{
productCode_ = productCode;
setParameter("ProductCode", productCode);
beginDate_ = beginDate;
setParameter("BeginDate", std::to_string(beginDate));
}
std::string ListTicketsRequest::getLanguage()const
std::vector<std::string> ListTicketsRequest::getStatusList()const
{
return language_;
return statusList_;
}
void ListTicketsRequest::setLanguage(const std::string& language)
void ListTicketsRequest::setStatusList(const std::vector<std::string>& statusList)
{
language_ = language;
setParameter("Language", language);
statusList_ = statusList;
for(int dep1 = 0; dep1!= statusList.size(); dep1++) {
setParameter("StatusList."+ std::to_string(dep1), statusList.at(dep1));
}
}
std::string ListTicketsRequest::getSubUserId()const
int ListTicketsRequest::getPageNumber()const
{
return subUserId_;
return pageNumber_;
}
void ListTicketsRequest::setSubUserId(const std::string& subUserId)
void ListTicketsRequest::setPageNumber(int pageNumber)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}
long ListTicketsRequest::getCreatedBeforeTime()const
long ListTicketsRequest::getEndDate()const
{
return createdBeforeTime_;
return endDate_;
}
void ListTicketsRequest::setCreatedBeforeTime(long createdBeforeTime)
void ListTicketsRequest::setEndDate(long endDate)
{
createdBeforeTime_ = createdBeforeTime;
setParameter("CreatedBeforeTime", std::to_string(createdBeforeTime));
endDate_ = endDate;
setParameter("EndDate", std::to_string(endDate));
}
int ListTicketsRequest::getPageSize()const
@@ -82,47 +84,25 @@ void ListTicketsRequest::setPageSize(int pageSize)
setParameter("PageSize", std::to_string(pageSize));
}
std::string ListTicketsRequest::getIds()const
std::string ListTicketsRequest::getKeyword()const
{
return ids_;
return keyword_;
}
void ListTicketsRequest::setIds(const std::string& ids)
void ListTicketsRequest::setKeyword(const std::string& keyword)
{
ids_ = ids;
setParameter("Ids", ids);
keyword_ = keyword;
setParameter("Keyword", keyword);
}
std::string ListTicketsRequest::getTicketStatus()const
std::string ListTicketsRequest::getTicketId()const
{
return ticketStatus_;
return ticketId_;
}
void ListTicketsRequest::setTicketStatus(const std::string& ticketStatus)
void ListTicketsRequest::setTicketId(const std::string& ticketId)
{
ticketStatus_ = ticketStatus;
setParameter("TicketStatus", ticketStatus);
}
int ListTicketsRequest::getPageStart()const
{
return pageStart_;
}
void ListTicketsRequest::setPageStart(int pageStart)
{
pageStart_ = pageStart;
setParameter("PageStart", std::to_string(pageStart));
}
long ListTicketsRequest::getCreatedAfterTime()const
{
return createdAfterTime_;
}
void ListTicketsRequest::setCreatedAfterTime(long createdAfterTime)
{
createdAfterTime_ = createdAfterTime;
setParameter("CreatedAfterTime", std::to_string(createdAfterTime));
ticketId_ = ticketId;
setParameter("TicketId", ticketId);
}

View File

@@ -39,44 +39,57 @@ void ListTicketsResult::parse(const std::string &payload)
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["Total"].isNull())
data_.total = std::stoi(dataNode["Total"].asString());
if(!dataNode["PageSize"].isNull())
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
if(!dataNode["CurrentPage"].isNull())
data_.currentPage = std::stoi(dataNode["CurrentPage"].asString());
auto allListNode = dataNode["List"]["ListItem"];
for (auto dataNodeListListItem : allListNode)
auto allDataNode = value["Data"]["DataItem"];
for (auto valueDataDataItem : allDataNode)
{
Data::ListItem listItemObject;
if(!dataNodeListListItem["AddTime"].isNull())
listItemObject.addTime = std::stoi(dataNodeListListItem["AddTime"].asString());
if(!dataNodeListListItem["TicketStatus"].isNull())
listItemObject.ticketStatus = dataNodeListListItem["TicketStatus"].asString();
if(!dataNodeListListItem["CreatorId"].isNull())
listItemObject.creatorId = dataNodeListListItem["CreatorId"].asString();
if(!dataNodeListListItem["Id"].isNull())
listItemObject.id = dataNodeListListItem["Id"].asString();
if(!dataNodeListListItem["Title"].isNull())
listItemObject.title = dataNodeListListItem["Title"].asString();
data_.list.push_back(listItemObject);
DataItem dataObject;
if(!valueDataDataItem["Title"].isNull())
dataObject.title = valueDataDataItem["Title"].asString();
if(!valueDataDataItem["TicketId"].isNull())
dataObject.ticketId = valueDataDataItem["TicketId"].asString();
auto statusNode = value["Status"];
if(!statusNode["Label"].isNull())
dataObject.status.label = statusNode["Label"].asString();
if(!statusNode["Value"].isNull())
dataObject.status.value = statusNode["Value"].asString();
data_.push_back(dataObject);
}
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["TotalCount"].isNull())
totalCount_ = std::stol(value["TotalCount"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
long ListTicketsResult::getTotalCount()const
{
return totalCount_;
}
std::string ListTicketsResult::getMessage()const
{
return message_;
}
ListTicketsResult::Data ListTicketsResult::getData()const
int ListTicketsResult::getPageSize()const
{
return pageSize_;
}
int ListTicketsResult::getPageNumber()const
{
return pageNumber_;
}
std::vector<ListTicketsResult::DataItem> ListTicketsResult::getData()const
{
return data_;
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Workorder::Model::ReplyTicketRequest;
ReplyTicketRequest::ReplyTicketRequest() :
RpcServiceRequest("workorder", "2020-03-26", "ReplyTicket")
RpcServiceRequest("workorder", "2021-05-10", "ReplyTicket")
{
setMethod(HttpRequest::Method::Post);
}
@@ -27,26 +27,15 @@ ReplyTicketRequest::ReplyTicketRequest() :
ReplyTicketRequest::~ReplyTicketRequest()
{}
std::string ReplyTicketRequest::getLanguage()const
std::string ReplyTicketRequest::getSecContent()const
{
return language_;
return secContent_;
}
void ReplyTicketRequest::setLanguage(const std::string& language)
void ReplyTicketRequest::setSecContent(const std::string& secContent)
{
language_ = language;
setParameter("Language", language);
}
std::string ReplyTicketRequest::getTicketId()const
{
return ticketId_;
}
void ReplyTicketRequest::setTicketId(const std::string& ticketId)
{
ticketId_ = ticketId;
setParameter("TicketId", ticketId);
secContent_ = secContent;
setBodyParameter("SecContent", secContent);
}
std::string ReplyTicketRequest::getContent()const
@@ -57,17 +46,17 @@ std::string ReplyTicketRequest::getContent()const
void ReplyTicketRequest::setContent(const std::string& content)
{
content_ = content;
setParameter("Content", content);
setBodyParameter("Content", content);
}
std::string ReplyTicketRequest::getSecretContent()const
std::string ReplyTicketRequest::getTicketId()const
{
return secretContent_;
return ticketId_;
}
void ReplyTicketRequest::setSecretContent(const std::string& secretContent)
void ReplyTicketRequest::setTicketId(const std::string& ticketId)
{
secretContent_ = secretContent;
setParameter("SecretContent", secretContent);
ticketId_ = ticketId;
setBodyParameter("TicketId", ticketId);
}

View File

@@ -41,10 +41,12 @@ void ReplyTicketResult::parse(const std::string &payload)
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Data"].isNull())
data_ = value["Data"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
@@ -53,6 +55,11 @@ std::string ReplyTicketResult::getMessage()const
return message_;
}
std::string ReplyTicketResult::getData()const
{
return data_;
}
int ReplyTicketResult::getCode()const
{
return code_;