CCS SDK Auto Released By shenshi,Version:1.34.37

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
This commit is contained in:
haowei.yao
2019-03-18 11:35:09 +08:00
parent 38e88e6678
commit 6d54401df2
26 changed files with 975 additions and 5 deletions

View File

@@ -1,3 +1,6 @@
2019-03-18 Version: 1.34.37
1, Update Dependency
2019-03-18 Version: 1.34.36
1, Update Dependency

View File

@@ -1 +1 @@
1.34.36
1.34.37

12
ccs/CMakeLists.txt Executable file → Normal file
View File

@@ -21,15 +21,27 @@ set(ccs_public_header
include/alibabacloud/ccs/CcsExport.h )
set(ccs_public_header_model
include/alibabacloud/ccs/model/CreateTicketRequest.h
include/alibabacloud/ccs/model/CreateTicketResult.h
include/alibabacloud/ccs/model/QueryTicketRequest.h
include/alibabacloud/ccs/model/QueryTicketResult.h
include/alibabacloud/ccs/model/GetHotlineRecordRequest.h
include/alibabacloud/ccs/model/GetHotlineRecordResult.h
include/alibabacloud/ccs/model/ProceedTicketRequest.h
include/alibabacloud/ccs/model/ProceedTicketResult.h
include/alibabacloud/ccs/model/QueryHotlineRecordRequest.h
include/alibabacloud/ccs/model/QueryHotlineRecordResult.h )
set(ccs_src
src/CcsClient.cc
src/model/CreateTicketRequest.cc
src/model/CreateTicketResult.cc
src/model/QueryTicketRequest.cc
src/model/QueryTicketResult.cc
src/model/GetHotlineRecordRequest.cc
src/model/GetHotlineRecordResult.cc
src/model/ProceedTicketRequest.cc
src/model/ProceedTicketResult.cc
src/model/QueryHotlineRecordRequest.cc
src/model/QueryHotlineRecordResult.cc )

24
ccs/include/alibabacloud/ccs/CcsClient.h Executable file → Normal file
View File

