Compare commits
10 Commits
1.36.377
...
patch/2020
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a13d778e7b | ||
|
|
f16150baca | ||
|
|
a51834c8d0 | ||
|
|
23bea0505a | ||
|
|
8c15acf5c8 | ||
|
|
00cb41817f | ||
|
|
f90eac2a6c | ||
|
|
f69779be3f | ||
|
|
feab9dcc06 | ||
|
|
d1c3599e3d |
25
CHANGELOG
25
CHANGELOG
@@ -1,3 +1,28 @@
|
||||
2020-04-28 Version: 1.36.385
|
||||
- Generated 2019-03-15 for `fnf`.
|
||||
|
||||
2020-04-28 Version: 1.36.384
|
||||
- Add CompareFaceVerify API.
|
||||
|
||||
2020-04-27 Version: 1.36.383
|
||||
- Support watermark.
|
||||
|
||||
2020-04-27 Version: 1.36.382
|
||||
- Describe describeAvailableResource.
|
||||
|
||||
2020-04-27 Version: 1.36.381
|
||||
- ContrastFaceVerify Return SubCode.
|
||||
|
||||
2020-04-27 Version: 1.36.380
|
||||
- Generated 2019-01-01 for `Cassandra`.
|
||||
|
||||
2020-04-26 Version: 1.36.379
|
||||
- New api publish.
|
||||
|
||||
2020-04-25 Version: 1.36.378
|
||||
- Generated 2015-01-01 for `R-kvstore`.
|
||||
- Add RestoreTime for CreateInstance API.
|
||||
|
||||
2020-04-24 Version: 1.36.377
|
||||
- Publish apis for ledger instances.
|
||||
- Publish apis for members.
|
||||
|
||||
@@ -21,6 +21,8 @@ set(cloudauth_public_header
|
||||
include/alibabacloud/cloudauth/CloudauthExport.h )
|
||||
|
||||
set(cloudauth_public_header_model
|
||||
include/alibabacloud/cloudauth/model/CompareFaceVerifyRequest.h
|
||||
include/alibabacloud/cloudauth/model/CompareFaceVerifyResult.h
|
||||
include/alibabacloud/cloudauth/model/CompareFacesRequest.h
|
||||
include/alibabacloud/cloudauth/model/CompareFacesResult.h
|
||||
include/alibabacloud/cloudauth/model/ContrastFaceVerifyRequest.h
|
||||
@@ -84,6 +86,8 @@ set(cloudauth_public_header_model
|
||||
|
||||
set(cloudauth_src
|
||||
src/CloudauthClient.cc
|
||||
src/model/CompareFaceVerifyRequest.cc
|
||||
src/model/CompareFaceVerifyResult.cc
|
||||
src/model/CompareFacesRequest.cc
|
||||
src/model/CompareFacesResult.cc
|
||||
src/model/ContrastFaceVerifyRequest.cc
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#include <alibabacloud/core/EndpointProvider.h>
|
||||
#include <alibabacloud/core/RpcServiceClient.h>
|
||||
#include "CloudauthExport.h"
|
||||
#include "model/CompareFaceVerifyRequest.h"
|
||||
#include "model/CompareFaceVerifyResult.h"
|
||||
#include "model/CompareFacesRequest.h"
|
||||
#include "model/CompareFacesResult.h"
|
||||
#include "model/ContrastFaceVerifyRequest.h"
|
||||
@@ -91,6 +93,9 @@ namespace AlibabaCloud
|
||||
class ALIBABACLOUD_CLOUDAUTH_EXPORT CloudauthClient : public RpcServiceClient
|
||||
{
|
||||
public:
|
||||
typedef Outcome<Error, Model::CompareFaceVerifyResult> CompareFaceVerifyOutcome;
|
||||
typedef std::future<CompareFaceVerifyOutcome> CompareFaceVerifyOutcomeCallable;
|
||||
typedef std::function<void(const CloudauthClient*, const Model::CompareFaceVerifyRequest&, const CompareFaceVerifyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CompareFaceVerifyAsyncHandler;
|
||||
typedef Outcome<Error, Model::CompareFacesResult> CompareFacesOutcome;
|
||||
typedef std::future<CompareFacesOutcome> CompareFacesOutcomeCallable;
|
||||
typedef std::function<void(const CloudauthClient*, const Model::CompareFacesRequest&, const CompareFacesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CompareFacesAsyncHandler;
|
||||
@@ -186,6 +191,9 @@ namespace AlibabaCloud
|
||||
CloudauthClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||
CloudauthClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||
~CloudauthClient();
|
||||
CompareFaceVerifyOutcome compareFaceVerify(const Model::CompareFaceVerifyRequest &request)const;
|
||||
void compareFaceVerifyAsync(const Model::CompareFaceVerifyRequest& request, const CompareFaceVerifyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CompareFaceVerifyOutcomeCallable compareFaceVerifyCallable(const Model::CompareFaceVerifyRequest& request) const;
|
||||
CompareFacesOutcome compareFaces(const Model::CompareFacesRequest &request)const;
|
||||
void compareFacesAsync(const Model::CompareFacesRequest& request, const CompareFacesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CompareFacesOutcomeCallable compareFacesCallable(const Model::CompareFacesRequest& request) const;
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* 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_CLOUDAUTH_MODEL_COMPAREFACEVERIFYREQUEST_H_
|
||||
#define ALIBABACLOUD_CLOUDAUTH_MODEL_COMPAREFACEVERIFYREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/cloudauth/CloudauthExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cloudauth
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CLOUDAUTH_EXPORT CompareFaceVerifyRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
CompareFaceVerifyRequest();
|
||||
~CompareFaceVerifyRequest();
|
||||
|
||||
std::string getTargetFaceContrastPictureUrl()const;
|
||||
void setTargetFaceContrastPictureUrl(const std::string& targetFaceContrastPictureUrl);
|
||||
std::string getProductCode()const;
|
||||
void setProductCode(const std::string& productCode);
|
||||
std::string getTargetCertifyId()const;
|
||||
void setTargetCertifyId(const std::string& targetCertifyId);
|
||||
std::string getSourceOssObjectName()const;
|
||||
void setSourceOssObjectName(const std::string& sourceOssObjectName);
|
||||
std::string getTargetFaceContrastPicture()const;
|
||||
void setTargetFaceContrastPicture(const std::string& targetFaceContrastPicture);
|
||||
std::string getTargetOssBucketName()const;
|
||||
void setTargetOssBucketName(const std::string& targetOssBucketName);
|
||||
std::string getSourceOssBucketName()const;
|
||||
void setSourceOssBucketName(const std::string& sourceOssBucketName);
|
||||
std::string getOuterOrderNo()const;
|
||||
void setOuterOrderNo(const std::string& outerOrderNo);
|
||||
std::string getTargetOssObjectName()const;
|
||||
void setTargetOssObjectName(const std::string& targetOssObjectName);
|
||||
std::string getSourceFaceContrastPicture()const;
|
||||
void setSourceFaceContrastPicture(const std::string& sourceFaceContrastPicture);
|
||||
long getSceneId()const;
|
||||
void setSceneId(long sceneId);
|
||||
std::string getSourceFaceContrastPictureUrl()const;
|
||||
void setSourceFaceContrastPictureUrl(const std::string& sourceFaceContrastPictureUrl);
|
||||
std::string getSourceCertifyId()const;
|
||||
void setSourceCertifyId(const std::string& sourceCertifyId);
|
||||
|
||||
private:
|
||||
std::string targetFaceContrastPictureUrl_;
|
||||
std::string productCode_;
|
||||
std::string targetCertifyId_;
|
||||
std::string sourceOssObjectName_;
|
||||
std::string targetFaceContrastPicture_;
|
||||
std::string targetOssBucketName_;
|
||||
std::string sourceOssBucketName_;
|
||||
std::string outerOrderNo_;
|
||||
std::string targetOssObjectName_;
|
||||
std::string sourceFaceContrastPicture_;
|
||||
long sceneId_;
|
||||
std::string sourceFaceContrastPictureUrl_;
|
||||
std::string sourceCertifyId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CLOUDAUTH_MODEL_COMPAREFACEVERIFYREQUEST_H_
|
||||
@@ -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_CLOUDAUTH_MODEL_COMPAREFACEVERIFYRESULT_H_
|
||||
#define ALIBABACLOUD_CLOUDAUTH_MODEL_COMPAREFACEVERIFYRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/cloudauth/CloudauthExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cloudauth
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CLOUDAUTH_EXPORT CompareFaceVerifyResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct ResultObject
|
||||
{
|
||||
std::string passed;
|
||||
float verifyScore;
|
||||
};
|
||||
|
||||
|
||||
CompareFaceVerifyResult();
|
||||
explicit CompareFaceVerifyResult(const std::string &payload);
|
||||
~CompareFaceVerifyResult();
|
||||
ResultObject getResultObject()const;
|
||||
std::string getMessage()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
ResultObject resultObject_;
|
||||
std::string message_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CLOUDAUTH_MODEL_COMPAREFACEVERIFYRESULT_H_
|
||||
@@ -37,6 +37,7 @@ namespace AlibabaCloud
|
||||
std::string passed;
|
||||
std::string identityInfo;
|
||||
std::string materialInfo;
|
||||
std::string subCode;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ namespace AlibabaCloud
|
||||
VerifyDeviceRequest();
|
||||
~VerifyDeviceRequest();
|
||||
|
||||
std::string getExtInfo()const;
|
||||
void setExtInfo(const std::string& extInfo);
|
||||
std::string getCertifyData()const;
|
||||
void setCertifyData(const std::string& certifyData);
|
||||
std::string getAppVersion()const;
|
||||
@@ -43,6 +45,7 @@ namespace AlibabaCloud
|
||||
void setCertifyId(const std::string& certifyId);
|
||||
|
||||
private:
|
||||
std::string extInfo_;
|
||||
std::string certifyData_;
|
||||
std::string appVersion_;
|
||||
std::string certifyId_;
|
||||
|
||||
@@ -51,6 +51,42 @@ CloudauthClient::CloudauthClient(const std::string & accessKeyId, const std::str
|
||||
CloudauthClient::~CloudauthClient()
|
||||
{}
|
||||
|
||||
CloudauthClient::CompareFaceVerifyOutcome CloudauthClient::compareFaceVerify(const CompareFaceVerifyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CompareFaceVerifyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CompareFaceVerifyOutcome(CompareFaceVerifyResult(outcome.result()));
|
||||
else
|
||||
return CompareFaceVerifyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CloudauthClient::compareFaceVerifyAsync(const CompareFaceVerifyRequest& request, const CompareFaceVerifyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, compareFaceVerify(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CloudauthClient::CompareFaceVerifyOutcomeCallable CloudauthClient::compareFaceVerifyCallable(const CompareFaceVerifyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CompareFaceVerifyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->compareFaceVerify(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CloudauthClient::CompareFacesOutcome CloudauthClient::compareFaces(const CompareFacesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
172
cloudauth/src/model/CompareFaceVerifyRequest.cc
Normal file
172
cloudauth/src/model/CompareFaceVerifyRequest.cc
Normal file
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* 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/cloudauth/model/CompareFaceVerifyRequest.h>
|
||||
|
||||
using AlibabaCloud::Cloudauth::Model::CompareFaceVerifyRequest;
|
||||
|
||||
CompareFaceVerifyRequest::CompareFaceVerifyRequest() :
|
||||
RpcServiceRequest("cloudauth", "2019-03-07", "CompareFaceVerify")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CompareFaceVerifyRequest::~CompareFaceVerifyRequest()
|
||||
{}
|
||||
|
||||
std::string CompareFaceVerifyRequest::getTargetFaceContrastPictureUrl()const
|
||||
{
|
||||
return targetFaceContrastPictureUrl_;
|
||||
}
|
||||
|
||||
void CompareFaceVerifyRequest::setTargetFaceContrastPictureUrl(const std::string& targetFaceContrastPictureUrl)
|
||||
{
|
||||
targetFaceContrastPictureUrl_ = targetFaceContrastPictureUrl;
|
||||
setBodyParameter("TargetFaceContrastPictureUrl", targetFaceContrastPictureUrl);
|
||||
}
|
||||
|
||||
std::string CompareFaceVerifyRequest::getProductCode()const
|
||||
{
|
||||
return productCode_;
|
||||
}
|
||||
|
||||
void CompareFaceVerifyRequest::setProductCode(const std::string& productCode)
|
||||
{
|
||||
productCode_ = productCode;
|
||||
setBodyParameter("ProductCode", productCode);
|
||||
}
|
||||
|
||||
std::string CompareFaceVerifyRequest::getTargetCertifyId()const
|
||||
{
|
||||
return targetCertifyId_;
|
||||
}
|
||||
|
||||
void CompareFaceVerifyRequest::setTargetCertifyId(const std::string& targetCertifyId)
|
||||
{
|
||||
targetCertifyId_ = targetCertifyId;
|
||||
setBodyParameter("TargetCertifyId", targetCertifyId);
|
||||
}
|
||||
|
||||
std::string CompareFaceVerifyRequest::getSourceOssObjectName()const
|
||||
{
|
||||
return sourceOssObjectName_;
|
||||
}
|
||||
|
||||
void CompareFaceVerifyRequest::setSourceOssObjectName(const std::string& sourceOssObjectName)
|
||||
{
|
||||
sourceOssObjectName_ = sourceOssObjectName;
|
||||
setBodyParameter("SourceOssObjectName", sourceOssObjectName);
|
||||
}
|
||||
|
||||
std::string CompareFaceVerifyRequest::getTargetFaceContrastPicture()const
|
||||
{
|
||||
return targetFaceContrastPicture_;
|
||||
}
|
||||
|
||||
void CompareFaceVerifyRequest::setTargetFaceContrastPicture(const std::string& targetFaceContrastPicture)
|
||||
{
|
||||
targetFaceContrastPicture_ = targetFaceContrastPicture;
|
||||
setBodyParameter("TargetFaceContrastPicture", targetFaceContrastPicture);
|
||||
}
|
||||
|
||||
std::string CompareFaceVerifyRequest::getTargetOssBucketName()const
|
||||
{
|
||||
return targetOssBucketName_;
|
||||
}
|
||||
|
||||
void CompareFaceVerifyRequest::setTargetOssBucketName(const std::string& targetOssBucketName)
|
||||
{
|
||||
targetOssBucketName_ = targetOssBucketName;
|
||||
setBodyParameter("TargetOssBucketName", targetOssBucketName);
|
||||
}
|
||||
|
||||
std::string CompareFaceVerifyRequest::getSourceOssBucketName()const
|
||||
{
|
||||
return sourceOssBucketName_;
|
||||
}
|
||||
|
||||
void CompareFaceVerifyRequest::setSourceOssBucketName(const std::string& sourceOssBucketName)
|
||||
{
|
||||
sourceOssBucketName_ = sourceOssBucketName;
|
||||
setBodyParameter("SourceOssBucketName", sourceOssBucketName);
|
||||
}
|
||||
|
||||
std::string CompareFaceVerifyRequest::getOuterOrderNo()const
|
||||
{
|
||||
return outerOrderNo_;
|
||||
}
|
||||
|
||||
void CompareFaceVerifyRequest::setOuterOrderNo(const std::string& outerOrderNo)
|
||||
{
|
||||
outerOrderNo_ = outerOrderNo;
|
||||
setBodyParameter("OuterOrderNo", outerOrderNo);
|
||||
}
|
||||
|
||||
std::string CompareFaceVerifyRequest::getTargetOssObjectName()const
|
||||
{
|
||||
return targetOssObjectName_;
|
||||
}
|
||||
|
||||
void CompareFaceVerifyRequest::setTargetOssObjectName(const std::string& targetOssObjectName)
|
||||
{
|
||||
targetOssObjectName_ = targetOssObjectName;
|
||||
setBodyParameter("TargetOssObjectName", targetOssObjectName);
|
||||
}
|
||||
|
||||
std::string CompareFaceVerifyRequest::getSourceFaceContrastPicture()const
|
||||
{
|
||||
return sourceFaceContrastPicture_;
|
||||
}
|
||||
|
||||
void CompareFaceVerifyRequest::setSourceFaceContrastPicture(const std::string& sourceFaceContrastPicture)
|
||||
{
|
||||
sourceFaceContrastPicture_ = sourceFaceContrastPicture;
|
||||
setBodyParameter("SourceFaceContrastPicture", sourceFaceContrastPicture);
|
||||
}
|
||||
|
||||
long CompareFaceVerifyRequest::getSceneId()const
|
||||
{
|
||||
return sceneId_;
|
||||
}
|
||||
|
||||
void CompareFaceVerifyRequest::setSceneId(long sceneId)
|
||||
{
|
||||
sceneId_ = sceneId;
|
||||
setBodyParameter("SceneId", std::to_string(sceneId));
|
||||
}
|
||||
|
||||
std::string CompareFaceVerifyRequest::getSourceFaceContrastPictureUrl()const
|
||||
{
|
||||
return sourceFaceContrastPictureUrl_;
|
||||
}
|
||||
|
||||
void CompareFaceVerifyRequest::setSourceFaceContrastPictureUrl(const std::string& sourceFaceContrastPictureUrl)
|
||||
{
|
||||
sourceFaceContrastPictureUrl_ = sourceFaceContrastPictureUrl;
|
||||
setBodyParameter("SourceFaceContrastPictureUrl", sourceFaceContrastPictureUrl);
|
||||
}
|
||||
|
||||
std::string CompareFaceVerifyRequest::getSourceCertifyId()const
|
||||
{
|
||||
return sourceCertifyId_;
|
||||
}
|
||||
|
||||
void CompareFaceVerifyRequest::setSourceCertifyId(const std::string& sourceCertifyId)
|
||||
{
|
||||
sourceCertifyId_ = sourceCertifyId;
|
||||
setBodyParameter("SourceCertifyId", sourceCertifyId);
|
||||
}
|
||||
|
||||
68
cloudauth/src/model/CompareFaceVerifyResult.cc
Normal file
68
cloudauth/src/model/CompareFaceVerifyResult.cc
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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/cloudauth/model/CompareFaceVerifyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cloudauth;
|
||||
using namespace AlibabaCloud::Cloudauth::Model;
|
||||
|
||||
CompareFaceVerifyResult::CompareFaceVerifyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CompareFaceVerifyResult::CompareFaceVerifyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CompareFaceVerifyResult::~CompareFaceVerifyResult()
|
||||
{}
|
||||
|
||||
void CompareFaceVerifyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto resultObjectNode = value["ResultObject"];
|
||||
if(!resultObjectNode["Passed"].isNull())
|
||||
resultObject_.passed = resultObjectNode["Passed"].asString();
|
||||
if(!resultObjectNode["VerifyScore"].isNull())
|
||||
resultObject_.verifyScore = std::stof(resultObjectNode["VerifyScore"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
|
||||
}
|
||||
|
||||
CompareFaceVerifyResult::ResultObject CompareFaceVerifyResult::getResultObject()const
|
||||
{
|
||||
return resultObject_;
|
||||
}
|
||||
|
||||
std::string CompareFaceVerifyResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string CompareFaceVerifyResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
@@ -46,6 +46,8 @@ void ContrastFaceVerifyResult::parse(const std::string &payload)
|
||||
resultObject_.identityInfo = resultObjectNode["IdentityInfo"].asString();
|
||||
if(!resultObjectNode["MaterialInfo"].isNull())
|
||||
resultObject_.materialInfo = resultObjectNode["MaterialInfo"].asString();
|
||||
if(!resultObjectNode["SubCode"].isNull())
|
||||
resultObject_.subCode = resultObjectNode["SubCode"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
|
||||
@@ -27,6 +27,17 @@ VerifyDeviceRequest::VerifyDeviceRequest() :
|
||||
VerifyDeviceRequest::~VerifyDeviceRequest()
|
||||
{}
|
||||
|
||||
std::string VerifyDeviceRequest::getExtInfo()const
|
||||
{
|
||||
return extInfo_;
|
||||
}
|
||||
|
||||
void VerifyDeviceRequest::setExtInfo(const std::string& extInfo)
|
||||
{
|
||||
extInfo_ = extInfo;
|
||||
setBodyParameter("ExtInfo", extInfo);
|
||||
}
|
||||
|
||||
std::string VerifyDeviceRequest::getCertifyData()const
|
||||
{
|
||||
return certifyData_;
|
||||
|
||||
@@ -145,6 +145,7 @@ CurlHttpClient::makeRequest(const HttpRequest &request) {
|
||||
curl_easy_setopt(curlHandle_, CURLOPT_READFUNCTION, readCallback);
|
||||
curl_easy_setopt(curlHandle_, CURLOPT_UPLOAD, 1L);
|
||||
curl_easy_setopt(curlHandle_, CURLOPT_READDATA, ctx);
|
||||
free(ctx);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -194,6 +195,7 @@ CurlHttpClient::makeRequest(const HttpRequest &request) {
|
||||
}
|
||||
|
||||
CURLcode res = curl_easy_perform(curlHandle_);
|
||||
curl_slist_free_all(list);
|
||||
switch (res) {
|
||||
case CURLE_OK: {
|
||||
long response_code;
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
#include <iomanip>
|
||||
#include <json/json.h>
|
||||
#include <sstream>
|
||||
#include <thread>
|
||||
#include <mutex>
|
||||
#include <condition_variable>
|
||||
|
||||
#ifndef WIN32
|
||||
#include "LocalEndpoints.h"
|
||||
@@ -39,7 +42,10 @@ namespace
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
std::mutex mutex;
|
||||
std::condition_variable cv;
|
||||
bool local_endpoints_loaded = false;
|
||||
bool local_endpoints_loading = false;
|
||||
typedef std::string productType;
|
||||
typedef std::string regionType;
|
||||
typedef std::string endpointType;
|
||||
@@ -60,6 +66,8 @@ static void LoadLocalEndpoints()
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
std::unique_lock<std::mutex> lock(mutex);
|
||||
|
||||
if (local_endpoints_loaded)
|
||||
{
|
||||
return;
|
||||
@@ -76,6 +84,10 @@ static void LoadLocalEndpoints()
|
||||
return;
|
||||
}
|
||||
|
||||
cv.wait(lock, [] { return !local_endpoints_loading; });// continue if loading completed
|
||||
|
||||
local_endpoints_loading = true;
|
||||
|
||||
auto regions = value["regions"];
|
||||
for (const auto ®ion : regions)
|
||||
{
|
||||
@@ -107,6 +119,10 @@ static void LoadLocalEndpoints()
|
||||
allLocalEndpoints[product] = p;
|
||||
}
|
||||
local_endpoints_loaded = true;
|
||||
local_endpoints_loading = false;
|
||||
|
||||
lock.unlock();
|
||||
cv.notify_one();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -139,7 +139,7 @@ HttpMessage::HeaderValueType HttpMessage::header(KnownHeader header)const {
|
||||
|
||||
void HttpMessage::setBody(const char *data, size_t size) {
|
||||
if (body_)
|
||||
delete body_;
|
||||
delete[] body_;
|
||||
body_ = nullptr;
|
||||
bodySize_ = 0;
|
||||
if (size) {
|
||||
|
||||
@@ -47,6 +47,8 @@ namespace AlibabaCloud
|
||||
void setName(const std::string& name);
|
||||
std::string getDefinition()const;
|
||||
void setDefinition(const std::string& definition);
|
||||
std::string getExternalStorageLocation()const;
|
||||
void setExternalStorageLocation(const std::string& externalStorageLocation);
|
||||
|
||||
private:
|
||||
std::string description_;
|
||||
@@ -55,6 +57,7 @@ namespace AlibabaCloud
|
||||
std::string roleArn_;
|
||||
std::string name_;
|
||||
std::string definition_;
|
||||
std::string externalStorageLocation_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ namespace AlibabaCloud
|
||||
std::string getDefinition()const;
|
||||
std::string getLastModifiedTime()const;
|
||||
std::string getId()const;
|
||||
std::string getExternalStorageLocation()const;
|
||||
std::string getRoleArn()const;
|
||||
std::string getName()const;
|
||||
|
||||
@@ -55,6 +56,7 @@ namespace AlibabaCloud
|
||||
std::string definition_;
|
||||
std::string lastModifiedTime_;
|
||||
std::string id_;
|
||||
std::string externalStorageLocation_;
|
||||
std::string roleArn_;
|
||||
std::string name_;
|
||||
|
||||
|
||||
@@ -42,7 +42,9 @@ namespace AlibabaCloud
|
||||
std::string getStoppedTime()const;
|
||||
std::string getFlowName()const;
|
||||
std::string getOutput()const;
|
||||
std::string getExternalOutputUri()const;
|
||||
std::string getStartedTime()const;
|
||||
std::string getExternalInputUri()const;
|
||||
std::string getFlowDefinition()const;
|
||||
std::string getName()const;
|
||||
|
||||
@@ -54,7 +56,9 @@ namespace AlibabaCloud
|
||||
std::string stoppedTime_;
|
||||
std::string flowName_;
|
||||
std::string output_;
|
||||
std::string externalOutputUri_;
|
||||
std::string startedTime_;
|
||||
std::string externalInputUri_;
|
||||
std::string flowDefinition_;
|
||||
std::string name_;
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ namespace AlibabaCloud
|
||||
std::string getDefinition()const;
|
||||
std::string getLastModifiedTime()const;
|
||||
std::string getId()const;
|
||||
std::string getExternalStorageLocation()const;
|
||||
std::string getRoleArn()const;
|
||||
std::string getName()const;
|
||||
|
||||
@@ -55,6 +56,7 @@ namespace AlibabaCloud
|
||||
std::string definition_;
|
||||
std::string lastModifiedTime_;
|
||||
std::string id_;
|
||||
std::string externalStorageLocation_;
|
||||
std::string roleArn_;
|
||||
std::string name_;
|
||||
|
||||
|
||||
@@ -39,7 +39,9 @@ namespace AlibabaCloud
|
||||
std::string stoppedTime;
|
||||
std::string flowName;
|
||||
std::string output;
|
||||
std::string externalOutputUri;
|
||||
std::string startedTime;
|
||||
std::string externalInputUri;
|
||||
std::string flowDefinition;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace AlibabaCloud
|
||||
std::string definition;
|
||||
std::string lastModifiedTime;
|
||||
std::string id;
|
||||
std::string externalStorageLocation;
|
||||
std::string roleArn;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
@@ -42,7 +42,9 @@ namespace AlibabaCloud
|
||||
std::string getStoppedTime()const;
|
||||
std::string getFlowName()const;
|
||||
std::string getOutput()const;
|
||||
std::string getExternalOutputUri()const;
|
||||
std::string getStartedTime()const;
|
||||
std::string getExternalInputUri()const;
|
||||
std::string getFlowDefinition()const;
|
||||
std::string getName()const;
|
||||
|
||||
@@ -54,7 +56,9 @@ namespace AlibabaCloud
|
||||
std::string stoppedTime_;
|
||||
std::string flowName_;
|
||||
std::string output_;
|
||||
std::string externalOutputUri_;
|
||||
std::string startedTime_;
|
||||
std::string externalInputUri_;
|
||||
std::string flowDefinition_;
|
||||
std::string name_;
|
||||
|
||||
|
||||
@@ -42,7 +42,9 @@ namespace AlibabaCloud
|
||||
std::string getStoppedTime()const;
|
||||
std::string getFlowName()const;
|
||||
std::string getOutput()const;
|
||||
std::string getExternalOutputUri()const;
|
||||
std::string getStartedTime()const;
|
||||
std::string getExternalInputUri()const;
|
||||
std::string getFlowDefinition()const;
|
||||
std::string getName()const;
|
||||
|
||||
@@ -54,7 +56,9 @@ namespace AlibabaCloud
|
||||
std::string stoppedTime_;
|
||||
std::string flowName_;
|
||||
std::string output_;
|
||||
std::string externalOutputUri_;
|
||||
std::string startedTime_;
|
||||
std::string externalInputUri_;
|
||||
std::string flowDefinition_;
|
||||
std::string name_;
|
||||
|
||||
|
||||
@@ -47,6 +47,8 @@ namespace AlibabaCloud
|
||||
void setName(const std::string& name);
|
||||
std::string getDefinition()const;
|
||||
void setDefinition(const std::string& definition);
|
||||
std::string getExternalStorageLocation()const;
|
||||
void setExternalStorageLocation(const std::string& externalStorageLocation);
|
||||
|
||||
private:
|
||||
std::string description_;
|
||||
@@ -55,6 +57,7 @@ namespace AlibabaCloud
|
||||
std::string roleArn_;
|
||||
std::string name_;
|
||||
std::string definition_;
|
||||
std::string externalStorageLocation_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ namespace AlibabaCloud
|
||||
std::string getDefinition()const;
|
||||
std::string getLastModifiedTime()const;
|
||||
std::string getId()const;
|
||||
std::string getExternalStorageLocation()const;
|
||||
std::string getRoleArn()const;
|
||||
std::string getName()const;
|
||||
|
||||
@@ -55,6 +56,7 @@ namespace AlibabaCloud
|
||||
std::string definition_;
|
||||
std::string lastModifiedTime_;
|
||||
std::string id_;
|
||||
std::string externalStorageLocation_;
|
||||
std::string roleArn_;
|
||||
std::string name_;
|
||||
|
||||
|
||||
@@ -93,3 +93,14 @@ void CreateFlowRequest::setDefinition(const std::string& definition)
|
||||
setBodyParameter("Definition", definition);
|
||||
}
|
||||
|
||||
std::string CreateFlowRequest::getExternalStorageLocation()const
|
||||
{
|
||||
return externalStorageLocation_;
|
||||
}
|
||||
|
||||
void CreateFlowRequest::setExternalStorageLocation(const std::string& externalStorageLocation)
|
||||
{
|
||||
externalStorageLocation_ = externalStorageLocation;
|
||||
setBodyParameter("ExternalStorageLocation", externalStorageLocation);
|
||||
}
|
||||
|
||||
|
||||
@@ -55,6 +55,8 @@ void CreateFlowResult::parse(const std::string &payload)
|
||||
createdTime_ = value["CreatedTime"].asString();
|
||||
if(!value["LastModifiedTime"].isNull())
|
||||
lastModifiedTime_ = value["LastModifiedTime"].asString();
|
||||
if(!value["ExternalStorageLocation"].isNull())
|
||||
externalStorageLocation_ = value["ExternalStorageLocation"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -88,6 +90,11 @@ std::string CreateFlowResult::getId()const
|
||||
return id_;
|
||||
}
|
||||
|
||||
std::string CreateFlowResult::getExternalStorageLocation()const
|
||||
{
|
||||
return externalStorageLocation_;
|
||||
}
|
||||
|
||||
std::string CreateFlowResult::getRoleArn()const
|
||||
{
|
||||
return roleArn_;
|
||||
|
||||
@@ -55,6 +55,10 @@ void DescribeExecutionResult::parse(const std::string &payload)
|
||||
startedTime_ = value["StartedTime"].asString();
|
||||
if(!value["StoppedTime"].isNull())
|
||||
stoppedTime_ = value["StoppedTime"].asString();
|
||||
if(!value["ExternalInputUri"].isNull())
|
||||
externalInputUri_ = value["ExternalInputUri"].asString();
|
||||
if(!value["ExternalOutputUri"].isNull())
|
||||
externalOutputUri_ = value["ExternalOutputUri"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -83,11 +87,21 @@ std::string DescribeExecutionResult::getOutput()const
|
||||
return output_;
|
||||
}
|
||||
|
||||
std::string DescribeExecutionResult::getExternalOutputUri()const
|
||||
{
|
||||
return externalOutputUri_;
|
||||
}
|
||||
|
||||
std::string DescribeExecutionResult::getStartedTime()const
|
||||
{
|
||||
return startedTime_;
|
||||
}
|
||||
|
||||
std::string DescribeExecutionResult::getExternalInputUri()const
|
||||
{
|
||||
return externalInputUri_;
|
||||
}
|
||||
|
||||
std::string DescribeExecutionResult::getFlowDefinition()const
|
||||
{
|
||||
return flowDefinition_;
|
||||
|
||||
@@ -55,6 +55,8 @@ void DescribeFlowResult::parse(const std::string &payload)
|
||||
createdTime_ = value["CreatedTime"].asString();
|
||||
if(!value["LastModifiedTime"].isNull())
|
||||
lastModifiedTime_ = value["LastModifiedTime"].asString();
|
||||
if(!value["ExternalStorageLocation"].isNull())
|
||||
externalStorageLocation_ = value["ExternalStorageLocation"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -88,6 +90,11 @@ std::string DescribeFlowResult::getId()const
|
||||
return id_;
|
||||
}
|
||||
|
||||
std::string DescribeFlowResult::getExternalStorageLocation()const
|
||||
{
|
||||
return externalStorageLocation_;
|
||||
}
|
||||
|
||||
std::string DescribeFlowResult::getRoleArn()const
|
||||
{
|
||||
return roleArn_;
|
||||
|
||||
@@ -59,6 +59,10 @@ void ListExecutionsResult::parse(const std::string &payload)
|
||||
executionsObject.startedTime = valueExecutionsExecutionsItem["StartedTime"].asString();
|
||||
if(!valueExecutionsExecutionsItem["StoppedTime"].isNull())
|
||||
executionsObject.stoppedTime = valueExecutionsExecutionsItem["StoppedTime"].asString();
|
||||
if(!valueExecutionsExecutionsItem["ExternalInputUri"].isNull())
|
||||
executionsObject.externalInputUri = valueExecutionsExecutionsItem["ExternalInputUri"].asString();
|
||||
if(!valueExecutionsExecutionsItem["ExternalOutputUri"].isNull())
|
||||
executionsObject.externalOutputUri = valueExecutionsExecutionsItem["ExternalOutputUri"].asString();
|
||||
executions_.push_back(executionsObject);
|
||||
}
|
||||
if(!value["NextToken"].isNull())
|
||||
|
||||
@@ -59,6 +59,8 @@ void ListFlowsResult::parse(const std::string &payload)
|
||||
flowsObject.createdTime = valueFlowsFlowsItem["CreatedTime"].asString();
|
||||
if(!valueFlowsFlowsItem["LastModifiedTime"].isNull())
|
||||
flowsObject.lastModifiedTime = valueFlowsFlowsItem["LastModifiedTime"].asString();
|
||||
if(!valueFlowsFlowsItem["ExternalStorageLocation"].isNull())
|
||||
flowsObject.externalStorageLocation = valueFlowsFlowsItem["ExternalStorageLocation"].asString();
|
||||
flows_.push_back(flowsObject);
|
||||
}
|
||||
if(!value["NextToken"].isNull())
|
||||
|
||||
@@ -55,6 +55,10 @@ void StartExecutionResult::parse(const std::string &payload)
|
||||
startedTime_ = value["StartedTime"].asString();
|
||||
if(!value["StoppedTime"].isNull())
|
||||
stoppedTime_ = value["StoppedTime"].asString();
|
||||
if(!value["ExternalInputUri"].isNull())
|
||||
externalInputUri_ = value["ExternalInputUri"].asString();
|
||||
if(!value["ExternalOutputUri"].isNull())
|
||||
externalOutputUri_ = value["ExternalOutputUri"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -83,11 +87,21 @@ std::string StartExecutionResult::getOutput()const
|
||||
return output_;
|
||||
}
|
||||
|
||||
std::string StartExecutionResult::getExternalOutputUri()const
|
||||
{
|
||||
return externalOutputUri_;
|
||||
}
|
||||
|
||||
std::string StartExecutionResult::getStartedTime()const
|
||||
{
|
||||
return startedTime_;
|
||||
}
|
||||
|
||||
std::string StartExecutionResult::getExternalInputUri()const
|
||||
{
|
||||
return externalInputUri_;
|
||||
}
|
||||
|
||||
std::string StartExecutionResult::getFlowDefinition()const
|
||||
{
|
||||
return flowDefinition_;
|
||||
|
||||
@@ -55,6 +55,10 @@ void StopExecutionResult::parse(const std::string &payload)
|
||||
startedTime_ = value["StartedTime"].asString();
|
||||
if(!value["StoppedTime"].isNull())
|
||||
stoppedTime_ = value["StoppedTime"].asString();
|
||||
if(!value["ExternalInputUri"].isNull())
|
||||
externalInputUri_ = value["ExternalInputUri"].asString();
|
||||
if(!value["ExternalOutputUri"].isNull())
|
||||
externalOutputUri_ = value["ExternalOutputUri"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -83,11 +87,21 @@ std::string StopExecutionResult::getOutput()const
|
||||
return output_;
|
||||
}
|
||||
|
||||
std::string StopExecutionResult::getExternalOutputUri()const
|
||||
{
|
||||
return externalOutputUri_;
|
||||
}
|
||||
|
||||
std::string StopExecutionResult::getStartedTime()const
|
||||
{
|
||||
return startedTime_;
|
||||
}
|
||||
|
||||
std::string StopExecutionResult::getExternalInputUri()const
|
||||
{
|
||||
return externalInputUri_;
|
||||
}
|
||||
|
||||
std::string StopExecutionResult::getFlowDefinition()const
|
||||
{
|
||||
return flowDefinition_;
|
||||
|
||||
@@ -93,3 +93,14 @@ void UpdateFlowRequest::setDefinition(const std::string& definition)
|
||||
setBodyParameter("Definition", definition);
|
||||
}
|
||||
|
||||
std::string UpdateFlowRequest::getExternalStorageLocation()const
|
||||
{
|
||||
return externalStorageLocation_;
|
||||
}
|
||||
|
||||
void UpdateFlowRequest::setExternalStorageLocation(const std::string& externalStorageLocation)
|
||||
{
|
||||
externalStorageLocation_ = externalStorageLocation;
|
||||
setBodyParameter("ExternalStorageLocation", externalStorageLocation);
|
||||
}
|
||||
|
||||
|
||||
@@ -55,6 +55,8 @@ void UpdateFlowResult::parse(const std::string &payload)
|
||||
createdTime_ = value["CreatedTime"].asString();
|
||||
if(!value["LastModifiedTime"].isNull())
|
||||
lastModifiedTime_ = value["LastModifiedTime"].asString();
|
||||
if(!value["ExternalStorageLocation"].isNull())
|
||||
externalStorageLocation_ = value["ExternalStorageLocation"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -88,6 +90,11 @@ std::string UpdateFlowResult::getId()const
|
||||
return id_;
|
||||
}
|
||||
|
||||
std::string UpdateFlowResult::getExternalStorageLocation()const
|
||||
{
|
||||
return externalStorageLocation_;
|
||||
}
|
||||
|
||||
std::string UpdateFlowResult::getRoleArn()const
|
||||
{
|
||||
return roleArn_;
|
||||
|
||||
@@ -31,8 +31,6 @@ set(hbase_public_header_model
|
||||
include/alibabacloud/hbase/model/CreateClusterResult.h
|
||||
include/alibabacloud/hbase/model/CreateHbaseHaSlbRequest.h
|
||||
include/alibabacloud/hbase/model/CreateHbaseHaSlbResult.h
|
||||
include/alibabacloud/hbase/model/CreateInstanceRequest.h
|
||||
include/alibabacloud/hbase/model/CreateInstanceResult.h
|
||||
include/alibabacloud/hbase/model/CreateRestorePlanRequest.h
|
||||
include/alibabacloud/hbase/model/CreateRestorePlanResult.h
|
||||
include/alibabacloud/hbase/model/DeleteHbaseHaSlbRequest.h
|
||||
@@ -41,6 +39,8 @@ set(hbase_public_header_model
|
||||
include/alibabacloud/hbase/model/DeleteInstanceResult.h
|
||||
include/alibabacloud/hbase/model/DeleteUserHdfsInfoRequest.h
|
||||
include/alibabacloud/hbase/model/DeleteUserHdfsInfoResult.h
|
||||
include/alibabacloud/hbase/model/DescribeAvailableResourceRequest.h
|
||||
include/alibabacloud/hbase/model/DescribeAvailableResourceResult.h
|
||||
include/alibabacloud/hbase/model/DescribeBackupPlanConfigRequest.h
|
||||
include/alibabacloud/hbase/model/DescribeBackupPlanConfigResult.h
|
||||
include/alibabacloud/hbase/model/DescribeBackupStatusRequest.h
|
||||
@@ -124,8 +124,6 @@ set(hbase_src
|
||||
src/model/CreateClusterResult.cc
|
||||
src/model/CreateHbaseHaSlbRequest.cc
|
||||
src/model/CreateHbaseHaSlbResult.cc
|
||||
src/model/CreateInstanceRequest.cc
|
||||
src/model/CreateInstanceResult.cc
|
||||
src/model/CreateRestorePlanRequest.cc
|
||||
src/model/CreateRestorePlanResult.cc
|
||||
src/model/DeleteHbaseHaSlbRequest.cc
|
||||
@@ -134,6 +132,8 @@ set(hbase_src
|
||||
src/model/DeleteInstanceResult.cc
|
||||
src/model/DeleteUserHdfsInfoRequest.cc
|
||||
src/model/DeleteUserHdfsInfoResult.cc
|
||||
src/model/DescribeAvailableResourceRequest.cc
|
||||
src/model/DescribeAvailableResourceResult.cc
|
||||
src/model/DescribeBackupPlanConfigRequest.cc
|
||||
src/model/DescribeBackupPlanConfigResult.cc
|
||||
src/model/DescribeBackupStatusRequest.cc
|
||||
|
||||
@@ -32,8 +32,6 @@
|
||||
#include "model/CreateClusterResult.h"
|
||||
#include "model/CreateHbaseHaSlbRequest.h"
|
||||
#include "model/CreateHbaseHaSlbResult.h"
|
||||
#include "model/CreateInstanceRequest.h"
|
||||
#include "model/CreateInstanceResult.h"
|
||||
#include "model/CreateRestorePlanRequest.h"
|
||||
#include "model/CreateRestorePlanResult.h"
|
||||
#include "model/DeleteHbaseHaSlbRequest.h"
|
||||
@@ -42,6 +40,8 @@
|
||||
#include "model/DeleteInstanceResult.h"
|
||||
#include "model/DeleteUserHdfsInfoRequest.h"
|
||||
#include "model/DeleteUserHdfsInfoResult.h"
|
||||
#include "model/DescribeAvailableResourceRequest.h"
|
||||
#include "model/DescribeAvailableResourceResult.h"
|
||||
#include "model/DescribeBackupPlanConfigRequest.h"
|
||||
#include "model/DescribeBackupPlanConfigResult.h"
|
||||
#include "model/DescribeBackupStatusRequest.h"
|
||||
@@ -136,9 +136,6 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::CreateHbaseHaSlbResult> CreateHbaseHaSlbOutcome;
|
||||
typedef std::future<CreateHbaseHaSlbOutcome> CreateHbaseHaSlbOutcomeCallable;
|
||||
typedef std::function<void(const HBaseClient*, const Model::CreateHbaseHaSlbRequest&, const CreateHbaseHaSlbOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateHbaseHaSlbAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateInstanceResult> CreateInstanceOutcome;
|
||||
typedef std::future<CreateInstanceOutcome> CreateInstanceOutcomeCallable;
|
||||
typedef std::function<void(const HBaseClient*, const Model::CreateInstanceRequest&, const CreateInstanceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateInstanceAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateRestorePlanResult> CreateRestorePlanOutcome;
|
||||
typedef std::future<CreateRestorePlanOutcome> CreateRestorePlanOutcomeCallable;
|
||||
typedef std::function<void(const HBaseClient*, const Model::CreateRestorePlanRequest&, const CreateRestorePlanOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateRestorePlanAsyncHandler;
|
||||
@@ -151,6 +148,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::DeleteUserHdfsInfoResult> DeleteUserHdfsInfoOutcome;
|
||||
typedef std::future<DeleteUserHdfsInfoOutcome> DeleteUserHdfsInfoOutcomeCallable;
|
||||
typedef std::function<void(const HBaseClient*, const Model::DeleteUserHdfsInfoRequest&, const DeleteUserHdfsInfoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteUserHdfsInfoAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeAvailableResourceResult> DescribeAvailableResourceOutcome;
|
||||
typedef std::future<DescribeAvailableResourceOutcome> DescribeAvailableResourceOutcomeCallable;
|
||||
typedef std::function<void(const HBaseClient*, const Model::DescribeAvailableResourceRequest&, const DescribeAvailableResourceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeAvailableResourceAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeBackupPlanConfigResult> DescribeBackupPlanConfigOutcome;
|
||||
typedef std::future<DescribeBackupPlanConfigOutcome> DescribeBackupPlanConfigOutcomeCallable;
|
||||
typedef std::function<void(const HBaseClient*, const Model::DescribeBackupPlanConfigRequest&, const DescribeBackupPlanConfigOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeBackupPlanConfigAsyncHandler;
|
||||
@@ -276,9 +276,6 @@ namespace AlibabaCloud
|
||||
CreateHbaseHaSlbOutcome createHbaseHaSlb(const Model::CreateHbaseHaSlbRequest &request)const;
|
||||
void createHbaseHaSlbAsync(const Model::CreateHbaseHaSlbRequest& request, const CreateHbaseHaSlbAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateHbaseHaSlbOutcomeCallable createHbaseHaSlbCallable(const Model::CreateHbaseHaSlbRequest& request) const;
|
||||
CreateInstanceOutcome createInstance(const Model::CreateInstanceRequest &request)const;
|
||||
void createInstanceAsync(const Model::CreateInstanceRequest& request, const CreateInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateInstanceOutcomeCallable createInstanceCallable(const Model::CreateInstanceRequest& request) const;
|
||||
CreateRestorePlanOutcome createRestorePlan(const Model::CreateRestorePlanRequest &request)const;
|
||||
void createRestorePlanAsync(const Model::CreateRestorePlanRequest& request, const CreateRestorePlanAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateRestorePlanOutcomeCallable createRestorePlanCallable(const Model::CreateRestorePlanRequest& request) const;
|
||||
@@ -291,6 +288,9 @@ namespace AlibabaCloud
|
||||
DeleteUserHdfsInfoOutcome deleteUserHdfsInfo(const Model::DeleteUserHdfsInfoRequest &request)const;
|
||||
void deleteUserHdfsInfoAsync(const Model::DeleteUserHdfsInfoRequest& request, const DeleteUserHdfsInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DeleteUserHdfsInfoOutcomeCallable deleteUserHdfsInfoCallable(const Model::DeleteUserHdfsInfoRequest& request) const;
|
||||
DescribeAvailableResourceOutcome describeAvailableResource(const Model::DescribeAvailableResourceRequest &request)const;
|
||||
void describeAvailableResourceAsync(const Model::DescribeAvailableResourceRequest& request, const DescribeAvailableResourceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeAvailableResourceOutcomeCallable describeAvailableResourceCallable(const Model::DescribeAvailableResourceRequest& request) const;
|
||||
DescribeBackupPlanConfigOutcome describeBackupPlanConfig(const Model::DescribeBackupPlanConfigRequest &request)const;
|
||||
void describeBackupPlanConfigAsync(const Model::DescribeBackupPlanConfigRequest& request, const DescribeBackupPlanConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeBackupPlanConfigOutcomeCallable describeBackupPlanConfigCallable(const Model::DescribeBackupPlanConfigRequest& request) const;
|
||||
|
||||
@@ -1,129 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_HBASE_MODEL_CREATEINSTANCEREQUEST_H_
|
||||
#define ALIBABACLOUD_HBASE_MODEL_CREATEINSTANCEREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/hbase/HBaseExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace HBase
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_HBASE_EXPORT CreateInstanceRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
CreateInstanceRequest();
|
||||
~CreateInstanceRequest();
|
||||
|
||||
std::string getClusterName()const;
|
||||
void setClusterName(const std::string& clusterName);
|
||||
std::string getDbInstanceConnType()const;
|
||||
void setDbInstanceConnType(const std::string& dbInstanceConnType);
|
||||
std::string getEngineVersion()const;
|
||||
void setEngineVersion(const std::string& engineVersion);
|
||||
std::string getDepMode()const;
|
||||
void setDepMode(const std::string& depMode);
|
||||
std::string getBackupId()const;
|
||||
void setBackupId(const std::string& backupId);
|
||||
std::string getDbInstanceType()const;
|
||||
void setDbInstanceType(const std::string& dbInstanceType);
|
||||
std::string getVSwitchId()const;
|
||||
void setVSwitchId(const std::string& vSwitchId);
|
||||
std::string getSecurityIPList()const;
|
||||
void setSecurityIPList(const std::string& securityIPList);
|
||||
std::string getAutoRenew()const;
|
||||
void setAutoRenew(const std::string& autoRenew);
|
||||
std::string getNetType()const;
|
||||
void setNetType(const std::string& netType);
|
||||
std::string getZoneId()const;
|
||||
void setZoneId(const std::string& zoneId);
|
||||
std::string getCoreDiskType()const;
|
||||
void setCoreDiskType(const std::string& coreDiskType);
|
||||
std::string getPricingCycle()const;
|
||||
void setPricingCycle(const std::string& pricingCycle);
|
||||
std::string getCoreInstanceQuantity()const;
|
||||
void setCoreInstanceQuantity(const std::string& coreInstanceQuantity);
|
||||
std::string getDuration()const;
|
||||
void setDuration(const std::string& duration);
|
||||
std::string getRegionId()const;
|
||||
void setRegionId(const std::string& regionId);
|
||||
std::string getEngine()const;
|
||||
void setEngine(const std::string& engine);
|
||||
std::string getRestoreTime()const;
|
||||
void setRestoreTime(const std::string& restoreTime);
|
||||
std::string getSrcDBInstanceId()const;
|
||||
void setSrcDBInstanceId(const std::string& srcDBInstanceId);
|
||||
std::string getMasterInstanceType()const;
|
||||
void setMasterInstanceType(const std::string& masterInstanceType);
|
||||
std::string getColdStorageSize()const;
|
||||
void setColdStorageSize(const std::string& coldStorageSize);
|
||||
std::string getCoreDiskQuantity()const;
|
||||
void setCoreDiskQuantity(const std::string& coreDiskQuantity);
|
||||
std::string getIsColdStorage()const;
|
||||
void setIsColdStorage(const std::string& isColdStorage);
|
||||
std::string getCoreInstanceType()const;
|
||||
void setCoreInstanceType(const std::string& coreInstanceType);
|
||||
std::string getCoreDiskSize()const;
|
||||
void setCoreDiskSize(const std::string& coreDiskSize);
|
||||
std::string getVpcId()const;
|
||||
void setVpcId(const std::string& vpcId);
|
||||
std::string getDbType()const;
|
||||
void setDbType(const std::string& dbType);
|
||||
std::string getPayType()const;
|
||||
void setPayType(const std::string& payType);
|
||||
|
||||
private:
|
||||
std::string clusterName_;
|
||||
std::string dbInstanceConnType_;
|
||||
std::string engineVersion_;
|
||||
std::string depMode_;
|
||||
std::string backupId_;
|
||||
std::string dbInstanceType_;
|
||||
std::string vSwitchId_;
|
||||
std::string securityIPList_;
|
||||
std::string autoRenew_;
|
||||
std::string netType_;
|
||||
std::string zoneId_;
|
||||
std::string coreDiskType_;
|
||||
std::string pricingCycle_;
|
||||
std::string coreInstanceQuantity_;
|
||||
std::string duration_;
|
||||
std::string regionId_;
|
||||
std::string engine_;
|
||||
std::string restoreTime_;
|
||||
std::string srcDBInstanceId_;
|
||||
std::string masterInstanceType_;
|
||||
std::string coldStorageSize_;
|
||||
std::string coreDiskQuantity_;
|
||||
std::string isColdStorage_;
|
||||
std::string coreInstanceType_;
|
||||
std::string coreDiskSize_;
|
||||
std::string vpcId_;
|
||||
std::string dbType_;
|
||||
std::string payType_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_HBASE_MODEL_CREATEINSTANCEREQUEST_H_
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_HBASE_MODEL_DESCRIBEAVAILABLERESOURCEREQUEST_H_
|
||||
#define ALIBABACLOUD_HBASE_MODEL_DESCRIBEAVAILABLERESOURCEREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/hbase/HBaseExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace HBase
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_HBASE_EXPORT DescribeAvailableResourceRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
DescribeAvailableResourceRequest();
|
||||
~DescribeAvailableResourceRequest();
|
||||
|
||||
std::string getRegionId()const;
|
||||
void setRegionId(const std::string& regionId);
|
||||
std::string getZoneId()const;
|
||||
void setZoneId(const std::string& zoneId);
|
||||
std::string getChargeType()const;
|
||||
void setChargeType(const std::string& chargeType);
|
||||
|
||||
private:
|
||||
std::string regionId_;
|
||||
std::string zoneId_;
|
||||
std::string chargeType_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_HBASE_MODEL_DESCRIBEAVAILABLERESOURCEREQUEST_H_
|
||||
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
* 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_HBASE_MODEL_DESCRIBEAVAILABLERESOURCERESULT_H_
|
||||
#define ALIBABACLOUD_HBASE_MODEL_DESCRIBEAVAILABLERESOURCERESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/hbase/HBaseExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace HBase
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_HBASE_EXPORT DescribeAvailableResourceResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct AvailableZone
|
||||
{
|
||||
struct SupportedEngine
|
||||
{
|
||||
struct SupportedEngineVersion
|
||||
{
|
||||
struct SupportedCategoriesItem
|
||||
{
|
||||
struct SupportedStorageType
|
||||
{
|
||||
struct CoreResource
|
||||
{
|
||||
struct DBInstanceStorageRange
|
||||
{
|
||||
int minSize;
|
||||
int stepSize;
|
||||
int maxSize;
|
||||
};
|
||||
struct InstanceTypeDetail
|
||||
{
|
||||
int mem;
|
||||
int cpu;
|
||||
};
|
||||
InstanceTypeDetail instanceTypeDetail;
|
||||
DBInstanceStorageRange dBInstanceStorageRange;
|
||||
std::string instanceType;
|
||||
};
|
||||
std::string storageType;
|
||||
std::vector<SupportedStorageType::CoreResource> coreResources;
|
||||
};
|
||||
std::string category;
|
||||
std::vector<SupportedCategoriesItem::SupportedStorageType> supportedStorageTypes;
|
||||
};
|
||||
std::string version;
|
||||
std::vector<SupportedEngineVersion::SupportedCategoriesItem> supportedCategories;
|
||||
};
|
||||
std::vector<SupportedEngine::SupportedEngineVersion> supportedEngineVersions;
|
||||
std::string engine;
|
||||
};
|
||||
struct MasterResource
|
||||
{
|
||||
struct InstanceTypeDetail1
|
||||
{
|
||||
int mem;
|
||||
int cpu;
|
||||
};
|
||||
InstanceTypeDetail1 instanceTypeDetail1;
|
||||
std::string instanceType;
|
||||
};
|
||||
std::vector<AvailableZone::MasterResource> masterResources;
|
||||
std::string zoneId;
|
||||
std::vector<AvailableZone::SupportedEngine> supportedEngines;
|
||||
std::string regionId;
|
||||
};
|
||||
|
||||
|
||||
DescribeAvailableResourceResult();
|
||||
explicit DescribeAvailableResourceResult(const std::string &payload);
|
||||
~DescribeAvailableResourceResult();
|
||||
std::vector<AvailableZone> getAvailableZones()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::vector<AvailableZone> availableZones_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_HBASE_MODEL_DESCRIBEAVAILABLERESOURCERESULT_H_
|
||||
@@ -31,21 +31,21 @@ HBaseClient::HBaseClient(const Credentials &credentials, const ClientConfigurati
|
||||
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, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "hbase");
|
||||
}
|
||||
|
||||
HBaseClient::HBaseClient(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, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "hbase");
|
||||
}
|
||||
|
||||
HBaseClient::HBaseClient(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, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "hbase");
|
||||
}
|
||||
|
||||
HBaseClient::~HBaseClient()
|
||||
@@ -231,42 +231,6 @@ HBaseClient::CreateHbaseHaSlbOutcomeCallable HBaseClient::createHbaseHaSlbCallab
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
HBaseClient::CreateInstanceOutcome HBaseClient::createInstance(const CreateInstanceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateInstanceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateInstanceOutcome(CreateInstanceResult(outcome.result()));
|
||||
else
|
||||
return CreateInstanceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void HBaseClient::createInstanceAsync(const CreateInstanceRequest& request, const CreateInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createInstance(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
HBaseClient::CreateInstanceOutcomeCallable HBaseClient::createInstanceCallable(const CreateInstanceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateInstanceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createInstance(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
HBaseClient::CreateRestorePlanOutcome HBaseClient::createRestorePlan(const CreateRestorePlanRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -411,6 +375,42 @@ HBaseClient::DeleteUserHdfsInfoOutcomeCallable HBaseClient::deleteUserHdfsInfoCa
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
HBaseClient::DescribeAvailableResourceOutcome HBaseClient::describeAvailableResource(const DescribeAvailableResourceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeAvailableResourceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeAvailableResourceOutcome(DescribeAvailableResourceResult(outcome.result()));
|
||||
else
|
||||
return DescribeAvailableResourceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void HBaseClient::describeAvailableResourceAsync(const DescribeAvailableResourceRequest& request, const DescribeAvailableResourceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeAvailableResource(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
HBaseClient::DescribeAvailableResourceOutcomeCallable HBaseClient::describeAvailableResourceCallable(const DescribeAvailableResourceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeAvailableResourceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeAvailableResource(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
HBaseClient::DescribeBackupPlanConfigOutcome HBaseClient::describeBackupPlanConfig(const DescribeBackupPlanConfigRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -1,337 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/hbase/model/CreateInstanceRequest.h>
|
||||
|
||||
using AlibabaCloud::HBase::Model::CreateInstanceRequest;
|
||||
|
||||
CreateInstanceRequest::CreateInstanceRequest() :
|
||||
RpcServiceRequest("hbase", "2019-01-01", "CreateInstance")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateInstanceRequest::~CreateInstanceRequest()
|
||||
{}
|
||||
|
||||
std::string CreateInstanceRequest::getClusterName()const
|
||||
{
|
||||
return clusterName_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setClusterName(const std::string& clusterName)
|
||||
{
|
||||
clusterName_ = clusterName;
|
||||
setParameter("ClusterName", clusterName);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getDbInstanceConnType()const
|
||||
{
|
||||
return dbInstanceConnType_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setDbInstanceConnType(const std::string& dbInstanceConnType)
|
||||
{
|
||||
dbInstanceConnType_ = dbInstanceConnType;
|
||||
setParameter("DbInstanceConnType", dbInstanceConnType);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getEngineVersion()const
|
||||
{
|
||||
return engineVersion_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setEngineVersion(const std::string& engineVersion)
|
||||
{
|
||||
engineVersion_ = engineVersion;
|
||||
setParameter("EngineVersion", engineVersion);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getDepMode()const
|
||||
{
|
||||
return depMode_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setDepMode(const std::string& depMode)
|
||||
{
|
||||
depMode_ = depMode;
|
||||
setParameter("DepMode", depMode);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getBackupId()const
|
||||
{
|
||||
return backupId_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setBackupId(const std::string& backupId)
|
||||
{
|
||||
backupId_ = backupId;
|
||||
setParameter("BackupId", backupId);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getDbInstanceType()const
|
||||
{
|
||||
return dbInstanceType_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setDbInstanceType(const std::string& dbInstanceType)
|
||||
{
|
||||
dbInstanceType_ = dbInstanceType;
|
||||
setParameter("DbInstanceType", dbInstanceType);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getVSwitchId()const
|
||||
{
|
||||
return vSwitchId_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setVSwitchId(const std::string& vSwitchId)
|
||||
{
|
||||
vSwitchId_ = vSwitchId;
|
||||
setParameter("VSwitchId", vSwitchId);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getSecurityIPList()const
|
||||
{
|
||||
return securityIPList_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setSecurityIPList(const std::string& securityIPList)
|
||||
{
|
||||
securityIPList_ = securityIPList;
|
||||
setParameter("SecurityIPList", securityIPList);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getAutoRenew()const
|
||||
{
|
||||
return autoRenew_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setAutoRenew(const std::string& autoRenew)
|
||||
{
|
||||
autoRenew_ = autoRenew;
|
||||
setParameter("AutoRenew", autoRenew);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getNetType()const
|
||||
{
|
||||
return netType_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setNetType(const std::string& netType)
|
||||
{
|
||||
netType_ = netType;
|
||||
setParameter("NetType", netType);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getZoneId()const
|
||||
{
|
||||
return zoneId_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setZoneId(const std::string& zoneId)
|
||||
{
|
||||
zoneId_ = zoneId;
|
||||
setParameter("ZoneId", zoneId);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getCoreDiskType()const
|
||||
{
|
||||
return coreDiskType_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setCoreDiskType(const std::string& coreDiskType)
|
||||
{
|
||||
coreDiskType_ = coreDiskType;
|
||||
setParameter("CoreDiskType", coreDiskType);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getPricingCycle()const
|
||||
{
|
||||
return pricingCycle_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setPricingCycle(const std::string& pricingCycle)
|
||||
{
|
||||
pricingCycle_ = pricingCycle;
|
||||
setParameter("PricingCycle", pricingCycle);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getCoreInstanceQuantity()const
|
||||
{
|
||||
return coreInstanceQuantity_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setCoreInstanceQuantity(const std::string& coreInstanceQuantity)
|
||||
{
|
||||
coreInstanceQuantity_ = coreInstanceQuantity;
|
||||
setParameter("CoreInstanceQuantity", coreInstanceQuantity);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getDuration()const
|
||||
{
|
||||
return duration_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setDuration(const std::string& duration)
|
||||
{
|
||||
duration_ = duration;
|
||||
setParameter("Duration", duration);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getEngine()const
|
||||
{
|
||||
return engine_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setEngine(const std::string& engine)
|
||||
{
|
||||
engine_ = engine;
|
||||
setParameter("Engine", engine);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getRestoreTime()const
|
||||
{
|
||||
return restoreTime_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setRestoreTime(const std::string& restoreTime)
|
||||
{
|
||||
restoreTime_ = restoreTime;
|
||||
setParameter("RestoreTime", restoreTime);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getSrcDBInstanceId()const
|
||||
{
|
||||
return srcDBInstanceId_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setSrcDBInstanceId(const std::string& srcDBInstanceId)
|
||||
{
|
||||
srcDBInstanceId_ = srcDBInstanceId;
|
||||
setParameter("SrcDBInstanceId", srcDBInstanceId);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getMasterInstanceType()const
|
||||
{
|
||||
return masterInstanceType_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setMasterInstanceType(const std::string& masterInstanceType)
|
||||
{
|
||||
masterInstanceType_ = masterInstanceType;
|
||||
setParameter("MasterInstanceType", masterInstanceType);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getColdStorageSize()const
|
||||
{
|
||||
return coldStorageSize_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setColdStorageSize(const std::string& coldStorageSize)
|
||||
{
|
||||
coldStorageSize_ = coldStorageSize;
|
||||
setParameter("ColdStorageSize", coldStorageSize);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getCoreDiskQuantity()const
|
||||
{
|
||||
return coreDiskQuantity_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setCoreDiskQuantity(const std::string& coreDiskQuantity)
|
||||
{
|
||||
coreDiskQuantity_ = coreDiskQuantity;
|
||||
setParameter("CoreDiskQuantity", coreDiskQuantity);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getIsColdStorage()const
|
||||
{
|
||||
return isColdStorage_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setIsColdStorage(const std::string& isColdStorage)
|
||||
{
|
||||
isColdStorage_ = isColdStorage;
|
||||
setParameter("IsColdStorage", isColdStorage);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getCoreInstanceType()const
|
||||
{
|
||||
return coreInstanceType_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setCoreInstanceType(const std::string& coreInstanceType)
|
||||
{
|
||||
coreInstanceType_ = coreInstanceType;
|
||||
setParameter("CoreInstanceType", coreInstanceType);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getCoreDiskSize()const
|
||||
{
|
||||
return coreDiskSize_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setCoreDiskSize(const std::string& coreDiskSize)
|
||||
{
|
||||
coreDiskSize_ = coreDiskSize;
|
||||
setParameter("CoreDiskSize", coreDiskSize);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getVpcId()const
|
||||
{
|
||||
return vpcId_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setVpcId(const std::string& vpcId)
|
||||
{
|
||||
vpcId_ = vpcId;
|
||||
setParameter("VpcId", vpcId);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getDbType()const
|
||||
{
|
||||
return dbType_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setDbType(const std::string& dbType)
|
||||
{
|
||||
dbType_ = dbType;
|
||||
setParameter("DbType", dbType);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getPayType()const
|
||||
{
|
||||
return payType_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setPayType(const std::string& payType)
|
||||
{
|
||||
payType_ = payType;
|
||||
setParameter("PayType", payType);
|
||||
}
|
||||
|
||||
62
hbase/src/model/DescribeAvailableResourceRequest.cc
Normal file
62
hbase/src/model/DescribeAvailableResourceRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/hbase/model/DescribeAvailableResourceRequest.h>
|
||||
|
||||
using AlibabaCloud::HBase::Model::DescribeAvailableResourceRequest;
|
||||
|
||||
DescribeAvailableResourceRequest::DescribeAvailableResourceRequest() :
|
||||
RpcServiceRequest("hbase", "2019-01-01", "DescribeAvailableResource")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeAvailableResourceRequest::~DescribeAvailableResourceRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeAvailableResourceRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void DescribeAvailableResourceRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string DescribeAvailableResourceRequest::getZoneId()const
|
||||
{
|
||||
return zoneId_;
|
||||
}
|
||||
|
||||
void DescribeAvailableResourceRequest::setZoneId(const std::string& zoneId)
|
||||
{
|
||||
zoneId_ = zoneId;
|
||||
setParameter("ZoneId", zoneId);
|
||||
}
|
||||
|
||||
std::string DescribeAvailableResourceRequest::getChargeType()const
|
||||
{
|
||||
return chargeType_;
|
||||
}
|
||||
|
||||
void DescribeAvailableResourceRequest::setChargeType(const std::string& chargeType)
|
||||
{
|
||||
chargeType_ = chargeType;
|
||||
setParameter("ChargeType", chargeType);
|
||||
}
|
||||
|
||||
124
hbase/src/model/DescribeAvailableResourceResult.cc
Normal file
124
hbase/src/model/DescribeAvailableResourceResult.cc
Normal file
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
* 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/hbase/model/DescribeAvailableResourceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::HBase;
|
||||
using namespace AlibabaCloud::HBase::Model;
|
||||
|
||||
DescribeAvailableResourceResult::DescribeAvailableResourceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeAvailableResourceResult::DescribeAvailableResourceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeAvailableResourceResult::~DescribeAvailableResourceResult()
|
||||
{}
|
||||
|
||||
void DescribeAvailableResourceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allAvailableZonesNode = value["AvailableZones"]["AvailableZone"];
|
||||
for (auto valueAvailableZonesAvailableZone : allAvailableZonesNode)
|
||||
{
|
||||
AvailableZone availableZonesObject;
|
||||
if(!valueAvailableZonesAvailableZone["RegionId"].isNull())
|
||||
availableZonesObject.regionId = valueAvailableZonesAvailableZone["RegionId"].asString();
|
||||
if(!valueAvailableZonesAvailableZone["ZoneId"].isNull())
|
||||
availableZonesObject.zoneId = valueAvailableZonesAvailableZone["ZoneId"].asString();
|
||||
auto allSupportedEnginesNode = allAvailableZonesNode["SupportedEngines"]["SupportedEngine"];
|
||||
for (auto allAvailableZonesNodeSupportedEnginesSupportedEngine : allSupportedEnginesNode)
|
||||
{
|
||||
AvailableZone::SupportedEngine supportedEnginesObject;
|
||||
if(!allAvailableZonesNodeSupportedEnginesSupportedEngine["Engine"].isNull())
|
||||
supportedEnginesObject.engine = allAvailableZonesNodeSupportedEnginesSupportedEngine["Engine"].asString();
|
||||
auto allSupportedEngineVersionsNode = allSupportedEnginesNode["SupportedEngineVersions"]["SupportedEngineVersion"];
|
||||
for (auto allSupportedEnginesNodeSupportedEngineVersionsSupportedEngineVersion : allSupportedEngineVersionsNode)
|
||||
{
|
||||
AvailableZone::SupportedEngine::SupportedEngineVersion supportedEngineVersionsObject;
|
||||
if(!allSupportedEnginesNodeSupportedEngineVersionsSupportedEngineVersion["Version"].isNull())
|
||||
supportedEngineVersionsObject.version = allSupportedEnginesNodeSupportedEngineVersionsSupportedEngineVersion["Version"].asString();
|
||||
auto allSupportedCategoriesNode = allSupportedEngineVersionsNode["SupportedCategories"]["SupportedCategoriesItem"];
|
||||
for (auto allSupportedEngineVersionsNodeSupportedCategoriesSupportedCategoriesItem : allSupportedCategoriesNode)
|
||||
{
|
||||
AvailableZone::SupportedEngine::SupportedEngineVersion::SupportedCategoriesItem supportedCategoriesObject;
|
||||
if(!allSupportedEngineVersionsNodeSupportedCategoriesSupportedCategoriesItem["Category"].isNull())
|
||||
supportedCategoriesObject.category = allSupportedEngineVersionsNodeSupportedCategoriesSupportedCategoriesItem["Category"].asString();
|
||||
auto allSupportedStorageTypesNode = allSupportedCategoriesNode["SupportedStorageTypes"]["SupportedStorageType"];
|
||||
for (auto allSupportedCategoriesNodeSupportedStorageTypesSupportedStorageType : allSupportedStorageTypesNode)
|
||||
{
|
||||
AvailableZone::SupportedEngine::SupportedEngineVersion::SupportedCategoriesItem::SupportedStorageType supportedStorageTypesObject;
|
||||
if(!allSupportedCategoriesNodeSupportedStorageTypesSupportedStorageType["StorageType"].isNull())
|
||||
supportedStorageTypesObject.storageType = allSupportedCategoriesNodeSupportedStorageTypesSupportedStorageType["StorageType"].asString();
|
||||
auto allCoreResourcesNode = allSupportedStorageTypesNode["CoreResources"]["CoreResource"];
|
||||
for (auto allSupportedStorageTypesNodeCoreResourcesCoreResource : allCoreResourcesNode)
|
||||
{
|
||||
AvailableZone::SupportedEngine::SupportedEngineVersion::SupportedCategoriesItem::SupportedStorageType::CoreResource coreResourcesObject;
|
||||
if(!allSupportedStorageTypesNodeCoreResourcesCoreResource["InstanceType"].isNull())
|
||||
coreResourcesObject.instanceType = allSupportedStorageTypesNodeCoreResourcesCoreResource["InstanceType"].asString();
|
||||
auto dBInstanceStorageRangeNode = value["DBInstanceStorageRange"];
|
||||
if(!dBInstanceStorageRangeNode["MaxSize"].isNull())
|
||||
coreResourcesObject.dBInstanceStorageRange.maxSize = std::stoi(dBInstanceStorageRangeNode["MaxSize"].asString());
|
||||
if(!dBInstanceStorageRangeNode["MinSize"].isNull())
|
||||
coreResourcesObject.dBInstanceStorageRange.minSize = std::stoi(dBInstanceStorageRangeNode["MinSize"].asString());
|
||||
if(!dBInstanceStorageRangeNode["StepSize"].isNull())
|
||||
coreResourcesObject.dBInstanceStorageRange.stepSize = std::stoi(dBInstanceStorageRangeNode["StepSize"].asString());
|
||||
auto instanceTypeDetailNode = value["InstanceTypeDetail"];
|
||||
if(!instanceTypeDetailNode["Cpu"].isNull())
|
||||
coreResourcesObject.instanceTypeDetail.cpu = std::stoi(instanceTypeDetailNode["Cpu"].asString());
|
||||
if(!instanceTypeDetailNode["Mem"].isNull())
|
||||
coreResourcesObject.instanceTypeDetail.mem = std::stoi(instanceTypeDetailNode["Mem"].asString());
|
||||
supportedStorageTypesObject.coreResources.push_back(coreResourcesObject);
|
||||
}
|
||||
supportedCategoriesObject.supportedStorageTypes.push_back(supportedStorageTypesObject);
|
||||
}
|
||||
supportedEngineVersionsObject.supportedCategories.push_back(supportedCategoriesObject);
|
||||
}
|
||||
supportedEnginesObject.supportedEngineVersions.push_back(supportedEngineVersionsObject);
|
||||
}
|
||||
availableZonesObject.supportedEngines.push_back(supportedEnginesObject);
|
||||
}
|
||||
auto allMasterResourcesNode = allAvailableZonesNode["MasterResources"]["MasterResource"];
|
||||
for (auto allAvailableZonesNodeMasterResourcesMasterResource : allMasterResourcesNode)
|
||||
{
|
||||
AvailableZone::MasterResource masterResourcesObject;
|
||||
if(!allAvailableZonesNodeMasterResourcesMasterResource["InstanceType"].isNull())
|
||||
masterResourcesObject.instanceType = allAvailableZonesNodeMasterResourcesMasterResource["InstanceType"].asString();
|
||||
auto instanceTypeDetail1Node = value["InstanceTypeDetail"];
|
||||
if(!instanceTypeDetail1Node["Cpu"].isNull())
|
||||
masterResourcesObject.instanceTypeDetail1.cpu = std::stoi(instanceTypeDetail1Node["Cpu"].asString());
|
||||
if(!instanceTypeDetail1Node["Mem"].isNull())
|
||||
masterResourcesObject.instanceTypeDetail1.mem = std::stoi(instanceTypeDetail1Node["Mem"].asString());
|
||||
availableZonesObject.masterResources.push_back(masterResourcesObject);
|
||||
}
|
||||
availableZones_.push_back(availableZonesObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeAvailableResourceResult::AvailableZone> DescribeAvailableResourceResult::getAvailableZones()const
|
||||
{
|
||||
return availableZones_;
|
||||
}
|
||||
|
||||
@@ -39,19 +39,37 @@ namespace AlibabaCloud
|
||||
void setSrcType(const std::string& srcType);
|
||||
std::string getProject()const;
|
||||
void setProject(const std::string& project);
|
||||
int getWatermarkVertical()const;
|
||||
void setWatermarkVertical(int watermarkVertical);
|
||||
std::string getAccessKeyId()const;
|
||||
void setAccessKeyId(const std::string& accessKeyId);
|
||||
bool getUseOldURL()const;
|
||||
void setUseOldURL(bool useOldURL);
|
||||
int getWatermarkType()const;
|
||||
void setWatermarkType(int watermarkType);
|
||||
float getWatermarkRotate()const;
|
||||
void setWatermarkRotate(float watermarkRotate);
|
||||
std::string getWatermarkValue()const;
|
||||
void setWatermarkValue(const std::string& watermarkValue);
|
||||
std::string getWatermarkFont()const;
|
||||
void setWatermarkFont(const std::string& watermarkFont);
|
||||
int getWatermarkHorizontal()const;
|
||||
void setWatermarkHorizontal(int watermarkHorizontal);
|
||||
std::string getSrcUri()const;
|
||||
void setSrcUri(const std::string& srcUri);
|
||||
std::string getWatermarkFillStyle()const;
|
||||
void setWatermarkFillStyle(const std::string& watermarkFillStyle);
|
||||
|
||||
private:
|
||||
std::string srcType_;
|
||||
std::string project_;
|
||||
int watermarkVertical_;
|
||||
std::string accessKeyId_;
|
||||
bool useOldURL_;
|
||||
int watermarkType_;
|
||||
float watermarkRotate_;
|
||||
std::string watermarkValue_;
|
||||
std::string watermarkFont_;
|
||||
int watermarkHorizontal_;
|
||||
std::string srcUri_;
|
||||
std::string watermarkFillStyle_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -49,6 +49,17 @@ void GetOfficePreviewURLRequest::setProject(const std::string& project)
|
||||
setParameter("Project", project);
|
||||
}
|
||||
|
||||
int GetOfficePreviewURLRequest::getWatermarkVertical()const
|
||||
{
|
||||
return watermarkVertical_;
|
||||
}
|
||||
|
||||
void GetOfficePreviewURLRequest::setWatermarkVertical(int watermarkVertical)
|
||||
{
|
||||
watermarkVertical_ = watermarkVertical;
|
||||
setParameter("WatermarkVertical", std::to_string(watermarkVertical));
|
||||
}
|
||||
|
||||
std::string GetOfficePreviewURLRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
@@ -60,15 +71,59 @@ void GetOfficePreviewURLRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
bool GetOfficePreviewURLRequest::getUseOldURL()const
|
||||
int GetOfficePreviewURLRequest::getWatermarkType()const
|
||||
{
|
||||
return useOldURL_;
|
||||
return watermarkType_;
|
||||
}
|
||||
|
||||
void GetOfficePreviewURLRequest::setUseOldURL(bool useOldURL)
|
||||
void GetOfficePreviewURLRequest::setWatermarkType(int watermarkType)
|
||||
{
|
||||
useOldURL_ = useOldURL;
|
||||
setParameter("UseOldURL", useOldURL ? "true" : "false");
|
||||
watermarkType_ = watermarkType;
|
||||
setParameter("WatermarkType", std::to_string(watermarkType));
|
||||
}
|
||||
|
||||
float GetOfficePreviewURLRequest::getWatermarkRotate()const
|
||||
{
|
||||
return watermarkRotate_;
|
||||
}
|
||||
|
||||
void GetOfficePreviewURLRequest::setWatermarkRotate(float watermarkRotate)
|
||||
{
|
||||
watermarkRotate_ = watermarkRotate;
|
||||
setParameter("WatermarkRotate", std::to_string(watermarkRotate));
|
||||
}
|
||||
|
||||
std::string GetOfficePreviewURLRequest::getWatermarkValue()const
|
||||
{
|
||||
return watermarkValue_;
|
||||
}
|
||||
|
||||
void GetOfficePreviewURLRequest::setWatermarkValue(const std::string& watermarkValue)
|
||||
{
|
||||
watermarkValue_ = watermarkValue;
|
||||
setParameter("WatermarkValue", watermarkValue);
|
||||
}
|
||||
|
||||
std::string GetOfficePreviewURLRequest::getWatermarkFont()const
|
||||
{
|
||||
return watermarkFont_;
|
||||
}
|
||||
|
||||
void GetOfficePreviewURLRequest::setWatermarkFont(const std::string& watermarkFont)
|
||||
{
|
||||
watermarkFont_ = watermarkFont;
|
||||
setParameter("WatermarkFont", watermarkFont);
|
||||
}
|
||||
|
||||
int GetOfficePreviewURLRequest::getWatermarkHorizontal()const
|
||||
{
|
||||
return watermarkHorizontal_;
|
||||
}
|
||||
|
||||
void GetOfficePreviewURLRequest::setWatermarkHorizontal(int watermarkHorizontal)
|
||||
{
|
||||
watermarkHorizontal_ = watermarkHorizontal;
|
||||
setParameter("WatermarkHorizontal", std::to_string(watermarkHorizontal));
|
||||
}
|
||||
|
||||
std::string GetOfficePreviewURLRequest::getSrcUri()const
|
||||
@@ -82,3 +137,14 @@ void GetOfficePreviewURLRequest::setSrcUri(const std::string& srcUri)
|
||||
setParameter("SrcUri", srcUri);
|
||||
}
|
||||
|
||||
std::string GetOfficePreviewURLRequest::getWatermarkFillStyle()const
|
||||
{
|
||||
return watermarkFillStyle_;
|
||||
}
|
||||
|
||||
void GetOfficePreviewURLRequest::setWatermarkFillStyle(const std::string& watermarkFillStyle)
|
||||
{
|
||||
watermarkFillStyle_ = watermarkFillStyle;
|
||||
setParameter("WatermarkFillStyle", watermarkFillStyle);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,8 @@ namespace AlibabaCloud
|
||||
|
||||
long getResourceOwnerId()const;
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
bool getUpgradeMinorVersion()const;
|
||||
void setUpgradeMinorVersion(bool upgradeMinorVersion);
|
||||
std::string getAccessKeyId()const;
|
||||
void setAccessKeyId(const std::string& accessKeyId);
|
||||
std::string getSecurityToken()const;
|
||||
@@ -54,6 +56,7 @@ namespace AlibabaCloud
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
bool upgradeMinorVersion_;
|
||||
std::string accessKeyId_;
|
||||
std::string securityToken_;
|
||||
std::string effectiveTime_;
|
||||
|
||||
@@ -38,6 +38,17 @@ void RestartInstanceRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
bool RestartInstanceRequest::getUpgradeMinorVersion()const
|
||||
{
|
||||
return upgradeMinorVersion_;
|
||||
}
|
||||
|
||||
void RestartInstanceRequest::setUpgradeMinorVersion(bool upgradeMinorVersion)
|
||||
{
|
||||
upgradeMinorVersion_ = upgradeMinorVersion;
|
||||
setParameter("UpgradeMinorVersion", upgradeMinorVersion ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string RestartInstanceRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
|
||||
110
workorder/CMakeLists.txt
Normal file
110
workorder/CMakeLists.txt
Normal file
@@ -0,0 +1,110 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
||||
|
||||
set(workorder_public_header
|
||||
include/alibabacloud/workorder/WorkorderClient.h
|
||||
include/alibabacloud/workorder/WorkorderExport.h )
|
||||
|
||||
set(workorder_public_header_model
|
||||
include/alibabacloud/workorder/model/CloseTicketRequest.h
|
||||
include/alibabacloud/workorder/model/CloseTicketResult.h
|
||||
include/alibabacloud/workorder/model/CreateTicketRequest.h
|
||||
include/alibabacloud/workorder/model/CreateTicketResult.h
|
||||
include/alibabacloud/workorder/model/ListCategoriesRequest.h
|
||||
include/alibabacloud/workorder/model/ListCategoriesResult.h
|
||||
include/alibabacloud/workorder/model/ListProductsRequest.h
|
||||
include/alibabacloud/workorder/model/ListProductsResult.h
|
||||
include/alibabacloud/workorder/model/ListTicketNotesRequest.h
|
||||
include/alibabacloud/workorder/model/ListTicketNotesResult.h
|
||||
include/alibabacloud/workorder/model/ListTicketsRequest.h
|
||||
include/alibabacloud/workorder/model/ListTicketsResult.h
|
||||
include/alibabacloud/workorder/model/ReplyTicketRequest.h
|
||||
include/alibabacloud/workorder/model/ReplyTicketResult.h )
|
||||
|
||||
set(workorder_src
|
||||
src/WorkorderClient.cc
|
||||
src/model/CloseTicketRequest.cc
|
||||
src/model/CloseTicketResult.cc
|
||||
src/model/CreateTicketRequest.cc
|
||||
src/model/CreateTicketResult.cc
|
||||
src/model/ListCategoriesRequest.cc
|
||||
src/model/ListCategoriesResult.cc
|
||||
src/model/ListProductsRequest.cc
|
||||
src/model/ListProductsResult.cc
|
||||
src/model/ListTicketNotesRequest.cc
|
||||
src/model/ListTicketNotesResult.cc
|
||||
src/model/ListTicketsRequest.cc
|
||||
src/model/ListTicketsResult.cc
|
||||
src/model/ReplyTicketRequest.cc
|
||||
src/model/ReplyTicketResult.cc )
|
||||
|
||||
add_library(workorder ${LIB_TYPE}
|
||||
${workorder_public_header}
|
||||
${workorder_public_header_model}
|
||||
${workorder_src})
|
||||
|
||||
set_target_properties(workorder
|
||||
PROPERTIES
|
||||
LINKER_LANGUAGE CXX
|
||||
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}workorder
|
||||
)
|
||||
|
||||
if(${LIB_TYPE} STREQUAL "SHARED")
|
||||
set_target_properties(workorder
|
||||
PROPERTIES
|
||||
DEFINE_SYMBOL ALIBABACLOUD_WORKORDER_LIBRARY)
|
||||
endif()
|
||||
|
||||
target_include_directories(workorder
|
||||
PRIVATE include
|
||||
${CMAKE_SOURCE_DIR}/core/include
|
||||
)
|
||||
target_link_libraries(workorder
|
||||
core)
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
|
||||
set(jsoncpp_install_dir ${INSTALL_DIR})
|
||||
add_dependencies(workorder
|
||||
jsoncpp)
|
||||
target_include_directories(workorder
|
||||
PRIVATE ${jsoncpp_install_dir}/include)
|
||||
target_link_libraries(workorder
|
||||
${jsoncpp_install_dir}/lib/jsoncpp.lib)
|
||||
set_target_properties(workorder
|
||||
PROPERTIES
|
||||
COMPILE_OPTIONS "/bigobj")
|
||||
else()
|
||||
target_include_directories(workorder
|
||||
PRIVATE /usr/include/jsoncpp)
|
||||
target_link_libraries(workorder
|
||||
jsoncpp)
|
||||
endif()
|
||||
|
||||
install(FILES ${workorder_public_header}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/workorder)
|
||||
install(FILES ${workorder_public_header_model}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/workorder/model)
|
||||
install(TARGETS workorder
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
102
workorder/include/alibabacloud/workorder/WorkorderClient.h
Normal file
102
workorder/include/alibabacloud/workorder/WorkorderClient.h
Normal file
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* 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_WORKORDERCLIENT_H_
|
||||
#define ALIBABACLOUD_WORKORDER_WORKORDERCLIENT_H_
|
||||
|
||||
#include <future>
|
||||
#include <alibabacloud/core/AsyncCallerContext.h>
|
||||
#include <alibabacloud/core/EndpointProvider.h>
|
||||
#include <alibabacloud/core/RpcServiceClient.h>
|
||||
#include "WorkorderExport.h"
|
||||
#include "model/CloseTicketRequest.h"
|
||||
#include "model/CloseTicketResult.h"
|
||||
#include "model/CreateTicketRequest.h"
|
||||
#include "model/CreateTicketResult.h"
|
||||
#include "model/ListCategoriesRequest.h"
|
||||
#include "model/ListCategoriesResult.h"
|
||||
#include "model/ListProductsRequest.h"
|
||||
#include "model/ListProductsResult.h"
|
||||
#include "model/ListTicketNotesRequest.h"
|
||||
#include "model/ListTicketNotesResult.h"
|
||||
#include "model/ListTicketsRequest.h"
|
||||
#include "model/ListTicketsResult.h"
|
||||
#include "model/ReplyTicketRequest.h"
|
||||
#include "model/ReplyTicketResult.h"
|
||||
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Workorder
|
||||
{
|
||||
class ALIBABACLOUD_WORKORDER_EXPORT WorkorderClient : public RpcServiceClient
|
||||
{
|
||||
public:
|
||||
typedef Outcome<Error, Model::CloseTicketResult> CloseTicketOutcome;
|
||||
typedef std::future<CloseTicketOutcome> CloseTicketOutcomeCallable;
|
||||
typedef std::function<void(const WorkorderClient*, const Model::CloseTicketRequest&, const CloseTicketOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CloseTicketAsyncHandler;
|
||||
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::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;
|
||||
typedef Outcome<Error, Model::ListProductsResult> ListProductsOutcome;
|
||||
typedef std::future<ListProductsOutcome> ListProductsOutcomeCallable;
|
||||
typedef std::function<void(const WorkorderClient*, const Model::ListProductsRequest&, const ListProductsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListProductsAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListTicketNotesResult> ListTicketNotesOutcome;
|
||||
typedef std::future<ListTicketNotesOutcome> ListTicketNotesOutcomeCallable;
|
||||
typedef std::function<void(const WorkorderClient*, const Model::ListTicketNotesRequest&, const ListTicketNotesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListTicketNotesAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListTicketsResult> ListTicketsOutcome;
|
||||
typedef std::future<ListTicketsOutcome> ListTicketsOutcomeCallable;
|
||||
typedef std::function<void(const WorkorderClient*, const Model::ListTicketsRequest&, const ListTicketsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListTicketsAsyncHandler;
|
||||
typedef Outcome<Error, Model::ReplyTicketResult> ReplyTicketOutcome;
|
||||
typedef std::future<ReplyTicketOutcome> ReplyTicketOutcomeCallable;
|
||||
typedef std::function<void(const WorkorderClient*, const Model::ReplyTicketRequest&, const ReplyTicketOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ReplyTicketAsyncHandler;
|
||||
|
||||
WorkorderClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||
WorkorderClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||
WorkorderClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||
~WorkorderClient();
|
||||
CloseTicketOutcome closeTicket(const Model::CloseTicketRequest &request)const;
|
||||
void closeTicketAsync(const Model::CloseTicketRequest& request, const CloseTicketAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CloseTicketOutcomeCallable closeTicketCallable(const Model::CloseTicketRequest& request) const;
|
||||
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;
|
||||
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;
|
||||
ListProductsOutcome listProducts(const Model::ListProductsRequest &request)const;
|
||||
void listProductsAsync(const Model::ListProductsRequest& request, const ListProductsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListProductsOutcomeCallable listProductsCallable(const Model::ListProductsRequest& request) const;
|
||||
ListTicketNotesOutcome listTicketNotes(const Model::ListTicketNotesRequest &request)const;
|
||||
void listTicketNotesAsync(const Model::ListTicketNotesRequest& request, const ListTicketNotesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListTicketNotesOutcomeCallable listTicketNotesCallable(const Model::ListTicketNotesRequest& request) const;
|
||||
ListTicketsOutcome listTickets(const Model::ListTicketsRequest &request)const;
|
||||
void listTicketsAsync(const Model::ListTicketsRequest& request, const ListTicketsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListTicketsOutcomeCallable listTicketsCallable(const Model::ListTicketsRequest& request) const;
|
||||
ReplyTicketOutcome replyTicket(const Model::ReplyTicketRequest &request)const;
|
||||
void replyTicketAsync(const Model::ReplyTicketRequest& request, const ReplyTicketAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ReplyTicketOutcomeCallable replyTicketCallable(const Model::ReplyTicketRequest& request) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // !ALIBABACLOUD_WORKORDER_WORKORDERCLIENT_H_
|
||||
32
workorder/include/alibabacloud/workorder/WorkorderExport.h
Normal file
32
workorder/include/alibabacloud/workorder/WorkorderExport.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* 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_WORKORDEREXPORT_H_
|
||||
#define ALIBABACLOUD_WORKORDER_WORKORDEREXPORT_H_
|
||||
|
||||
#include <alibabacloud/core/Global.h>
|
||||
|
||||
#if defined(ALIBABACLOUD_SHARED)
|
||||
# if defined(ALIBABACLOUD_WORKORDER_LIBRARY)
|
||||
# define ALIBABACLOUD_WORKORDER_EXPORT ALIBABACLOUD_DECL_EXPORT
|
||||
# else
|
||||
# define ALIBABACLOUD_WORKORDER_EXPORT ALIBABACLOUD_DECL_IMPORT
|
||||
# endif
|
||||
#else
|
||||
# define ALIBABACLOUD_WORKORDER_EXPORT
|
||||
#endif
|
||||
|
||||
#endif // !ALIBABACLOUD_WORKORDER_WORKORDEREXPORT_H_
|
||||
@@ -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_WORKORDER_MODEL_CLOSETICKETREQUEST_H_
|
||||
#define ALIBABACLOUD_WORKORDER_MODEL_CLOSETICKETREQUEST_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 CloseTicketRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
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_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_WORKORDER_MODEL_CLOSETICKETREQUEST_H_
|
||||
@@ -14,40 +14,42 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_HBASE_MODEL_CREATEINSTANCERESULT_H_
|
||||
#define ALIBABACLOUD_HBASE_MODEL_CREATEINSTANCERESULT_H_
|
||||
#ifndef ALIBABACLOUD_WORKORDER_MODEL_CLOSETICKETRESULT_H_
|
||||
#define ALIBABACLOUD_WORKORDER_MODEL_CLOSETICKETRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/hbase/HBaseExport.h>
|
||||
#include <alibabacloud/workorder/WorkorderExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace HBase
|
||||
namespace Workorder
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_HBASE_EXPORT CreateInstanceResult : public ServiceResult
|
||||
class ALIBABACLOUD_WORKORDER_EXPORT CloseTicketResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
CreateInstanceResult();
|
||||
explicit CreateInstanceResult(const std::string &payload);
|
||||
~CreateInstanceResult();
|
||||
std::string getClusterId()const;
|
||||
std::string getOrderId()const;
|
||||
CloseTicketResult();
|
||||
explicit CloseTicketResult(const std::string &payload);
|
||||
~CloseTicketResult();
|
||||
std::string getMessage()const;
|
||||
int getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string clusterId_;
|
||||
std::string orderId_;
|
||||
std::string message_;
|
||||
int code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_HBASE_MODEL_CREATEINSTANCERESULT_H_
|
||||
#endif // !ALIBABACLOUD_WORKORDER_MODEL_CLOSETICKETRESULT_H_
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_WORKORDER_MODEL_CREATETICKETREQUEST_H_
|
||||
#define ALIBABACLOUD_WORKORDER_MODEL_CREATETICKETREQUEST_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 CreateTicketRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
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);
|
||||
|
||||
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_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_WORKORDER_MODEL_CREATETICKETREQUEST_H_
|
||||
@@ -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_CREATETICKETRESULT_H_
|
||||
#define ALIBABACLOUD_WORKORDER_MODEL_CREATETICKETRESULT_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 CreateTicketResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
CreateTicketResult();
|
||||
explicit CreateTicketResult(const std::string &payload);
|
||||
~CreateTicketResult();
|
||||
std::string getMessage()const;
|
||||
std::string getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_WORKORDER_MODEL_CREATETICKETRESULT_H_
|
||||
@@ -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_WORKORDER_MODEL_LISTCATEGORIESREQUEST_H_
|
||||
#define ALIBABACLOUD_WORKORDER_MODEL_LISTCATEGORIESREQUEST_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 ListCategoriesRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
ListCategoriesRequest();
|
||||
~ListCategoriesRequest();
|
||||
|
||||
std::string getProductCode()const;
|
||||
void setProductCode(const std::string& productCode);
|
||||
std::string getLanguage()const;
|
||||
void setLanguage(const std::string& language);
|
||||
|
||||
private:
|
||||
std::string productCode_;
|
||||
std::string language_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_WORKORDER_MODEL_LISTCATEGORIESREQUEST_H_
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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_LISTCATEGORIESRESULT_H_
|
||||
#define ALIBABACLOUD_WORKORDER_MODEL_LISTCATEGORIESRESULT_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 ListCategoriesResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct ListItem
|
||||
{
|
||||
int id;
|
||||
std::string name;
|
||||
};
|
||||
std::vector<ListItem> list;
|
||||
};
|
||||
|
||||
|
||||
ListCategoriesResult();
|
||||
explicit ListCategoriesResult(const std::string &payload);
|
||||
~ListCategoriesResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
int getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
int code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_WORKORDER_MODEL_LISTCATEGORIESRESULT_H_
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* 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_LISTPRODUCTSREQUEST_H_
|
||||
#define ALIBABACLOUD_WORKORDER_MODEL_LISTPRODUCTSREQUEST_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 ListProductsRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
ListProductsRequest();
|
||||
~ListProductsRequest();
|
||||
|
||||
std::string getLanguage()const;
|
||||
void setLanguage(const std::string& language);
|
||||
|
||||
private:
|
||||
std::string language_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_WORKORDER_MODEL_LISTPRODUCTSREQUEST_H_
|
||||
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* 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_LISTPRODUCTSRESULT_H_
|
||||
#define ALIBABACLOUD_WORKORDER_MODEL_LISTPRODUCTSRESULT_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 ListProductsResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct TechMoreItem
|
||||
{
|
||||
struct ProductListItem
|
||||
{
|
||||
std::string description;
|
||||
std::string productCode;
|
||||
std::string name;
|
||||
};
|
||||
std::vector<TechMoreItem::ProductListItem> productList;
|
||||
std::string groupName;
|
||||
};
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
ListProductsResult();
|
||||
explicit ListProductsResult(const std::string &payload);
|
||||
~ListProductsResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
int getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
int code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_WORKORDER_MODEL_LISTPRODUCTSRESULT_H_
|
||||
@@ -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_WORKORDER_MODEL_LISTTICKETNOTESREQUEST_H_
|
||||
#define ALIBABACLOUD_WORKORDER_MODEL_LISTTICKETNOTESREQUEST_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 ListTicketNotesRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
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_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_WORKORDER_MODEL_LISTTICKETNOTESREQUEST_H_
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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_LISTTICKETNOTESRESULT_H_
|
||||
#define ALIBABACLOUD_WORKORDER_MODEL_LISTTICKETNOTESRESULT_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 ListTicketNotesResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct ListItem
|
||||
{
|
||||
std::string noteId;
|
||||
bool fromOfficial;
|
||||
std::string content;
|
||||
int gmtCreated;
|
||||
};
|
||||
std::vector<ListItem> list;
|
||||
};
|
||||
|
||||
|
||||
ListTicketNotesResult();
|
||||
explicit ListTicketNotesResult(const std::string &payload);
|
||||
~ListTicketNotesResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
int getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
int code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_WORKORDER_MODEL_LISTTICKETNOTESRESULT_H_
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_WORKORDER_MODEL_LISTTICKETSREQUEST_H_
|
||||
#define ALIBABACLOUD_WORKORDER_MODEL_LISTTICKETSREQUEST_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 ListTicketsRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
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);
|
||||
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);
|
||||
|
||||
private:
|
||||
std::string productCode_;
|
||||
std::string language_;
|
||||
std::string subUserId_;
|
||||
long createdBeforeTime_;
|
||||
int pageSize_;
|
||||
std::string ids_;
|
||||
std::string ticketStatus_;
|
||||
int pageStart_;
|
||||
long createdAfterTime_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_WORKORDER_MODEL_LISTTICKETSREQUEST_H_
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_WORKORDER_MODEL_LISTTICKETSRESULT_H_
|
||||
#define ALIBABACLOUD_WORKORDER_MODEL_LISTTICKETSRESULT_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 ListTicketsResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct ListItem
|
||||
{
|
||||
std::string creatorId;
|
||||
std::string title;
|
||||
std::string ticketStatus;
|
||||
std::string id;
|
||||
int addTime;
|
||||
};
|
||||
int pageSize;
|
||||
int currentPage;
|
||||
int total;
|
||||
std::vector<ListItem> list;
|
||||
};
|
||||
|
||||
|
||||
ListTicketsResult();
|
||||
explicit ListTicketsResult(const std::string &payload);
|
||||
~ListTicketsResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
int getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
int code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_WORKORDER_MODEL_LISTTICKETSRESULT_H_
|
||||
@@ -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_REPLYTICKETREQUEST_H_
|
||||
#define ALIBABACLOUD_WORKORDER_MODEL_REPLYTICKETREQUEST_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 ReplyTicketRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
ReplyTicketRequest();
|
||||
~ReplyTicketRequest();
|
||||
|
||||
std::string getLanguage()const;
|
||||
void setLanguage(const std::string& language);
|
||||
std::string getTicketId()const;
|
||||
void setTicketId(const std::string& ticketId);
|
||||
std::string getContent()const;
|
||||
void setContent(const std::string& content);
|
||||
std::string getSecretContent()const;
|
||||
void setSecretContent(const std::string& secretContent);
|
||||
|
||||
private:
|
||||
std::string language_;
|
||||
std::string ticketId_;
|
||||
std::string content_;
|
||||
std::string secretContent_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_WORKORDER_MODEL_REPLYTICKETREQUEST_H_
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* 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_REPLYTICKETRESULT_H_
|
||||
#define ALIBABACLOUD_WORKORDER_MODEL_REPLYTICKETRESULT_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 ReplyTicketResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
ReplyTicketResult();
|
||||
explicit ReplyTicketResult(const std::string &payload);
|
||||
~ReplyTicketResult();
|
||||
std::string getMessage()const;
|
||||
int getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
int code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_WORKORDER_MODEL_REPLYTICKETRESULT_H_
|
||||
305
workorder/src/WorkorderClient.cc
Normal file
305
workorder/src/WorkorderClient.cc
Normal file
@@ -0,0 +1,305 @@
|
||||
/*
|
||||
* 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/WorkorderClient.h>
|
||||
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||
|
||||
using namespace AlibabaCloud;
|
||||
using namespace AlibabaCloud::Location;
|
||||
using namespace AlibabaCloud::Workorder;
|
||||
using namespace AlibabaCloud::Workorder::Model;
|
||||
|
||||
namespace
|
||||
{
|
||||
const std::string SERVICE_NAME = "Workorder";
|
||||
}
|
||||
|
||||
WorkorderClient::WorkorderClient(const Credentials &credentials, const ClientConfiguration &configuration) :
|
||||
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");
|
||||
}
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
WorkorderClient::~WorkorderClient()
|
||||
{}
|
||||
|
||||
WorkorderClient::CloseTicketOutcome WorkorderClient::closeTicket(const CloseTicketRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CloseTicketOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CloseTicketOutcome(CloseTicketResult(outcome.result()));
|
||||
else
|
||||
return CloseTicketOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void WorkorderClient::closeTicketAsync(const CloseTicketRequest& request, const CloseTicketAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, closeTicket(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
WorkorderClient::CloseTicketOutcomeCallable WorkorderClient::closeTicketCallable(const CloseTicketRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CloseTicketOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->closeTicket(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
WorkorderClient::CreateTicketOutcome WorkorderClient::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 WorkorderClient::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));
|
||||
}
|
||||
|
||||
WorkorderClient::CreateTicketOutcomeCallable WorkorderClient::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();
|
||||
}
|
||||
|
||||
WorkorderClient::ListCategoriesOutcome WorkorderClient::listCategories(const ListCategoriesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListCategoriesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListCategoriesOutcome(ListCategoriesResult(outcome.result()));
|
||||
else
|
||||
return ListCategoriesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void WorkorderClient::listCategoriesAsync(const ListCategoriesRequest& request, const ListCategoriesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listCategories(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
WorkorderClient::ListCategoriesOutcomeCallable WorkorderClient::listCategoriesCallable(const ListCategoriesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListCategoriesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listCategories(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
WorkorderClient::ListProductsOutcome WorkorderClient::listProducts(const ListProductsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListProductsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListProductsOutcome(ListProductsResult(outcome.result()));
|
||||
else
|
||||
return ListProductsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void WorkorderClient::listProductsAsync(const ListProductsRequest& request, const ListProductsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listProducts(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
WorkorderClient::ListProductsOutcomeCallable WorkorderClient::listProductsCallable(const ListProductsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListProductsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listProducts(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
WorkorderClient::ListTicketNotesOutcome WorkorderClient::listTicketNotes(const ListTicketNotesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListTicketNotesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListTicketNotesOutcome(ListTicketNotesResult(outcome.result()));
|
||||
else
|
||||
return ListTicketNotesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void WorkorderClient::listTicketNotesAsync(const ListTicketNotesRequest& request, const ListTicketNotesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listTicketNotes(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
WorkorderClient::ListTicketNotesOutcomeCallable WorkorderClient::listTicketNotesCallable(const ListTicketNotesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListTicketNotesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listTicketNotes(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
WorkorderClient::ListTicketsOutcome WorkorderClient::listTickets(const ListTicketsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListTicketsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListTicketsOutcome(ListTicketsResult(outcome.result()));
|
||||
else
|
||||
return ListTicketsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void WorkorderClient::listTicketsAsync(const ListTicketsRequest& request, const ListTicketsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listTickets(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
WorkorderClient::ListTicketsOutcomeCallable WorkorderClient::listTicketsCallable(const ListTicketsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListTicketsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listTickets(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
WorkorderClient::ReplyTicketOutcome WorkorderClient::replyTicket(const ReplyTicketRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ReplyTicketOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ReplyTicketOutcome(ReplyTicketResult(outcome.result()));
|
||||
else
|
||||
return ReplyTicketOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void WorkorderClient::replyTicketAsync(const ReplyTicketRequest& request, const ReplyTicketAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, replyTicket(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
WorkorderClient::ReplyTicketOutcomeCallable WorkorderClient::replyTicketCallable(const ReplyTicketRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ReplyTicketOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->replyTicket(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
51
workorder/src/model/CloseTicketRequest.cc
Normal file
51
workorder/src/model/CloseTicketRequest.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/workorder/model/CloseTicketRequest.h>
|
||||
|
||||
using AlibabaCloud::Workorder::Model::CloseTicketRequest;
|
||||
|
||||
CloseTicketRequest::CloseTicketRequest() :
|
||||
RpcServiceRequest("workorder", "2020-03-26", "CloseTicket")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
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_;
|
||||
}
|
||||
|
||||
void CloseTicketRequest::setTicketId(const std::string& ticketId)
|
||||
{
|
||||
ticketId_ = ticketId;
|
||||
setParameter("TicketId", ticketId);
|
||||
}
|
||||
|
||||
@@ -14,45 +14,52 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/hbase/model/CreateInstanceResult.h>
|
||||
#include <alibabacloud/workorder/model/CloseTicketResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::HBase;
|
||||
using namespace AlibabaCloud::HBase::Model;
|
||||
using namespace AlibabaCloud::Workorder;
|
||||
using namespace AlibabaCloud::Workorder::Model;
|
||||
|
||||
CreateInstanceResult::CreateInstanceResult() :
|
||||
CloseTicketResult::CloseTicketResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateInstanceResult::CreateInstanceResult(const std::string &payload) :
|
||||
CloseTicketResult::CloseTicketResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateInstanceResult::~CreateInstanceResult()
|
||||
CloseTicketResult::~CloseTicketResult()
|
||||
{}
|
||||
|
||||
void CreateInstanceResult::parse(const std::string &payload)
|
||||
void CloseTicketResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ClusterId"].isNull())
|
||||
clusterId_ = value["ClusterId"].asString();
|
||||
if(!value["OrderId"].isNull())
|
||||
orderId_ = value["OrderId"].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();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateInstanceResult::getClusterId()const
|
||||
std::string CloseTicketResult::getMessage()const
|
||||
{
|
||||
return clusterId_;
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string CreateInstanceResult::getOrderId()const
|
||||
int CloseTicketResult::getCode()const
|
||||
{
|
||||
return orderId_;
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool CloseTicketResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
128
workorder/src/model/CreateTicketRequest.cc
Normal file
128
workorder/src/model/CreateTicketRequest.cc
Normal file
@@ -0,0 +1,128 @@
|
||||
/*
|
||||
* 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/CreateTicketRequest.h>
|
||||
|
||||
using AlibabaCloud::Workorder::Model::CreateTicketRequest;
|
||||
|
||||
CreateTicketRequest::CreateTicketRequest() :
|
||||
RpcServiceRequest("workorder", "2020-03-26", "CreateTicket")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateTicketRequest::~CreateTicketRequest()
|
||||
{}
|
||||
|
||||
std::string CreateTicketRequest::getProductCode()const
|
||||
{
|
||||
return productCode_;
|
||||
}
|
||||
|
||||
void CreateTicketRequest::setProductCode(const std::string& productCode)
|
||||
{
|
||||
productCode_ = productCode;
|
||||
setParameter("ProductCode", productCode);
|
||||
}
|
||||
|
||||
std::string CreateTicketRequest::getLanguage()const
|
||||
{
|
||||
return language_;
|
||||
}
|
||||
|
||||
void CreateTicketRequest::setLanguage(const std::string& language)
|
||||
{
|
||||
language_ = language;
|
||||
setParameter("Language", language);
|
||||
}
|
||||
|
||||
std::string CreateTicketRequest::getTitle()const
|
||||
{
|
||||
return title_;
|
||||
}
|
||||
|
||||
void CreateTicketRequest::setTitle(const std::string& title)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
72
workorder/src/model/CreateTicketResult.cc
Normal file
72
workorder/src/model/CreateTicketResult.cc
Normal 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/CreateTicketResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Workorder;
|
||||
using namespace AlibabaCloud::Workorder::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["Code"].isNull())
|
||||
code_ = 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();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateTicketResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string CreateTicketResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string CreateTicketResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool CreateTicketResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
51
workorder/src/model/ListCategoriesRequest.cc
Normal file
51
workorder/src/model/ListCategoriesRequest.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/workorder/model/ListCategoriesRequest.h>
|
||||
|
||||
using AlibabaCloud::Workorder::Model::ListCategoriesRequest;
|
||||
|
||||
ListCategoriesRequest::ListCategoriesRequest() :
|
||||
RpcServiceRequest("workorder", "2020-03-26", "ListCategories")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListCategoriesRequest::~ListCategoriesRequest()
|
||||
{}
|
||||
|
||||
std::string ListCategoriesRequest::getProductCode()const
|
||||
{
|
||||
return productCode_;
|
||||
}
|
||||
|
||||
void ListCategoriesRequest::setProductCode(const std::string& productCode)
|
||||
{
|
||||
productCode_ = productCode;
|
||||
setParameter("ProductCode", productCode);
|
||||
}
|
||||
|
||||
std::string ListCategoriesRequest::getLanguage()const
|
||||
{
|
||||
return language_;
|
||||
}
|
||||
|
||||
void ListCategoriesRequest::setLanguage(const std::string& language)
|
||||
{
|
||||
language_ = language;
|
||||
setParameter("Language", language);
|
||||
}
|
||||
|
||||
81
workorder/src/model/ListCategoriesResult.cc
Normal file
81
workorder/src/model/ListCategoriesResult.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/workorder/model/ListCategoriesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Workorder;
|
||||
using namespace AlibabaCloud::Workorder::Model;
|
||||
|
||||
ListCategoriesResult::ListCategoriesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListCategoriesResult::ListCategoriesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListCategoriesResult::~ListCategoriesResult()
|
||||
{}
|
||||
|
||||
void ListCategoriesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto allListNode = dataNode["List"]["ListItem"];
|
||||
for (auto dataNodeListListItem : allListNode)
|
||||
{
|
||||
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);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::string ListCategoriesResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
ListCategoriesResult::Data ListCategoriesResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
int ListCategoriesResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ListCategoriesResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
40
workorder/src/model/ListProductsRequest.cc
Normal file
40
workorder/src/model/ListProductsRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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/ListProductsRequest.h>
|
||||
|
||||
using AlibabaCloud::Workorder::Model::ListProductsRequest;
|
||||
|
||||
ListProductsRequest::ListProductsRequest() :
|
||||
RpcServiceRequest("workorder", "2020-03-26", "ListProducts")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListProductsRequest::~ListProductsRequest()
|
||||
{}
|
||||
|
||||
std::string ListProductsRequest::getLanguage()const
|
||||
{
|
||||
return language_;
|
||||
}
|
||||
|
||||
void ListProductsRequest::setLanguage(const std::string& language)
|
||||
{
|
||||
language_ = language;
|
||||
setParameter("Language", language);
|
||||
}
|
||||
|
||||
127
workorder/src/model/ListProductsResult.cc
Normal file
127
workorder/src/model/ListProductsResult.cc
Normal file
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
* 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/ListProductsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Workorder;
|
||||
using namespace AlibabaCloud::Workorder::Model;
|
||||
|
||||
ListProductsResult::ListProductsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListProductsResult::ListProductsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListProductsResult::~ListProductsResult()
|
||||
{}
|
||||
|
||||
void ListProductsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto allTechMoreNode = dataNode["TechMore"]["TechMoreItem"];
|
||||
for (auto dataNodeTechMoreTechMoreItem : allTechMoreNode)
|
||||
{
|
||||
Data::TechMoreItem techMoreItemObject;
|
||||
if(!dataNodeTechMoreTechMoreItem["GroupName"].isNull())
|
||||
techMoreItemObject.groupName = dataNodeTechMoreTechMoreItem["GroupName"].asString();
|
||||
auto allProductListNode = allTechMoreNode["ProductList"]["ProductListItem"];
|
||||
for (auto allTechMoreNodeProductListProductListItem : allProductListNode)
|
||||
{
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
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();
|
||||
|
||||
}
|
||||
|
||||
std::string ListProductsResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
ListProductsResult::Data ListProductsResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
int ListProductsResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ListProductsResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
51
workorder/src/model/ListTicketNotesRequest.cc
Normal file
51
workorder/src/model/ListTicketNotesRequest.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/workorder/model/ListTicketNotesRequest.h>
|
||||
|
||||
using AlibabaCloud::Workorder::Model::ListTicketNotesRequest;
|
||||
|
||||
ListTicketNotesRequest::ListTicketNotesRequest() :
|
||||
RpcServiceRequest("workorder", "2020-03-26", "ListTicketNotes")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
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_;
|
||||
}
|
||||
|
||||
void ListTicketNotesRequest::setTicketId(const std::string& ticketId)
|
||||
{
|
||||
ticketId_ = ticketId;
|
||||
setParameter("TicketId", ticketId);
|
||||
}
|
||||
|
||||
85
workorder/src/model/ListTicketNotesResult.cc
Normal file
85
workorder/src/model/ListTicketNotesResult.cc
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* 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/ListTicketNotesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Workorder;
|
||||
using namespace AlibabaCloud::Workorder::Model;
|
||||
|
||||
ListTicketNotesResult::ListTicketNotesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListTicketNotesResult::ListTicketNotesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListTicketNotesResult::~ListTicketNotesResult()
|
||||
{}
|
||||
|
||||
void ListTicketNotesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto allListNode = dataNode["List"]["ListItem"];
|
||||
for (auto dataNodeListListItem : allListNode)
|
||||
{
|
||||
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);
|
||||
}
|
||||
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();
|
||||
|
||||
}
|
||||
|
||||
std::string ListTicketNotesResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
ListTicketNotesResult::Data ListTicketNotesResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
int ListTicketNotesResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ListTicketNotesResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
128
workorder/src/model/ListTicketsRequest.cc
Normal file
128
workorder/src/model/ListTicketsRequest.cc
Normal file
@@ -0,0 +1,128 @@
|
||||
/*
|
||||
* 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/ListTicketsRequest.h>
|
||||
|
||||
using AlibabaCloud::Workorder::Model::ListTicketsRequest;
|
||||
|
||||
ListTicketsRequest::ListTicketsRequest() :
|
||||
RpcServiceRequest("workorder", "2020-03-26", "ListTickets")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListTicketsRequest::~ListTicketsRequest()
|
||||
{}
|
||||
|
||||
std::string ListTicketsRequest::getProductCode()const
|
||||
{
|
||||
return productCode_;
|
||||
}
|
||||
|
||||
void ListTicketsRequest::setProductCode(const std::string& productCode)
|
||||
{
|
||||
productCode_ = productCode;
|
||||
setParameter("ProductCode", productCode);
|
||||
}
|
||||
|
||||
std::string ListTicketsRequest::getLanguage()const
|
||||
{
|
||||
return language_;
|
||||
}
|
||||
|
||||
void ListTicketsRequest::setLanguage(const std::string& language)
|
||||
{
|
||||
language_ = language;
|
||||
setParameter("Language", language);
|
||||
}
|
||||
|
||||
std::string ListTicketsRequest::getSubUserId()const
|
||||
{
|
||||
return subUserId_;
|
||||
}
|
||||
|
||||
void ListTicketsRequest::setSubUserId(const std::string& subUserId)
|
||||
{
|
||||
subUserId_ = subUserId;
|
||||
setParameter("SubUserId", subUserId);
|
||||
}
|
||||
|
||||
long ListTicketsRequest::getCreatedBeforeTime()const
|
||||
{
|
||||
return createdBeforeTime_;
|
||||
}
|
||||
|
||||
void ListTicketsRequest::setCreatedBeforeTime(long createdBeforeTime)
|
||||
{
|
||||
createdBeforeTime_ = createdBeforeTime;
|
||||
setParameter("CreatedBeforeTime", std::to_string(createdBeforeTime));
|
||||
}
|
||||
|
||||
int ListTicketsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListTicketsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string ListTicketsRequest::getIds()const
|
||||
{
|
||||
return ids_;
|
||||
}
|
||||
|
||||
void ListTicketsRequest::setIds(const std::string& ids)
|
||||
{
|
||||
ids_ = ids;
|
||||
setParameter("Ids", ids);
|
||||
}
|
||||
|
||||
std::string ListTicketsRequest::getTicketStatus()const
|
||||
{
|
||||
return ticketStatus_;
|
||||
}
|
||||
|
||||
void ListTicketsRequest::setTicketStatus(const std::string& ticketStatus)
|
||||
{
|
||||
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));
|
||||
}
|
||||
|
||||
93
workorder/src/model/ListTicketsResult.cc
Normal file
93
workorder/src/model/ListTicketsResult.cc
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* 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/ListTicketsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Workorder;
|
||||
using namespace AlibabaCloud::Workorder::Model;
|
||||
|
||||
ListTicketsResult::ListTicketsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListTicketsResult::ListTicketsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListTicketsResult::~ListTicketsResult()
|
||||
{}
|
||||
|
||||
void ListTicketsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
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();
|
||||
|
||||
}
|
||||
|
||||
std::string ListTicketsResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
ListTicketsResult::Data ListTicketsResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
int ListTicketsResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ListTicketsResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
73
workorder/src/model/ReplyTicketRequest.cc
Normal file
73
workorder/src/model/ReplyTicketRequest.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* 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/ReplyTicketRequest.h>
|
||||
|
||||
using AlibabaCloud::Workorder::Model::ReplyTicketRequest;
|
||||
|
||||
ReplyTicketRequest::ReplyTicketRequest() :
|
||||
RpcServiceRequest("workorder", "2020-03-26", "ReplyTicket")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ReplyTicketRequest::~ReplyTicketRequest()
|
||||
{}
|
||||
|
||||
std::string ReplyTicketRequest::getLanguage()const
|
||||
{
|
||||
return language_;
|
||||
}
|
||||
|
||||
void ReplyTicketRequest::setLanguage(const std::string& language)
|
||||
{
|
||||
language_ = language;
|
||||
setParameter("Language", language);
|
||||
}
|
||||
|
||||
std::string ReplyTicketRequest::getTicketId()const
|
||||
{
|
||||
return ticketId_;
|
||||
}
|
||||
|
||||
void ReplyTicketRequest::setTicketId(const std::string& ticketId)
|
||||
{
|
||||
ticketId_ = ticketId;
|
||||
setParameter("TicketId", ticketId);
|
||||
}
|
||||
|
||||
std::string ReplyTicketRequest::getContent()const
|
||||
{
|
||||
return content_;
|
||||
}
|
||||
|
||||
void ReplyTicketRequest::setContent(const std::string& content)
|
||||
{
|
||||
content_ = content;
|
||||
setParameter("Content", content);
|
||||
}
|
||||
|
||||
std::string ReplyTicketRequest::getSecretContent()const
|
||||
{
|
||||
return secretContent_;
|
||||
}
|
||||
|
||||
void ReplyTicketRequest::setSecretContent(const std::string& secretContent)
|
||||
{
|
||||
secretContent_ = secretContent;
|
||||
setParameter("SecretContent", secretContent);
|
||||
}
|
||||
|
||||
65
workorder/src/model/ReplyTicketResult.cc
Normal file
65
workorder/src/model/ReplyTicketResult.cc
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* 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/ReplyTicketResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Workorder;
|
||||
using namespace AlibabaCloud::Workorder::Model;
|
||||
|
||||
ReplyTicketResult::ReplyTicketResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ReplyTicketResult::ReplyTicketResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ReplyTicketResult::~ReplyTicketResult()
|
||||
{}
|
||||
|
||||
void ReplyTicketResult::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["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ReplyTicketResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int ReplyTicketResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ReplyTicketResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user