From 46971a81dbb75e052d2265ff7726d2bb348c5a32 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Wed, 23 Dec 2020 07:55:12 +0000 Subject: [PATCH] CDRS First edition. --- CHANGELOG | 3 + cdrs/CMakeLists.txt | 20 ++- cdrs/include/alibabacloud/cdrs/CDRSClient.h | 32 ++++ .../cdrs/model/BindDeviceRequest.h | 63 ++++++++ .../cdrs/model/BindDeviceResult.h | 62 ++++++++ .../cdrs/model/CreateProjectRequest.h | 63 ++++++++ .../cdrs/model/CreateProjectResult.h | 55 +++++++ .../cdrs/model/UnbindDeviceRequest.h | 57 +++++++ .../cdrs/model/UnbindDeviceResult.h | 62 ++++++++ .../cdrs/model/UpdateProjectRequest.h | 63 ++++++++ .../cdrs/model/UpdateProjectResult.h | 53 +++++++ cdrs/src/CDRSClient.cc | 144 ++++++++++++++++++ cdrs/src/model/BindDeviceRequest.cc | 78 ++++++++++ cdrs/src/model/BindDeviceResult.cc | 77 ++++++++++ cdrs/src/model/CreateProjectRequest.cc | 95 ++++++++++++ cdrs/src/model/CreateProjectResult.cc | 65 ++++++++ cdrs/src/model/UnbindDeviceRequest.cc | 73 +++++++++ cdrs/src/model/UnbindDeviceResult.cc | 77 ++++++++++ cdrs/src/model/UpdateProjectRequest.cc | 95 ++++++++++++ cdrs/src/model/UpdateProjectResult.cc | 58 +++++++ 20 files changed, 1293 insertions(+), 2 deletions(-) create mode 100644 cdrs/include/alibabacloud/cdrs/model/BindDeviceRequest.h create mode 100644 cdrs/include/alibabacloud/cdrs/model/BindDeviceResult.h create mode 100644 cdrs/include/alibabacloud/cdrs/model/CreateProjectRequest.h create mode 100644 cdrs/include/alibabacloud/cdrs/model/CreateProjectResult.h create mode 100644 cdrs/include/alibabacloud/cdrs/model/UnbindDeviceRequest.h create mode 100644 cdrs/include/alibabacloud/cdrs/model/UnbindDeviceResult.h create mode 100644 cdrs/include/alibabacloud/cdrs/model/UpdateProjectRequest.h create mode 100644 cdrs/include/alibabacloud/cdrs/model/UpdateProjectResult.h create mode 100644 cdrs/src/model/BindDeviceRequest.cc create mode 100644 cdrs/src/model/BindDeviceResult.cc create mode 100644 cdrs/src/model/CreateProjectRequest.cc create mode 100644 cdrs/src/model/CreateProjectResult.cc create mode 100644 cdrs/src/model/UnbindDeviceRequest.cc create mode 100644 cdrs/src/model/UnbindDeviceResult.cc create mode 100644 cdrs/src/model/UpdateProjectRequest.cc create mode 100644 cdrs/src/model/UpdateProjectResult.cc diff --git a/CHANGELOG b/CHANGELOG index 4e660f765..0e1136282 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2020-12-23 Version: patch +- CDRS First edition. + 2020-12-23 Version: patch - Add 2019 openapi. diff --git a/cdrs/CMakeLists.txt b/cdrs/CMakeLists.txt index bcc6bd152..810a22aa5 100644 --- a/cdrs/CMakeLists.txt +++ b/cdrs/CMakeLists.txt @@ -21,6 +21,10 @@ set(cdrs_public_header include/alibabacloud/cdrs/CDRSExport.h ) set(cdrs_public_header_model + include/alibabacloud/cdrs/model/BindDeviceRequest.h + include/alibabacloud/cdrs/model/BindDeviceResult.h + include/alibabacloud/cdrs/model/CreateProjectRequest.h + include/alibabacloud/cdrs/model/CreateProjectResult.h include/alibabacloud/cdrs/model/ListCityMapAoisRequest.h include/alibabacloud/cdrs/model/ListCityMapAoisResult.h include/alibabacloud/cdrs/model/ListCityMapCameraResultsRequest.h @@ -76,10 +80,18 @@ set(cdrs_public_header_model include/alibabacloud/cdrs/model/RecognizeImageRequest.h include/alibabacloud/cdrs/model/RecognizeImageResult.h include/alibabacloud/cdrs/model/SearchObjectRequest.h - include/alibabacloud/cdrs/model/SearchObjectResult.h ) + include/alibabacloud/cdrs/model/SearchObjectResult.h + include/alibabacloud/cdrs/model/UnbindDeviceRequest.h + include/alibabacloud/cdrs/model/UnbindDeviceResult.h + include/alibabacloud/cdrs/model/UpdateProjectRequest.h + include/alibabacloud/cdrs/model/UpdateProjectResult.h ) set(cdrs_src src/CDRSClient.cc + src/model/BindDeviceRequest.cc + src/model/BindDeviceResult.cc + src/model/CreateProjectRequest.cc + src/model/CreateProjectResult.cc src/model/ListCityMapAoisRequest.cc src/model/ListCityMapAoisResult.cc src/model/ListCityMapCameraResultsRequest.cc @@ -135,7 +147,11 @@ set(cdrs_src src/model/RecognizeImageRequest.cc src/model/RecognizeImageResult.cc src/model/SearchObjectRequest.cc - src/model/SearchObjectResult.cc ) + src/model/SearchObjectResult.cc + src/model/UnbindDeviceRequest.cc + src/model/UnbindDeviceResult.cc + src/model/UpdateProjectRequest.cc + src/model/UpdateProjectResult.cc ) add_library(cdrs ${LIB_TYPE} ${cdrs_public_header} diff --git a/cdrs/include/alibabacloud/cdrs/CDRSClient.h b/cdrs/include/alibabacloud/cdrs/CDRSClient.h index f16e9e55b..fcbf95169 100644 --- a/cdrs/include/alibabacloud/cdrs/CDRSClient.h +++ b/cdrs/include/alibabacloud/cdrs/CDRSClient.h @@ -22,6 +22,10 @@ #include #include #include "CDRSExport.h" +#include "model/BindDeviceRequest.h" +#include "model/BindDeviceResult.h" +#include "model/CreateProjectRequest.h" +#include "model/CreateProjectResult.h" #include "model/ListCityMapAoisRequest.h" #include "model/ListCityMapAoisResult.h" #include "model/ListCityMapCameraResultsRequest.h" @@ -78,6 +82,10 @@ #include "model/RecognizeImageResult.h" #include "model/SearchObjectRequest.h" #include "model/SearchObjectResult.h" +#include "model/UnbindDeviceRequest.h" +#include "model/UnbindDeviceResult.h" +#include "model/UpdateProjectRequest.h" +#include "model/UpdateProjectResult.h" namespace AlibabaCloud @@ -87,6 +95,12 @@ namespace AlibabaCloud class ALIBABACLOUD_CDRS_EXPORT CDRSClient : public RpcServiceClient { public: + typedef Outcome BindDeviceOutcome; + typedef std::future BindDeviceOutcomeCallable; + typedef std::function&)> BindDeviceAsyncHandler; + typedef Outcome CreateProjectOutcome; + typedef std::future CreateProjectOutcomeCallable; + typedef std::function&)> CreateProjectAsyncHandler; typedef Outcome ListCityMapAoisOutcome; typedef std::future ListCityMapAoisOutcomeCallable; typedef std::function&)> ListCityMapAoisAsyncHandler; @@ -171,11 +185,23 @@ namespace AlibabaCloud typedef Outcome SearchObjectOutcome; typedef std::future SearchObjectOutcomeCallable; typedef std::function&)> SearchObjectAsyncHandler; + typedef Outcome UnbindDeviceOutcome; + typedef std::future UnbindDeviceOutcomeCallable; + typedef std::function&)> UnbindDeviceAsyncHandler; + typedef Outcome UpdateProjectOutcome; + typedef std::future UpdateProjectOutcomeCallable; + typedef std::function&)> UpdateProjectAsyncHandler; CDRSClient(const Credentials &credentials, const ClientConfiguration &configuration); CDRSClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); CDRSClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); ~CDRSClient(); + BindDeviceOutcome bindDevice(const Model::BindDeviceRequest &request)const; + void bindDeviceAsync(const Model::BindDeviceRequest& request, const BindDeviceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + BindDeviceOutcomeCallable bindDeviceCallable(const Model::BindDeviceRequest& request) const; + CreateProjectOutcome createProject(const Model::CreateProjectRequest &request)const; + void createProjectAsync(const Model::CreateProjectRequest& request, const CreateProjectAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateProjectOutcomeCallable createProjectCallable(const Model::CreateProjectRequest& request) const; ListCityMapAoisOutcome listCityMapAois(const Model::ListCityMapAoisRequest &request)const; void listCityMapAoisAsync(const Model::ListCityMapAoisRequest& request, const ListCityMapAoisAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListCityMapAoisOutcomeCallable listCityMapAoisCallable(const Model::ListCityMapAoisRequest& request) const; @@ -260,6 +286,12 @@ namespace AlibabaCloud SearchObjectOutcome searchObject(const Model::SearchObjectRequest &request)const; void searchObjectAsync(const Model::SearchObjectRequest& request, const SearchObjectAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; SearchObjectOutcomeCallable searchObjectCallable(const Model::SearchObjectRequest& request) const; + UnbindDeviceOutcome unbindDevice(const Model::UnbindDeviceRequest &request)const; + void unbindDeviceAsync(const Model::UnbindDeviceRequest& request, const UnbindDeviceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UnbindDeviceOutcomeCallable unbindDeviceCallable(const Model::UnbindDeviceRequest& request) const; + UpdateProjectOutcome updateProject(const Model::UpdateProjectRequest &request)const; + void updateProjectAsync(const Model::UpdateProjectRequest& request, const UpdateProjectAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UpdateProjectOutcomeCallable updateProjectCallable(const Model::UpdateProjectRequest& request) const; private: std::shared_ptr endpointProvider_; diff --git a/cdrs/include/alibabacloud/cdrs/model/BindDeviceRequest.h b/cdrs/include/alibabacloud/cdrs/model/BindDeviceRequest.h new file mode 100644 index 000000000..44345e96f --- /dev/null +++ b/cdrs/include/alibabacloud/cdrs/model/BindDeviceRequest.h @@ -0,0 +1,63 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CDRS_MODEL_BINDDEVICEREQUEST_H_ +#define ALIBABACLOUD_CDRS_MODEL_BINDDEVICEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace CDRS + { + namespace Model + { + class ALIBABACLOUD_CDRS_EXPORT BindDeviceRequest : public RpcServiceRequest + { + public: + struct Devices + { + std::string corpId; + std::string deviceId; + }; + + public: + BindDeviceRequest(); + ~BindDeviceRequest(); + + std::string getCorpId()const; + void setCorpId(const std::string& corpId); + std::vector getDevices()const; + void setDevices(const std::vector& devices); + std::string getAppName()const; + void setAppName(const std::string& appName); + std::string get_NameSpace()const; + void set_NameSpace(const std::string& _nameSpace); + + private: + std::string corpId_; + std::vector devices_; + std::string appName_; + std::string _nameSpace_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CDRS_MODEL_BINDDEVICEREQUEST_H_ \ No newline at end of file diff --git a/cdrs/include/alibabacloud/cdrs/model/BindDeviceResult.h b/cdrs/include/alibabacloud/cdrs/model/BindDeviceResult.h new file mode 100644 index 000000000..1bdb30095 --- /dev/null +++ b/cdrs/include/alibabacloud/cdrs/model/BindDeviceResult.h @@ -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. + */ + +#ifndef ALIBABACLOUD_CDRS_MODEL_BINDDEVICERESULT_H_ +#define ALIBABACLOUD_CDRS_MODEL_BINDDEVICERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace CDRS + { + namespace Model + { + class ALIBABACLOUD_CDRS_EXPORT BindDeviceResult : public ServiceResult + { + public: + struct Datas + { + std::string message; + std::string deviceId; + std::string code; + bool success; + }; + + + BindDeviceResult(); + explicit BindDeviceResult(const std::string &payload); + ~BindDeviceResult(); + std::string getMessage()const; + std::vector getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + std::vector data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CDRS_MODEL_BINDDEVICERESULT_H_ \ No newline at end of file diff --git a/cdrs/include/alibabacloud/cdrs/model/CreateProjectRequest.h b/cdrs/include/alibabacloud/cdrs/model/CreateProjectRequest.h new file mode 100644 index 000000000..5c35ec1f4 --- /dev/null +++ b/cdrs/include/alibabacloud/cdrs/model/CreateProjectRequest.h @@ -0,0 +1,63 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CDRS_MODEL_CREATEPROJECTREQUEST_H_ +#define ALIBABACLOUD_CDRS_MODEL_CREATEPROJECTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace CDRS + { + namespace Model + { + class ALIBABACLOUD_CDRS_EXPORT CreateProjectRequest : public RpcServiceRequest + { + + public: + CreateProjectRequest(); + ~CreateProjectRequest(); + + std::string getClientToken()const; + void setClientToken(const std::string& clientToken); + std::string getIcon()const; + void setIcon(const std::string& icon); + std::string getDescription()const; + void setDescription(const std::string& description); + std::string getAppName()const; + void setAppName(const std::string& appName); + std::string get_NameSpace()const; + void set_NameSpace(const std::string& _nameSpace); + std::string getName()const; + void setName(const std::string& name); + + private: + std::string clientToken_; + std::string icon_; + std::string description_; + std::string appName_; + std::string _nameSpace_; + std::string name_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CDRS_MODEL_CREATEPROJECTREQUEST_H_ \ No newline at end of file diff --git a/cdrs/include/alibabacloud/cdrs/model/CreateProjectResult.h b/cdrs/include/alibabacloud/cdrs/model/CreateProjectResult.h new file mode 100644 index 000000000..b9388d119 --- /dev/null +++ b/cdrs/include/alibabacloud/cdrs/model/CreateProjectResult.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_CDRS_MODEL_CREATEPROJECTRESULT_H_ +#define ALIBABACLOUD_CDRS_MODEL_CREATEPROJECTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace CDRS + { + namespace Model + { + class ALIBABACLOUD_CDRS_EXPORT CreateProjectResult : public ServiceResult + { + public: + + + CreateProjectResult(); + explicit CreateProjectResult(const std::string &payload); + ~CreateProjectResult(); + std::string getCorpId()const; + std::string getMessage()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string corpId_; + std::string message_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CDRS_MODEL_CREATEPROJECTRESULT_H_ \ No newline at end of file diff --git a/cdrs/include/alibabacloud/cdrs/model/UnbindDeviceRequest.h b/cdrs/include/alibabacloud/cdrs/model/UnbindDeviceRequest.h new file mode 100644 index 000000000..72cb704bb --- /dev/null +++ b/cdrs/include/alibabacloud/cdrs/model/UnbindDeviceRequest.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_CDRS_MODEL_UNBINDDEVICEREQUEST_H_ +#define ALIBABACLOUD_CDRS_MODEL_UNBINDDEVICEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace CDRS + { + namespace Model + { + class ALIBABACLOUD_CDRS_EXPORT UnbindDeviceRequest : public RpcServiceRequest + { + + public: + UnbindDeviceRequest(); + ~UnbindDeviceRequest(); + + std::string getDeviceIds()const; + void setDeviceIds(const std::string& deviceIds); + std::string getCorpId()const; + void setCorpId(const std::string& corpId); + std::string getAppName()const; + void setAppName(const std::string& appName); + std::string get_NameSpace()const; + void set_NameSpace(const std::string& _nameSpace); + + private: + std::string deviceIds_; + std::string corpId_; + std::string appName_; + std::string _nameSpace_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CDRS_MODEL_UNBINDDEVICEREQUEST_H_ \ No newline at end of file diff --git a/cdrs/include/alibabacloud/cdrs/model/UnbindDeviceResult.h b/cdrs/include/alibabacloud/cdrs/model/UnbindDeviceResult.h new file mode 100644 index 000000000..ca95477b2 --- /dev/null +++ b/cdrs/include/alibabacloud/cdrs/model/UnbindDeviceResult.h @@ -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. + */ + +#ifndef ALIBABACLOUD_CDRS_MODEL_UNBINDDEVICERESULT_H_ +#define ALIBABACLOUD_CDRS_MODEL_UNBINDDEVICERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace CDRS + { + namespace Model + { + class ALIBABACLOUD_CDRS_EXPORT UnbindDeviceResult : public ServiceResult + { + public: + struct Datas + { + std::string message; + std::string deviceId; + std::string code; + bool success; + }; + + + UnbindDeviceResult(); + explicit UnbindDeviceResult(const std::string &payload); + ~UnbindDeviceResult(); + std::string getMessage()const; + std::vector getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + std::vector data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CDRS_MODEL_UNBINDDEVICERESULT_H_ \ No newline at end of file diff --git a/cdrs/include/alibabacloud/cdrs/model/UpdateProjectRequest.h b/cdrs/include/alibabacloud/cdrs/model/UpdateProjectRequest.h new file mode 100644 index 000000000..8ca8a7b99 --- /dev/null +++ b/cdrs/include/alibabacloud/cdrs/model/UpdateProjectRequest.h @@ -0,0 +1,63 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CDRS_MODEL_UPDATEPROJECTREQUEST_H_ +#define ALIBABACLOUD_CDRS_MODEL_UPDATEPROJECTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace CDRS + { + namespace Model + { + class ALIBABACLOUD_CDRS_EXPORT UpdateProjectRequest : public RpcServiceRequest + { + + public: + UpdateProjectRequest(); + ~UpdateProjectRequest(); + + std::string getCorpId()const; + void setCorpId(const std::string& corpId); + std::string getIcon()const; + void setIcon(const std::string& icon); + std::string getDescription()const; + void setDescription(const std::string& description); + std::string getAppName()const; + void setAppName(const std::string& appName); + std::string get_NameSpace()const; + void set_NameSpace(const std::string& _nameSpace); + std::string getName()const; + void setName(const std::string& name); + + private: + std::string corpId_; + std::string icon_; + std::string description_; + std::string appName_; + std::string _nameSpace_; + std::string name_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CDRS_MODEL_UPDATEPROJECTREQUEST_H_ \ No newline at end of file diff --git a/cdrs/include/alibabacloud/cdrs/model/UpdateProjectResult.h b/cdrs/include/alibabacloud/cdrs/model/UpdateProjectResult.h new file mode 100644 index 000000000..c4440de0f --- /dev/null +++ b/cdrs/include/alibabacloud/cdrs/model/UpdateProjectResult.h @@ -0,0 +1,53 @@ +/* + * 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_CDRS_MODEL_UPDATEPROJECTRESULT_H_ +#define ALIBABACLOUD_CDRS_MODEL_UPDATEPROJECTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace CDRS + { + namespace Model + { + class ALIBABACLOUD_CDRS_EXPORT UpdateProjectResult : public ServiceResult + { + public: + + + UpdateProjectResult(); + explicit UpdateProjectResult(const std::string &payload); + ~UpdateProjectResult(); + std::string getMessage()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CDRS_MODEL_UPDATEPROJECTRESULT_H_ \ No newline at end of file diff --git a/cdrs/src/CDRSClient.cc b/cdrs/src/CDRSClient.cc index 753dd20a6..b2c89635b 100644 --- a/cdrs/src/CDRSClient.cc +++ b/cdrs/src/CDRSClient.cc @@ -51,6 +51,78 @@ CDRSClient::CDRSClient(const std::string & accessKeyId, const std::string & acce CDRSClient::~CDRSClient() {} +CDRSClient::BindDeviceOutcome CDRSClient::bindDevice(const BindDeviceRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return BindDeviceOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return BindDeviceOutcome(BindDeviceResult(outcome.result())); + else + return BindDeviceOutcome(outcome.error()); +} + +void CDRSClient::bindDeviceAsync(const BindDeviceRequest& request, const BindDeviceAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, bindDevice(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CDRSClient::BindDeviceOutcomeCallable CDRSClient::bindDeviceCallable(const BindDeviceRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->bindDevice(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +CDRSClient::CreateProjectOutcome CDRSClient::createProject(const CreateProjectRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateProjectOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateProjectOutcome(CreateProjectResult(outcome.result())); + else + return CreateProjectOutcome(outcome.error()); +} + +void CDRSClient::createProjectAsync(const CreateProjectRequest& request, const CreateProjectAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createProject(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CDRSClient::CreateProjectOutcomeCallable CDRSClient::createProjectCallable(const CreateProjectRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createProject(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + CDRSClient::ListCityMapAoisOutcome CDRSClient::listCityMapAois(const ListCityMapAoisRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -1059,3 +1131,75 @@ CDRSClient::SearchObjectOutcomeCallable CDRSClient::searchObjectCallable(const S return task->get_future(); } +CDRSClient::UnbindDeviceOutcome CDRSClient::unbindDevice(const UnbindDeviceRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UnbindDeviceOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UnbindDeviceOutcome(UnbindDeviceResult(outcome.result())); + else + return UnbindDeviceOutcome(outcome.error()); +} + +void CDRSClient::unbindDeviceAsync(const UnbindDeviceRequest& request, const UnbindDeviceAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, unbindDevice(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CDRSClient::UnbindDeviceOutcomeCallable CDRSClient::unbindDeviceCallable(const UnbindDeviceRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->unbindDevice(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +CDRSClient::UpdateProjectOutcome CDRSClient::updateProject(const UpdateProjectRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UpdateProjectOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UpdateProjectOutcome(UpdateProjectResult(outcome.result())); + else + return UpdateProjectOutcome(outcome.error()); +} + +void CDRSClient::updateProjectAsync(const UpdateProjectRequest& request, const UpdateProjectAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, updateProject(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CDRSClient::UpdateProjectOutcomeCallable CDRSClient::updateProjectCallable(const UpdateProjectRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->updateProject(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + diff --git a/cdrs/src/model/BindDeviceRequest.cc b/cdrs/src/model/BindDeviceRequest.cc new file mode 100644 index 000000000..39dd34521 --- /dev/null +++ b/cdrs/src/model/BindDeviceRequest.cc @@ -0,0 +1,78 @@ +/* + * 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 + +using AlibabaCloud::CDRS::Model::BindDeviceRequest; + +BindDeviceRequest::BindDeviceRequest() : + RpcServiceRequest("cdrs", "2020-11-01", "BindDevice") +{ + setMethod(HttpRequest::Method::Post); +} + +BindDeviceRequest::~BindDeviceRequest() +{} + +std::string BindDeviceRequest::getCorpId()const +{ + return corpId_; +} + +void BindDeviceRequest::setCorpId(const std::string& corpId) +{ + corpId_ = corpId; + setBodyParameter("CorpId", corpId); +} + +std::vector BindDeviceRequest::getDevices()const +{ + return devices_; +} + +void BindDeviceRequest::setDevices(const std::vector& devices) +{ + devices_ = devices; + for(int dep1 = 0; dep1!= devices.size(); dep1++) { + auto devicesObj = devices.at(dep1); + std::string devicesObjStr = "Devices." + std::to_string(dep1 + 1); + setParameter(devicesObjStr + ".CorpId", devicesObj.corpId); + setParameter(devicesObjStr + ".DeviceId", devicesObj.deviceId); + } +} + +std::string BindDeviceRequest::getAppName()const +{ + return appName_; +} + +void BindDeviceRequest::setAppName(const std::string& appName) +{ + appName_ = appName; + setBodyParameter("AppName", appName); +} + +std::string BindDeviceRequest::get_NameSpace()const +{ + return _nameSpace_; +} + +void BindDeviceRequest::set_NameSpace(const std::string& _nameSpace) +{ + _nameSpace_ = _nameSpace; + setBodyParameter("_NameSpace", _nameSpace); +} + diff --git a/cdrs/src/model/BindDeviceResult.cc b/cdrs/src/model/BindDeviceResult.cc new file mode 100644 index 000000000..5e8d8321f --- /dev/null +++ b/cdrs/src/model/BindDeviceResult.cc @@ -0,0 +1,77 @@ +/* + * 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 +#include + +using namespace AlibabaCloud::CDRS; +using namespace AlibabaCloud::CDRS::Model; + +BindDeviceResult::BindDeviceResult() : + ServiceResult() +{} + +BindDeviceResult::BindDeviceResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +BindDeviceResult::~BindDeviceResult() +{} + +void BindDeviceResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allDataNode = value["Data"]["Datas"]; + for (auto valueDataDatas : allDataNode) + { + Datas dataObject; + if(!valueDataDatas["Success"].isNull()) + dataObject.success = valueDataDatas["Success"].asString() == "true"; + if(!valueDataDatas["Code"].isNull()) + dataObject.code = valueDataDatas["Code"].asString(); + if(!valueDataDatas["Message"].isNull()) + dataObject.message = valueDataDatas["Message"].asString(); + if(!valueDataDatas["DeviceId"].isNull()) + dataObject.deviceId = valueDataDatas["DeviceId"].asString(); + data_.push_back(dataObject); + } + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string BindDeviceResult::getMessage()const +{ + return message_; +} + +std::vector BindDeviceResult::getData()const +{ + return data_; +} + +std::string BindDeviceResult::getCode()const +{ + return code_; +} + diff --git a/cdrs/src/model/CreateProjectRequest.cc b/cdrs/src/model/CreateProjectRequest.cc new file mode 100644 index 000000000..db63ca075 --- /dev/null +++ b/cdrs/src/model/CreateProjectRequest.cc @@ -0,0 +1,95 @@ +/* + * 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 + +using AlibabaCloud::CDRS::Model::CreateProjectRequest; + +CreateProjectRequest::CreateProjectRequest() : + RpcServiceRequest("cdrs", "2020-11-01", "CreateProject") +{ + setMethod(HttpRequest::Method::Post); +} + +CreateProjectRequest::~CreateProjectRequest() +{} + +std::string CreateProjectRequest::getClientToken()const +{ + return clientToken_; +} + +void CreateProjectRequest::setClientToken(const std::string& clientToken) +{ + clientToken_ = clientToken; + setBodyParameter("ClientToken", clientToken); +} + +std::string CreateProjectRequest::getIcon()const +{ + return icon_; +} + +void CreateProjectRequest::setIcon(const std::string& icon) +{ + icon_ = icon; + setBodyParameter("Icon", icon); +} + +std::string CreateProjectRequest::getDescription()const +{ + return description_; +} + +void CreateProjectRequest::setDescription(const std::string& description) +{ + description_ = description; + setBodyParameter("Description", description); +} + +std::string CreateProjectRequest::getAppName()const +{ + return appName_; +} + +void CreateProjectRequest::setAppName(const std::string& appName) +{ + appName_ = appName; + setBodyParameter("AppName", appName); +} + +std::string CreateProjectRequest::get_NameSpace()const +{ + return _nameSpace_; +} + +void CreateProjectRequest::set_NameSpace(const std::string& _nameSpace) +{ + _nameSpace_ = _nameSpace; + setBodyParameter("_NameSpace", _nameSpace); +} + +std::string CreateProjectRequest::getName()const +{ + return name_; +} + +void CreateProjectRequest::setName(const std::string& name) +{ + name_ = name; + setBodyParameter("Name", name); +} + diff --git a/cdrs/src/model/CreateProjectResult.cc b/cdrs/src/model/CreateProjectResult.cc new file mode 100644 index 000000000..14663ab1c --- /dev/null +++ b/cdrs/src/model/CreateProjectResult.cc @@ -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 +#include + +using namespace AlibabaCloud::CDRS; +using namespace AlibabaCloud::CDRS::Model; + +CreateProjectResult::CreateProjectResult() : + ServiceResult() +{} + +CreateProjectResult::CreateProjectResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateProjectResult::~CreateProjectResult() +{} + +void CreateProjectResult::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["Message"].isNull()) + message_ = value["Message"].asString(); + if(!value["CorpId"].isNull()) + corpId_ = value["CorpId"].asString(); + +} + +std::string CreateProjectResult::getCorpId()const +{ + return corpId_; +} + +std::string CreateProjectResult::getMessage()const +{ + return message_; +} + +std::string CreateProjectResult::getCode()const +{ + return code_; +} + diff --git a/cdrs/src/model/UnbindDeviceRequest.cc b/cdrs/src/model/UnbindDeviceRequest.cc new file mode 100644 index 000000000..afb353ae7 --- /dev/null +++ b/cdrs/src/model/UnbindDeviceRequest.cc @@ -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 + +using AlibabaCloud::CDRS::Model::UnbindDeviceRequest; + +UnbindDeviceRequest::UnbindDeviceRequest() : + RpcServiceRequest("cdrs", "2020-11-01", "UnbindDevice") +{ + setMethod(HttpRequest::Method::Post); +} + +UnbindDeviceRequest::~UnbindDeviceRequest() +{} + +std::string UnbindDeviceRequest::getDeviceIds()const +{ + return deviceIds_; +} + +void UnbindDeviceRequest::setDeviceIds(const std::string& deviceIds) +{ + deviceIds_ = deviceIds; + setBodyParameter("DeviceIds", deviceIds); +} + +std::string UnbindDeviceRequest::getCorpId()const +{ + return corpId_; +} + +void UnbindDeviceRequest::setCorpId(const std::string& corpId) +{ + corpId_ = corpId; + setBodyParameter("CorpId", corpId); +} + +std::string UnbindDeviceRequest::getAppName()const +{ + return appName_; +} + +void UnbindDeviceRequest::setAppName(const std::string& appName) +{ + appName_ = appName; + setBodyParameter("AppName", appName); +} + +std::string UnbindDeviceRequest::get_NameSpace()const +{ + return _nameSpace_; +} + +void UnbindDeviceRequest::set_NameSpace(const std::string& _nameSpace) +{ + _nameSpace_ = _nameSpace; + setBodyParameter("_NameSpace", _nameSpace); +} + diff --git a/cdrs/src/model/UnbindDeviceResult.cc b/cdrs/src/model/UnbindDeviceResult.cc new file mode 100644 index 000000000..207fc952a --- /dev/null +++ b/cdrs/src/model/UnbindDeviceResult.cc @@ -0,0 +1,77 @@ +/* + * 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 +#include + +using namespace AlibabaCloud::CDRS; +using namespace AlibabaCloud::CDRS::Model; + +UnbindDeviceResult::UnbindDeviceResult() : + ServiceResult() +{} + +UnbindDeviceResult::UnbindDeviceResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UnbindDeviceResult::~UnbindDeviceResult() +{} + +void UnbindDeviceResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allDataNode = value["Data"]["Datas"]; + for (auto valueDataDatas : allDataNode) + { + Datas dataObject; + if(!valueDataDatas["Success"].isNull()) + dataObject.success = valueDataDatas["Success"].asString() == "true"; + if(!valueDataDatas["Code"].isNull()) + dataObject.code = valueDataDatas["Code"].asString(); + if(!valueDataDatas["Message"].isNull()) + dataObject.message = valueDataDatas["Message"].asString(); + if(!valueDataDatas["DeviceId"].isNull()) + dataObject.deviceId = valueDataDatas["DeviceId"].asString(); + data_.push_back(dataObject); + } + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string UnbindDeviceResult::getMessage()const +{ + return message_; +} + +std::vector UnbindDeviceResult::getData()const +{ + return data_; +} + +std::string UnbindDeviceResult::getCode()const +{ + return code_; +} + diff --git a/cdrs/src/model/UpdateProjectRequest.cc b/cdrs/src/model/UpdateProjectRequest.cc new file mode 100644 index 000000000..27b02deb7 --- /dev/null +++ b/cdrs/src/model/UpdateProjectRequest.cc @@ -0,0 +1,95 @@ +/* + * 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 + +using AlibabaCloud::CDRS::Model::UpdateProjectRequest; + +UpdateProjectRequest::UpdateProjectRequest() : + RpcServiceRequest("cdrs", "2020-11-01", "UpdateProject") +{ + setMethod(HttpRequest::Method::Post); +} + +UpdateProjectRequest::~UpdateProjectRequest() +{} + +std::string UpdateProjectRequest::getCorpId()const +{ + return corpId_; +} + +void UpdateProjectRequest::setCorpId(const std::string& corpId) +{ + corpId_ = corpId; + setBodyParameter("CorpId", corpId); +} + +std::string UpdateProjectRequest::getIcon()const +{ + return icon_; +} + +void UpdateProjectRequest::setIcon(const std::string& icon) +{ + icon_ = icon; + setBodyParameter("Icon", icon); +} + +std::string UpdateProjectRequest::getDescription()const +{ + return description_; +} + +void UpdateProjectRequest::setDescription(const std::string& description) +{ + description_ = description; + setBodyParameter("Description", description); +} + +std::string UpdateProjectRequest::getAppName()const +{ + return appName_; +} + +void UpdateProjectRequest::setAppName(const std::string& appName) +{ + appName_ = appName; + setBodyParameter("AppName", appName); +} + +std::string UpdateProjectRequest::get_NameSpace()const +{ + return _nameSpace_; +} + +void UpdateProjectRequest::set_NameSpace(const std::string& _nameSpace) +{ + _nameSpace_ = _nameSpace; + setBodyParameter("_NameSpace", _nameSpace); +} + +std::string UpdateProjectRequest::getName()const +{ + return name_; +} + +void UpdateProjectRequest::setName(const std::string& name) +{ + name_ = name; + setBodyParameter("Name", name); +} + diff --git a/cdrs/src/model/UpdateProjectResult.cc b/cdrs/src/model/UpdateProjectResult.cc new file mode 100644 index 000000000..2a8477e80 --- /dev/null +++ b/cdrs/src/model/UpdateProjectResult.cc @@ -0,0 +1,58 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::CDRS; +using namespace AlibabaCloud::CDRS::Model; + +UpdateProjectResult::UpdateProjectResult() : + ServiceResult() +{} + +UpdateProjectResult::UpdateProjectResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UpdateProjectResult::~UpdateProjectResult() +{} + +void UpdateProjectResult::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["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string UpdateProjectResult::getMessage()const +{ + return message_; +} + +std::string UpdateProjectResult::getCode()const +{ + return code_; +} +