@@ -22,8 +22,14 @@
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RpcServiceClient.h>
#include "CcsExport.h"
#include "model/CreateTicketRequest.h"
#include "model/CreateTicketResult.h"
#include "model/QueryTicketRequest.h"
#include "model/QueryTicketResult.h"
#include "model/GetHotlineRecordRequest.h"
#include "model/GetHotlineRecordResult.h"
#include "model/ProceedTicketRequest.h"
#include "model/ProceedTicketResult.h"
#include "model/QueryHotlineRecordRequest.h"
#include "model/QueryHotlineRecordResult.h"
@@ -35,9 +41,18 @@ namespace AlibabaCloud
class ALIBABACLOUD_CCS_EXPORT CcsClient : public RpcServiceClient
{
public:
typedef Outcome<Error, Model::CreateTicketResult> CreateTicketOutcome;
typedef std::future<CreateTicketOutcome> CreateTicketOutcomeCallable;
typedef std::function<void(const CcsClient*, const Model::CreateTicketRequest&, const CreateTicketOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateTicketAsyncHandler;
typedef Outcome<Error, Model::QueryTicketResult> QueryTicketOutcome;
typedef std::future<QueryTicketOutcome> QueryTicketOutcomeCallable;
typedef std::function<void(const CcsClient*, const Model::QueryTicketRequest&, const QueryTicketOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryTicketAsyncHandler;
typedef Outcome<Error, Model::GetHotlineRecordResult> GetHotlineRecordOutcome;
typedef std::future<GetHotlineRecordOutcome> GetHotlineRecordOutcomeCallable;
typedef std::function<void(const CcsClient*, const Model::GetHotlineRecordRequest&, const GetHotlineRecordOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetHotlineRecordAsyncHandler;
typedef Outcome<Error, Model::ProceedTicketResult> ProceedTicketOutcome;
typedef std::future<ProceedTicketOutcome> ProceedTicketOutcomeCallable;
typedef std::function<void(const CcsClient*, const Model::ProceedTicketRequest&, const ProceedTicketOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ProceedTicketAsyncHandler;
typedef Outcome<Error, Model::QueryHotlineRecordResult> QueryHotlineRecordOutcome;
typedef std::future<QueryHotlineRecordOutcome> QueryHotlineRecordOutcomeCallable;
typedef std::function<void(const CcsClient*, const Model::QueryHotlineRecordRequest&, const QueryHotlineRecordOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryHotlineRecordAsyncHandler;
@@ -46,9 +61,18 @@ namespace AlibabaCloud
CcsClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
CcsClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
~CcsClient();
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;
QueryTicketOutcome queryTicket(const Model::QueryTicketRequest &request)const;
void queryTicketAsync(const Model::QueryTicketRequest& request, const QueryTicketAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
QueryTicketOutcomeCallable queryTicketCallable(const Model::QueryTicketRequest& request) const;
GetHotlineRecordOutcome getHotlineRecord(const Model::GetHotlineRecordRequest &request)const;
void getHotlineRecordAsync(const Model::GetHotlineRecordRequest& request, const GetHotlineRecordAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetHotlineRecordOutcomeCallable getHotlineRecordCallable(const Model::GetHotlineRecordRequest& request) const;
ProceedTicketOutcome proceedTicket(const Model::ProceedTicketRequest &request)const;
void proceedTicketAsync(const Model::ProceedTicketRequest& request, const ProceedTicketAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ProceedTicketOutcomeCallable proceedTicketCallable(const Model::ProceedTicketRequest& request) const;
QueryHotlineRecordOutcome queryHotlineRecord(const Model::QueryHotlineRecordRequest &request)const;
void queryHotlineRecordAsync(const Model::QueryHotlineRecordRequest& request, const QueryHotlineRecordAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
QueryHotlineRecordOutcomeCallable queryHotlineRecordCallable(const Model::QueryHotlineRecordRequest& request) const;

0
ccs/include/alibabacloud/ccs/CcsExport.h Executable file → Normal file
View File

View File

@@ -0,0 +1,60 @@
/*
* 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_CCS_MODEL_CREATETICKETREQUEST_H_
#define ALIBABACLOUD_CCS_MODEL_CREATETICKETREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ccs/CcsExport.h>
namespace AlibabaCloud
{
namespace Ccs
{
namespace Model
{
class ALIBABACLOUD_CCS_EXPORT CreateTicketRequest : public RpcServiceRequest
{
public:
CreateTicketRequest();
~CreateTicketRequest();
std::string getCreatorId()const;
void setCreatorId(const std::string& creatorId);
std::string getDescription()const;
void setDescription(const std::string& description);
std::string getType()const;
void setType(const std::string& type);
std::string getCcsInstanceId()const;
void setCcsInstanceId(const std::string& ccsInstanceId);
std::string getCustomFields()const;
void setCustomFields(const std::string& customFields);
private:
std::string creatorId_;
std::string description_;
std::string type_;
std::string ccsInstanceId_;
std::string customFields_;
};
}
}
}
#endif // !ALIBABACLOUD_CCS_MODEL_CREATETICKETREQUEST_H_

View 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.
*/
#ifndef ALIBABACLOUD_CCS_MODEL_CREATETICKETRESULT_H_
#define ALIBABACLOUD_CCS_MODEL_CREATETICKETRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ccs/CcsExport.h>
namespace AlibabaCloud
{
namespace Ccs
{
namespace Model
{
class ALIBABACLOUD_CCS_EXPORT CreateTicketResult : public ServiceResult
{
public:
CreateTicketResult();
explicit CreateTicketResult(const std::string &payload);
~CreateTicketResult();
std::string getId()const;
protected:
void parse(const std::string &payload);
private:
std::string id_;
};
}
}
}
#endif // !ALIBABACLOUD_CCS_MODEL_CREATETICKETRESULT_H_

View File

View File

View File

@@ -0,0 +1,60 @@
/*
* 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_CCS_MODEL_PROCEEDTICKETREQUEST_H_
#define ALIBABACLOUD_CCS_MODEL_PROCEEDTICKETREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ccs/CcsExport.h>
namespace AlibabaCloud
{
namespace Ccs
{
namespace Model
{
class ALIBABACLOUD_CCS_EXPORT ProceedTicketRequest : public RpcServiceRequest
{
public:
ProceedTicketRequest();
~ProceedTicketRequest();
std::string getMemo()const;
void setMemo(const std::string& memo);
std::string getId()const;
void setId(const std::string& id);
std::string getCcsInstanceId()const;
void setCcsInstanceId(const std::string& ccsInstanceId);
std::string getOperation()const;
void setOperation(const std::string& operation);
std::string getOperatorId()const;
void setOperatorId(const std::string& operatorId);
private:
std::string memo_;
std::string id_;
std::string ccsInstanceId_;
std::string operation_;
std::string operatorId_;
};
}
}
}
#endif // !ALIBABACLOUD_CCS_MODEL_PROCEEDTICKETREQUEST_H_

View File

@@ -0,0 +1,49 @@
/*
* 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_CCS_MODEL_PROCEEDTICKETRESULT_H_
#define ALIBABACLOUD_CCS_MODEL_PROCEEDTICKETRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ccs/CcsExport.h>
namespace AlibabaCloud
{
namespace Ccs
{
namespace Model
{
class ALIBABACLOUD_CCS_EXPORT ProceedTicketResult : public ServiceResult
{
public:
ProceedTicketResult();
explicit ProceedTicketResult(const std::string &payload);
~ProceedTicketResult();
protected:
void parse(const std::string &payload);
private:
};
}
}
}
#endif // !ALIBABACLOUD_CCS_MODEL_PROCEEDTICKETRESULT_H_

View File

View File

@@ -59,7 +59,7 @@ namespace AlibabaCloud
QueryHotlineRecordResult();
explicit QueryHotlineRecordResult(const std::string &payload);
~QueryHotlineRecordResult();
int getTotalCount()const;
long getTotalCount()const;
int getPageNum()const;
int getPageSize()const;
std::vector<HotlineRecord> getRecords()const;
@@ -67,7 +67,7 @@ namespace AlibabaCloud
protected:
void parse(const std::string &payload);
private:
int totalCount_;
long totalCount_;
int pageNum_;
int pageSize_;
std::vector<HotlineRecord> records_;

View File

@@ -0,0 +1,69 @@
/*
* 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_CCS_MODEL_QUERYTICKETREQUEST_H_
#define ALIBABACLOUD_CCS_MODEL_QUERYTICKETREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ccs/CcsExport.h>
namespace AlibabaCloud
{
namespace Ccs
{
namespace Model
{
class ALIBABACLOUD_CCS_EXPORT QueryTicketRequest : public RpcServiceRequest
{
public:
QueryTicketRequest();
~QueryTicketRequest();
std::string getStage()const;
void setStage(const std::string& stage);
int getPageSize()const;
void setPageSize(int pageSize);
std::string getCreatorId()const;
void setCreatorId(const std::string& creatorId);
std::string getEndTime()const;
void setEndTime(const std::string& endTime);
std::string getStartTime()const;
void setStartTime(const std::string& startTime);
int getPageNum()const;
void setPageNum(int pageNum);
std::string getType()const;
void setType(const std::string& type);
std::string getCcsInstanceId()const;
void setCcsInstanceId(const std::string& ccsInstanceId);
private:
std::string stage_;
int pageSize_;
std::string creatorId_;
std::string endTime_;
std::string startTime_;
int pageNum_;
std::string type_;
std::string ccsInstanceId_;
};
}
}
}
#endif // !ALIBABACLOUD_CCS_MODEL_QUERYTICKETREQUEST_H_

View File

@@ -0,0 +1,67 @@
/*
* 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_CCS_MODEL_QUERYTICKETRESULT_H_
#define ALIBABACLOUD_CCS_MODEL_QUERYTICKETRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ccs/CcsExport.h>
namespace AlibabaCloud
{
namespace Ccs
{
namespace Model
{
class ALIBABACLOUD_CCS_EXPORT QueryTicketResult : public ServiceResult
{
public:
struct Ticket
{
std::string type;
std::string customFields;
std::string description;
std::string creatorId;
std::string createTime;
std::string stage;
std::string id;
};
QueryTicketResult();
explicit QueryTicketResult(const std::string &payload);
~QueryTicketResult();
long getTotalCount()const;
int getPageNum()const;
int getPageSize()const;
std::vector<Ticket> getTickets()const;
protected:
void parse(const std::string &payload);
private:
long totalCount_;
int pageNum_;
int pageSize_;
std::vector<Ticket> tickets_;
};
}
}
}
#endif // !ALIBABACLOUD_CCS_MODEL_QUERYTICKETRESULT_H_

108
ccs/src/CcsClient.cc Executable file → Normal file
View File

@@ -51,6 +51,78 @@ CcsClient::CcsClient(const std::string & accessKeyId, const std::string & access
CcsClient::~CcsClient()
{}
CcsClient::CreateTicketOutcome CcsClient::createTicket(const CreateTicketRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateTicketOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateTicketOutcome(CreateTicketResult(outcome.result()));
else
return CreateTicketOutcome(outcome.error());
}
void CcsClient::createTicketAsync(const CreateTicketRequest& request, const CreateTicketAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createTicket(request), context);
};
asyncExecute(new Runnable(fn));
}
CcsClient::CreateTicketOutcomeCallable CcsClient::createTicketCallable(const CreateTicketRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateTicketOutcome()>>(
[this, request]()
{
return this->createTicket(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CcsClient::QueryTicketOutcome CcsClient::queryTicket(const QueryTicketRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return QueryTicketOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return QueryTicketOutcome(QueryTicketResult(outcome.result()));
else
return QueryTicketOutcome(outcome.error());
}
void CcsClient::queryTicketAsync(const QueryTicketRequest& request, const QueryTicketAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, queryTicket(request), context);
};
asyncExecute(new Runnable(fn));
}
CcsClient::QueryTicketOutcomeCallable CcsClient::queryTicketCallable(const QueryTicketRequest &request) const
{
auto task = std::make_shared<std::packaged_task<QueryTicketOutcome()>>(
[this, request]()
{
return this->queryTicket(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CcsClient::GetHotlineRecordOutcome CcsClient::getHotlineRecord(const GetHotlineRecordRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -87,6 +159,42 @@ CcsClient::GetHotlineRecordOutcomeCallable CcsClient::getHotlineRecordCallable(c
return task->get_future();
}
CcsClient::ProceedTicketOutcome CcsClient::proceedTicket(const ProceedTicketRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ProceedTicketOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ProceedTicketOutcome(ProceedTicketResult(outcome.result()));
else
return ProceedTicketOutcome(outcome.error());
}
void CcsClient::proceedTicketAsync(const ProceedTicketRequest& request, const ProceedTicketAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, proceedTicket(request), context);
};
asyncExecute(new Runnable(fn));
}
CcsClient::ProceedTicketOutcomeCallable CcsClient::proceedTicketCallable(const ProceedTicketRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ProceedTicketOutcome()>>(
[this, request]()
{
return this->proceedTicket(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CcsClient::QueryHotlineRecordOutcome CcsClient::queryHotlineRecord(const QueryHotlineRecordRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,82 @@
/*
* 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/ccs/model/CreateTicketRequest.h>
using AlibabaCloud::Ccs::Model::CreateTicketRequest;
CreateTicketRequest::CreateTicketRequest() :
RpcServiceRequest("ccs", "2017-10-01", "CreateTicket")
{}
CreateTicketRequest::~CreateTicketRequest()
{}
std::string CreateTicketRequest::getCreatorId()const
{
return creatorId_;
}
void CreateTicketRequest::setCreatorId(const std::string& creatorId)
{
creatorId_ = creatorId;
setParameter("CreatorId", creatorId);
}
std::string CreateTicketRequest::getDescription()const
{
return description_;
}
void CreateTicketRequest::setDescription(const std::string& description)
{
description_ = description;
setParameter("Description", description);
}
std::string CreateTicketRequest::getType()const
{
return type_;
}
void CreateTicketRequest::setType(const std::string& type)
{
type_ = type;
setParameter("Type", type);
}
std::string CreateTicketRequest::getCcsInstanceId()const
{
return ccsInstanceId_;
}
void CreateTicketRequest::setCcsInstanceId(const std::string& ccsInstanceId)
{
ccsInstanceId_ = ccsInstanceId;
setParameter("CcsInstanceId", ccsInstanceId);
}
std::string CreateTicketRequest::getCustomFields()const
{
return customFields_;
}
void CreateTicketRequest::setCustomFields(const std::string& customFields)
{
customFields_ = customFields;
setParameter("CustomFields", customFields);
}

View File

@@ -0,0 +1,52 @@
/*
* 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/ccs/model/CreateTicketResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ccs;
using namespace AlibabaCloud::Ccs::Model;
CreateTicketResult::CreateTicketResult() :
ServiceResult()
{}
CreateTicketResult::CreateTicketResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateTicketResult::~CreateTicketResult()
{}
void CreateTicketResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Id"].isNull())
id_ = value["Id"].asString();
}
std::string CreateTicketResult::getId()const
{
return id_;
}

0
ccs/src/model/GetHotlineRecordRequest.cc Executable file → Normal file
View File

0
ccs/src/model/GetHotlineRecordResult.cc Executable file → Normal file
View File

View File

@@ -0,0 +1,82 @@
/*
* 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/ccs/model/ProceedTicketRequest.h>
using AlibabaCloud::Ccs::Model::ProceedTicketRequest;
ProceedTicketRequest::ProceedTicketRequest() :
RpcServiceRequest("ccs", "2017-10-01", "ProceedTicket")
{}
ProceedTicketRequest::~ProceedTicketRequest()
{}
std::string ProceedTicketRequest::getMemo()const
{
return memo_;
}
void ProceedTicketRequest::setMemo(const std::string& memo)
{
memo_ = memo;
setParameter("Memo", memo);
}
std::string ProceedTicketRequest::getId()const
{
return id_;
}
void ProceedTicketRequest::setId(const std::string& id)
{
id_ = id;
setParameter("Id", id);
}
std::string ProceedTicketRequest::getCcsInstanceId()const
{
return ccsInstanceId_;
}
void ProceedTicketRequest::setCcsInstanceId(const std::string& ccsInstanceId)
{
ccsInstanceId_ = ccsInstanceId;
setParameter("CcsInstanceId", ccsInstanceId);
}
std::string ProceedTicketRequest::getOperation()const
{
return operation_;
}
void ProceedTicketRequest::setOperation(const std::string& operation)
{
operation_ = operation;
setParameter("Operation", operation);
}
std::string ProceedTicketRequest::getOperatorId()const
{
return operatorId_;
}
void ProceedTicketRequest::setOperatorId(const std::string& operatorId)
{
operatorId_ = operatorId;
setParameter("OperatorId", operatorId);
}

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.
*/
#include <alibabacloud/ccs/model/ProceedTicketResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ccs;
using namespace AlibabaCloud::Ccs::Model;
ProceedTicketResult::ProceedTicketResult() :
ServiceResult()
{}
ProceedTicketResult::ProceedTicketResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ProceedTicketResult::~ProceedTicketResult()
{}
void ProceedTicketResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

0
ccs/src/model/QueryHotlineRecordRequest.cc Executable file → Normal file
View File

4
ccs/src/model/QueryHotlineRecordResult.cc Executable file → Normal file
View File

@@ -85,7 +85,7 @@ void QueryHotlineRecordResult::parse(const std::string &payload)
records_.push_back(recordsObject);
}
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
totalCount_ = std::stol(value["TotalCount"].asString());
if(!value["PageNum"].isNull())
pageNum_ = std::stoi(value["PageNum"].asString());
if(!value["PageSize"].isNull())
@@ -93,7 +93,7 @@ void QueryHotlineRecordResult::parse(const std::string &payload)
}
int QueryHotlineRecordResult::getTotalCount()const
long QueryHotlineRecordResult::getTotalCount()const
{
return totalCount_;
}

View File

@@ -0,0 +1,115 @@
/*
* 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/ccs/model/QueryTicketRequest.h>
using AlibabaCloud::Ccs::Model::QueryTicketRequest;
QueryTicketRequest::QueryTicketRequest() :
RpcServiceRequest("ccs", "2017-10-01", "QueryTicket")
{}
QueryTicketRequest::~QueryTicketRequest()
{}
std::string QueryTicketRequest::getStage()const
{
return stage_;
}
void QueryTicketRequest::setStage(const std::string& stage)
{
stage_ = stage;
setParameter("Stage", stage);
}
int QueryTicketRequest::getPageSize()const
{
return pageSize_;
}
void QueryTicketRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string QueryTicketRequest::getCreatorId()const
{
return creatorId_;
}
void QueryTicketRequest::setCreatorId(const std::string& creatorId)
{
creatorId_ = creatorId;
setParameter("CreatorId", creatorId);
}
std::string QueryTicketRequest::getEndTime()const
{
return endTime_;
}
void QueryTicketRequest::setEndTime(const std::string& endTime)
{
endTime_ = endTime;
setParameter("EndTime", endTime);
}
std::string QueryTicketRequest::getStartTime()const
{
return startTime_;
}
void QueryTicketRequest::setStartTime(const std::string& startTime)
{
startTime_ = startTime;
setParameter("StartTime", startTime);
}
int QueryTicketRequest::getPageNum()const
{
return pageNum_;
}
void QueryTicketRequest::setPageNum(int pageNum)
{
pageNum_ = pageNum;
setParameter("PageNum", std::to_string(pageNum));
}
std::string QueryTicketRequest::getType()const
{
return type_;
}
void QueryTicketRequest::setType(const std::string& type)
{
type_ = type;
setParameter("Type", type);
}
std::string QueryTicketRequest::getCcsInstanceId()const
{
return ccsInstanceId_;
}
void QueryTicketRequest::setCcsInstanceId(const std::string& ccsInstanceId)
{
ccsInstanceId_ = ccsInstanceId;
setParameter("CcsInstanceId", ccsInstanceId);
}

View File

@@ -0,0 +1,91 @@
/*
* 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/ccs/model/QueryTicketResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ccs;
using namespace AlibabaCloud::Ccs::Model;
QueryTicketResult::QueryTicketResult() :
ServiceResult()
{}
QueryTicketResult::QueryTicketResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryTicketResult::~QueryTicketResult()
{}
void QueryTicketResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allTickets = value["Tickets"]["Ticket"];
for (auto value : allTickets)
{
Ticket ticketsObject;
if(!value["Id"].isNull())
ticketsObject.id = value["Id"].asString();
if(!value["Type"].isNull())
ticketsObject.type = value["Type"].asString();
if(!value["Stage"].isNull())
ticketsObject.stage = value["Stage"].asString();
if(!value["Description"].isNull())
ticketsObject.description = value["Description"].asString();
if(!value["CreatorId"].isNull())
ticketsObject.creatorId = value["CreatorId"].asString();
if(!value["CreateTime"].isNull())
ticketsObject.createTime = value["CreateTime"].asString();
if(!value["CustomFields"].isNull())
ticketsObject.customFields = value["CustomFields"].asString();
tickets_.push_back(ticketsObject);
}
if(!value["PageNum"].isNull())
pageNum_ = std::stoi(value["PageNum"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["TotalCount"].isNull())
totalCount_ = std::stol(value["TotalCount"].asString());
}
long QueryTicketResult::getTotalCount()const
{
return totalCount_;
}
int QueryTicketResult::getPageNum()const
{
return pageNum_;
}
int QueryTicketResult::getPageSize()const
{
return pageSize_;
}
std::vector<QueryTicketResult::Ticket> QueryTicketResult::getTickets()const
{
return tickets_;
}