diff --git a/CHANGELOG b/CHANGELOG index 35539cb4f..d3b51bad8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2020-05-17 Version: 1.36.414 +- Open API publish. + 2020-05-14 Version: 1.36.413 - Generated 2015-01-01 for `R-kvstore`. - Fix DescribeCacheAnalysisReport return empty BigKeys because of wrong type defination. diff --git a/VERSION b/VERSION index 9e3b6c9f1..d0c93fc23 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.413 \ No newline at end of file +1.36.414 \ No newline at end of file diff --git a/vcs/CMakeLists.txt b/vcs/CMakeLists.txt new file mode 100644 index 000000000..bbf663825 --- /dev/null +++ b/vcs/CMakeLists.txt @@ -0,0 +1,126 @@ +# +# 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(vcs_public_header + include/alibabacloud/vcs/VcsClient.h + include/alibabacloud/vcs/VcsExport.h ) + +set(vcs_public_header_model + include/alibabacloud/vcs/model/AddDeviceRequest.h + include/alibabacloud/vcs/model/AddDeviceResult.h + include/alibabacloud/vcs/model/CreateCorpRequest.h + include/alibabacloud/vcs/model/CreateCorpResult.h + include/alibabacloud/vcs/model/DeleteDeviceRequest.h + include/alibabacloud/vcs/model/DeleteDeviceResult.h + include/alibabacloud/vcs/model/GetDeviceLiveUrlRequest.h + include/alibabacloud/vcs/model/GetDeviceLiveUrlResult.h + include/alibabacloud/vcs/model/GetInventoryRequest.h + include/alibabacloud/vcs/model/GetInventoryResult.h + include/alibabacloud/vcs/model/ListCorpsRequest.h + include/alibabacloud/vcs/model/ListCorpsResult.h + include/alibabacloud/vcs/model/ListDevicesRequest.h + include/alibabacloud/vcs/model/ListDevicesResult.h + include/alibabacloud/vcs/model/RecognizeImageRequest.h + include/alibabacloud/vcs/model/RecognizeImageResult.h + include/alibabacloud/vcs/model/SearchFaceRequest.h + include/alibabacloud/vcs/model/SearchFaceResult.h + include/alibabacloud/vcs/model/UpdateCorpRequest.h + include/alibabacloud/vcs/model/UpdateCorpResult.h + include/alibabacloud/vcs/model/UpdateDeviceRequest.h + include/alibabacloud/vcs/model/UpdateDeviceResult.h ) + +set(vcs_src + src/VcsClient.cc + src/model/AddDeviceRequest.cc + src/model/AddDeviceResult.cc + src/model/CreateCorpRequest.cc + src/model/CreateCorpResult.cc + src/model/DeleteDeviceRequest.cc + src/model/DeleteDeviceResult.cc + src/model/GetDeviceLiveUrlRequest.cc + src/model/GetDeviceLiveUrlResult.cc + src/model/GetInventoryRequest.cc + src/model/GetInventoryResult.cc + src/model/ListCorpsRequest.cc + src/model/ListCorpsResult.cc + src/model/ListDevicesRequest.cc + src/model/ListDevicesResult.cc + src/model/RecognizeImageRequest.cc + src/model/RecognizeImageResult.cc + src/model/SearchFaceRequest.cc + src/model/SearchFaceResult.cc + src/model/UpdateCorpRequest.cc + src/model/UpdateCorpResult.cc + src/model/UpdateDeviceRequest.cc + src/model/UpdateDeviceResult.cc ) + +add_library(vcs ${LIB_TYPE} + ${vcs_public_header} + ${vcs_public_header_model} + ${vcs_src}) + +set_target_properties(vcs + 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}vcs + ) + +if(${LIB_TYPE} STREQUAL "SHARED") + set_target_properties(vcs + PROPERTIES + DEFINE_SYMBOL ALIBABACLOUD_VCS_LIBRARY) +endif() + +target_include_directories(vcs + PRIVATE include + ${CMAKE_SOURCE_DIR}/core/include + ) +target_link_libraries(vcs + core) + +if(CMAKE_HOST_WIN32) + ExternalProject_Get_Property(jsoncpp INSTALL_DIR) + set(jsoncpp_install_dir ${INSTALL_DIR}) + add_dependencies(vcs + jsoncpp) + target_include_directories(vcs + PRIVATE ${jsoncpp_install_dir}/include) + target_link_libraries(vcs + ${jsoncpp_install_dir}/lib/jsoncpp.lib) + set_target_properties(vcs + PROPERTIES + COMPILE_OPTIONS "/bigobj") +else() + target_include_directories(vcs + PRIVATE /usr/include/jsoncpp) + target_link_libraries(vcs + jsoncpp) +endif() + +install(FILES ${vcs_public_header} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/vcs) +install(FILES ${vcs_public_header_model} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/vcs/model) +install(TARGETS vcs + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/VcsClient.h b/vcs/include/alibabacloud/vcs/VcsClient.h new file mode 100644 index 000000000..4898afaf3 --- /dev/null +++ b/vcs/include/alibabacloud/vcs/VcsClient.h @@ -0,0 +1,134 @@ +/* + * 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_VCS_VCSCLIENT_H_ +#define ALIBABACLOUD_VCS_VCSCLIENT_H_ + +#include +#include +#include +#include +#include "VcsExport.h" +#include "model/AddDeviceRequest.h" +#include "model/AddDeviceResult.h" +#include "model/CreateCorpRequest.h" +#include "model/CreateCorpResult.h" +#include "model/DeleteDeviceRequest.h" +#include "model/DeleteDeviceResult.h" +#include "model/GetDeviceLiveUrlRequest.h" +#include "model/GetDeviceLiveUrlResult.h" +#include "model/GetInventoryRequest.h" +#include "model/GetInventoryResult.h" +#include "model/ListCorpsRequest.h" +#include "model/ListCorpsResult.h" +#include "model/ListDevicesRequest.h" +#include "model/ListDevicesResult.h" +#include "model/RecognizeImageRequest.h" +#include "model/RecognizeImageResult.h" +#include "model/SearchFaceRequest.h" +#include "model/SearchFaceResult.h" +#include "model/UpdateCorpRequest.h" +#include "model/UpdateCorpResult.h" +#include "model/UpdateDeviceRequest.h" +#include "model/UpdateDeviceResult.h" + + +namespace AlibabaCloud +{ + namespace Vcs + { + class ALIBABACLOUD_VCS_EXPORT VcsClient : public RpcServiceClient + { + public: + typedef Outcome AddDeviceOutcome; + typedef std::future AddDeviceOutcomeCallable; + typedef std::function&)> AddDeviceAsyncHandler; + typedef Outcome CreateCorpOutcome; + typedef std::future CreateCorpOutcomeCallable; + typedef std::function&)> CreateCorpAsyncHandler; + typedef Outcome DeleteDeviceOutcome; + typedef std::future DeleteDeviceOutcomeCallable; + typedef std::function&)> DeleteDeviceAsyncHandler; + typedef Outcome GetDeviceLiveUrlOutcome; + typedef std::future GetDeviceLiveUrlOutcomeCallable; + typedef std::function&)> GetDeviceLiveUrlAsyncHandler; + typedef Outcome GetInventoryOutcome; + typedef std::future GetInventoryOutcomeCallable; + typedef std::function&)> GetInventoryAsyncHandler; + typedef Outcome ListCorpsOutcome; + typedef std::future ListCorpsOutcomeCallable; + typedef std::function&)> ListCorpsAsyncHandler; + typedef Outcome ListDevicesOutcome; + typedef std::future ListDevicesOutcomeCallable; + typedef std::function&)> ListDevicesAsyncHandler; + typedef Outcome RecognizeImageOutcome; + typedef std::future RecognizeImageOutcomeCallable; + typedef std::function&)> RecognizeImageAsyncHandler; + typedef Outcome SearchFaceOutcome; + typedef std::future SearchFaceOutcomeCallable; + typedef std::function&)> SearchFaceAsyncHandler; + typedef Outcome UpdateCorpOutcome; + typedef std::future UpdateCorpOutcomeCallable; + typedef std::function&)> UpdateCorpAsyncHandler; + typedef Outcome UpdateDeviceOutcome; + typedef std::future UpdateDeviceOutcomeCallable; + typedef std::function&)> UpdateDeviceAsyncHandler; + + VcsClient(const Credentials &credentials, const ClientConfiguration &configuration); + VcsClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); + VcsClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); + ~VcsClient(); + AddDeviceOutcome addDevice(const Model::AddDeviceRequest &request)const; + void addDeviceAsync(const Model::AddDeviceRequest& request, const AddDeviceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + AddDeviceOutcomeCallable addDeviceCallable(const Model::AddDeviceRequest& request) const; + CreateCorpOutcome createCorp(const Model::CreateCorpRequest &request)const; + void createCorpAsync(const Model::CreateCorpRequest& request, const CreateCorpAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateCorpOutcomeCallable createCorpCallable(const Model::CreateCorpRequest& request) const; + DeleteDeviceOutcome deleteDevice(const Model::DeleteDeviceRequest &request)const; + void deleteDeviceAsync(const Model::DeleteDeviceRequest& request, const DeleteDeviceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DeleteDeviceOutcomeCallable deleteDeviceCallable(const Model::DeleteDeviceRequest& request) const; + GetDeviceLiveUrlOutcome getDeviceLiveUrl(const Model::GetDeviceLiveUrlRequest &request)const; + void getDeviceLiveUrlAsync(const Model::GetDeviceLiveUrlRequest& request, const GetDeviceLiveUrlAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetDeviceLiveUrlOutcomeCallable getDeviceLiveUrlCallable(const Model::GetDeviceLiveUrlRequest& request) const; + GetInventoryOutcome getInventory(const Model::GetInventoryRequest &request)const; + void getInventoryAsync(const Model::GetInventoryRequest& request, const GetInventoryAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetInventoryOutcomeCallable getInventoryCallable(const Model::GetInventoryRequest& request) const; + ListCorpsOutcome listCorps(const Model::ListCorpsRequest &request)const; + void listCorpsAsync(const Model::ListCorpsRequest& request, const ListCorpsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListCorpsOutcomeCallable listCorpsCallable(const Model::ListCorpsRequest& request) const; + ListDevicesOutcome listDevices(const Model::ListDevicesRequest &request)const; + void listDevicesAsync(const Model::ListDevicesRequest& request, const ListDevicesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListDevicesOutcomeCallable listDevicesCallable(const Model::ListDevicesRequest& request) const; + RecognizeImageOutcome recognizeImage(const Model::RecognizeImageRequest &request)const; + void recognizeImageAsync(const Model::RecognizeImageRequest& request, const RecognizeImageAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + RecognizeImageOutcomeCallable recognizeImageCallable(const Model::RecognizeImageRequest& request) const; + SearchFaceOutcome searchFace(const Model::SearchFaceRequest &request)const; + void searchFaceAsync(const Model::SearchFaceRequest& request, const SearchFaceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + SearchFaceOutcomeCallable searchFaceCallable(const Model::SearchFaceRequest& request) const; + UpdateCorpOutcome updateCorp(const Model::UpdateCorpRequest &request)const; + void updateCorpAsync(const Model::UpdateCorpRequest& request, const UpdateCorpAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UpdateCorpOutcomeCallable updateCorpCallable(const Model::UpdateCorpRequest& request) const; + UpdateDeviceOutcome updateDevice(const Model::UpdateDeviceRequest &request)const; + void updateDeviceAsync(const Model::UpdateDeviceRequest& request, const UpdateDeviceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UpdateDeviceOutcomeCallable updateDeviceCallable(const Model::UpdateDeviceRequest& request) const; + + private: + std::shared_ptr endpointProvider_; + }; + } +} + +#endif // !ALIBABACLOUD_VCS_VCSCLIENT_H_ diff --git a/vcs/include/alibabacloud/vcs/VcsExport.h b/vcs/include/alibabacloud/vcs/VcsExport.h new file mode 100644 index 000000000..6ff5d98bf --- /dev/null +++ b/vcs/include/alibabacloud/vcs/VcsExport.h @@ -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_VCS_VCSEXPORT_H_ +#define ALIBABACLOUD_VCS_VCSEXPORT_H_ + +#include + +#if defined(ALIBABACLOUD_SHARED) +# if defined(ALIBABACLOUD_VCS_LIBRARY) +# define ALIBABACLOUD_VCS_EXPORT ALIBABACLOUD_DECL_EXPORT +# else +# define ALIBABACLOUD_VCS_EXPORT ALIBABACLOUD_DECL_IMPORT +# endif +#else +# define ALIBABACLOUD_VCS_EXPORT +#endif + +#endif // !ALIBABACLOUD_VCS_VCSEXPORT_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/AddDeviceRequest.h b/vcs/include/alibabacloud/vcs/model/AddDeviceRequest.h new file mode 100644 index 000000000..aab01f409 --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/AddDeviceRequest.h @@ -0,0 +1,75 @@ +/* + * 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_VCS_MODEL_ADDDEVICEREQUEST_H_ +#define ALIBABACLOUD_VCS_MODEL_ADDDEVICEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT AddDeviceRequest : public RpcServiceRequest + { + + public: + AddDeviceRequest(); + ~AddDeviceRequest(); + + std::string getDeviceSite()const; + void setDeviceSite(const std::string& deviceSite); + std::string getCorpId()const; + void setCorpId(const std::string& corpId); + std::string getGbId()const; + void setGbId(const std::string& gbId); + std::string getDeviceDirection()const; + void setDeviceDirection(const std::string& deviceDirection); + std::string getDeviceRate()const; + void setDeviceRate(const std::string& deviceRate); + std::string getDeviceAddress()const; + void setDeviceAddress(const std::string& deviceAddress); + std::string getDeviceType()const; + void setDeviceType(const std::string& deviceType); + std::string getDeviceResolution()const; + void setDeviceResolution(const std::string& deviceResolution); + std::string getVendor()const; + void setVendor(const std::string& vendor); + std::string getDeviceName()const; + void setDeviceName(const std::string& deviceName); + + private: + std::string deviceSite_; + std::string corpId_; + std::string gbId_; + std::string deviceDirection_; + std::string deviceRate_; + std::string deviceAddress_; + std::string deviceType_; + std::string deviceResolution_; + std::string vendor_; + std::string deviceName_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_ADDDEVICEREQUEST_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/AddDeviceResult.h b/vcs/include/alibabacloud/vcs/model/AddDeviceResult.h new file mode 100644 index 000000000..1ad585d3f --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/AddDeviceResult.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_VCS_MODEL_ADDDEVICERESULT_H_ +#define ALIBABACLOUD_VCS_MODEL_ADDDEVICERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT AddDeviceResult : public ServiceResult + { + public: + + + AddDeviceResult(); + explicit AddDeviceResult(const std::string &payload); + ~AddDeviceResult(); + std::string getMessage()const; + std::string getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + std::string data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_ADDDEVICERESULT_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/CreateCorpRequest.h b/vcs/include/alibabacloud/vcs/model/CreateCorpRequest.h new file mode 100644 index 000000000..f6725e195 --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/CreateCorpRequest.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_VCS_MODEL_CREATECORPREQUEST_H_ +#define ALIBABACLOUD_VCS_MODEL_CREATECORPREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT CreateCorpRequest : public RpcServiceRequest + { + + public: + CreateCorpRequest(); + ~CreateCorpRequest(); + + std::string getParentCorpId()const; + void setParentCorpId(const std::string& parentCorpId); + std::string getDescription()const; + void setDescription(const std::string& description); + std::string getAppName()const; + void setAppName(const std::string& appName); + std::string getCorpName()const; + void setCorpName(const std::string& corpName); + + private: + std::string parentCorpId_; + std::string description_; + std::string appName_; + std::string corpName_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_CREATECORPREQUEST_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/CreateCorpResult.h b/vcs/include/alibabacloud/vcs/model/CreateCorpResult.h new file mode 100644 index 000000000..e22843692 --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/CreateCorpResult.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_VCS_MODEL_CREATECORPRESULT_H_ +#define ALIBABACLOUD_VCS_MODEL_CREATECORPRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT CreateCorpResult : public ServiceResult + { + public: + + + CreateCorpResult(); + explicit CreateCorpResult(const std::string &payload); + ~CreateCorpResult(); + 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_VCS_MODEL_CREATECORPRESULT_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/DeleteDeviceRequest.h b/vcs/include/alibabacloud/vcs/model/DeleteDeviceRequest.h new file mode 100644 index 000000000..4f7b67902 --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/DeleteDeviceRequest.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_VCS_MODEL_DELETEDEVICEREQUEST_H_ +#define ALIBABACLOUD_VCS_MODEL_DELETEDEVICEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT DeleteDeviceRequest : public RpcServiceRequest + { + + public: + DeleteDeviceRequest(); + ~DeleteDeviceRequest(); + + std::string getCorpId()const; + void setCorpId(const std::string& corpId); + std::string getGbId()const; + void setGbId(const std::string& gbId); + + private: + std::string corpId_; + std::string gbId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_DELETEDEVICEREQUEST_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/DeleteDeviceResult.h b/vcs/include/alibabacloud/vcs/model/DeleteDeviceResult.h new file mode 100644 index 000000000..4fb57e386 --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/DeleteDeviceResult.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_VCS_MODEL_DELETEDEVICERESULT_H_ +#define ALIBABACLOUD_VCS_MODEL_DELETEDEVICERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT DeleteDeviceResult : public ServiceResult + { + public: + + + DeleteDeviceResult(); + explicit DeleteDeviceResult(const std::string &payload); + ~DeleteDeviceResult(); + std::string getMessage()const; + std::string getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + std::string data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_DELETEDEVICERESULT_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/GetDeviceLiveUrlRequest.h b/vcs/include/alibabacloud/vcs/model/GetDeviceLiveUrlRequest.h new file mode 100644 index 000000000..750ac1191 --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/GetDeviceLiveUrlRequest.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_VCS_MODEL_GETDEVICELIVEURLREQUEST_H_ +#define ALIBABACLOUD_VCS_MODEL_GETDEVICELIVEURLREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT GetDeviceLiveUrlRequest : public RpcServiceRequest + { + + public: + GetDeviceLiveUrlRequest(); + ~GetDeviceLiveUrlRequest(); + + std::string getCorpId()const; + void setCorpId(const std::string& corpId); + std::string getGbId()const; + void setGbId(const std::string& gbId); + long getDeviceId()const; + void setDeviceId(long deviceId); + + private: + std::string corpId_; + std::string gbId_; + long deviceId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_GETDEVICELIVEURLREQUEST_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/GetDeviceLiveUrlResult.h b/vcs/include/alibabacloud/vcs/model/GetDeviceLiveUrlResult.h new file mode 100644 index 000000000..ab24d4610 --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/GetDeviceLiveUrlResult.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_VCS_MODEL_GETDEVICELIVEURLRESULT_H_ +#define ALIBABACLOUD_VCS_MODEL_GETDEVICELIVEURLRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT GetDeviceLiveUrlResult : public ServiceResult + { + public: + + + GetDeviceLiveUrlResult(); + explicit GetDeviceLiveUrlResult(const std::string &payload); + ~GetDeviceLiveUrlResult(); + std::string getMessage()const; + std::string getCode()const; + std::string getUrl()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + std::string code_; + std::string url_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_GETDEVICELIVEURLRESULT_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/GetInventoryRequest.h b/vcs/include/alibabacloud/vcs/model/GetInventoryRequest.h new file mode 100644 index 000000000..605e51ffa --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/GetInventoryRequest.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_VCS_MODEL_GETINVENTORYREQUEST_H_ +#define ALIBABACLOUD_VCS_MODEL_GETINVENTORYREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT GetInventoryRequest : public RpcServiceRequest + { + + public: + GetInventoryRequest(); + ~GetInventoryRequest(); + + std::string getCommodityCode()const; + void setCommodityCode(const std::string& commodityCode); + + private: + std::string commodityCode_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_GETINVENTORYREQUEST_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/GetInventoryResult.h b/vcs/include/alibabacloud/vcs/model/GetInventoryResult.h new file mode 100644 index 000000000..68b4c627f --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/GetInventoryResult.h @@ -0,0 +1,67 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_VCS_MODEL_GETINVENTORYRESULT_H_ +#define ALIBABACLOUD_VCS_MODEL_GETINVENTORYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT GetInventoryResult : public ServiceResult + { + public: + struct Data + { + struct ResultObjectItem + { + std::string buyerId; + std::string instanceId; + std::string currentInventory; + std::string commodityCode; + std::string validEndTime; + std::string validStartTime; + std::string inventoryId; + }; + std::vector resultObject; + }; + + + GetInventoryResult(); + explicit GetInventoryResult(const std::string &payload); + ~GetInventoryResult(); + Data getData()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + Data data_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_GETINVENTORYRESULT_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/ListCorpsRequest.h b/vcs/include/alibabacloud/vcs/model/ListCorpsRequest.h new file mode 100644 index 000000000..8dfae7c2d --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/ListCorpsRequest.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_VCS_MODEL_LISTCORPSREQUEST_H_ +#define ALIBABACLOUD_VCS_MODEL_LISTCORPSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT ListCorpsRequest : public RpcServiceRequest + { + + public: + ListCorpsRequest(); + ~ListCorpsRequest(); + + int getPageNumber()const; + void setPageNumber(int pageNumber); + int getPageSize()const; + void setPageSize(int pageSize); + + private: + int pageNumber_; + int pageSize_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_LISTCORPSREQUEST_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/ListCorpsResult.h b/vcs/include/alibabacloud/vcs/model/ListCorpsResult.h new file mode 100644 index 000000000..901b9c3b0 --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/ListCorpsResult.h @@ -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. + */ + +#ifndef ALIBABACLOUD_VCS_MODEL_LISTCORPSRESULT_H_ +#define ALIBABACLOUD_VCS_MODEL_LISTCORPSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT ListCorpsResult : public ServiceResult + { + public: + struct Data + { + struct Record + { + std::string corpId; + std::string description; + std::string parentCorpId; + std::string createDate; + std::string corpName; + std::string appName; + int deviceCount; + }; + int totalCount; + int pageSize; + int totalPage; + int pageNumber; + std::vector records; + }; + + + ListCorpsResult(); + explicit ListCorpsResult(const std::string &payload); + ~ListCorpsResult(); + std::string getMessage()const; + Data getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + Data data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_LISTCORPSRESULT_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/ListDevicesRequest.h b/vcs/include/alibabacloud/vcs/model/ListDevicesRequest.h new file mode 100644 index 000000000..a0a59d41c --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/ListDevicesRequest.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_VCS_MODEL_LISTDEVICESREQUEST_H_ +#define ALIBABACLOUD_VCS_MODEL_LISTDEVICESREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT ListDevicesRequest : public RpcServiceRequest + { + + public: + ListDevicesRequest(); + ~ListDevicesRequest(); + + std::string getCorpId()const; + void setCorpId(const std::string& corpId); + std::string getGbId()const; + void setGbId(const std::string& gbId); + int getPageNumber()const; + void setPageNumber(int pageNumber); + int getPageSize()const; + void setPageSize(int pageSize); + std::string getDeviceName()const; + void setDeviceName(const std::string& deviceName); + + private: + std::string corpId_; + std::string gbId_; + int pageNumber_; + int pageSize_; + std::string deviceName_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_LISTDEVICESREQUEST_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/ListDevicesResult.h b/vcs/include/alibabacloud/vcs/model/ListDevicesResult.h new file mode 100644 index 000000000..74232513b --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/ListDevicesResult.h @@ -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. + */ + +#ifndef ALIBABACLOUD_VCS_MODEL_LISTDEVICESRESULT_H_ +#define ALIBABACLOUD_VCS_MODEL_LISTDEVICESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT ListDevicesResult : public ServiceResult + { + public: + struct Data + { + struct Record + { + int status; + std::string accessProtocolType; + std::string coverImageUrl; + std::string sipServerIp; + std::string createTime; + std::string latitude; + std::string vendor; + std::string longitude; + std::string sipGBId; + std::string deviceDirection; + std::string sipPassword; + std::string deviceType; + std::string deviceAddress; + std::string gBid; + std::string bitRate; + std::string deviceSite; + std::string sipServerPort; + std::string deviceName; + std::string resolution; + }; + int totalCount; + int pageSize; + int totalPage; + int pageNumber; + std::vector records; + }; + + + ListDevicesResult(); + explicit ListDevicesResult(const std::string &payload); + ~ListDevicesResult(); + std::string getMessage()const; + Data getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + Data data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_LISTDEVICESRESULT_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/RecognizeImageRequest.h b/vcs/include/alibabacloud/vcs/model/RecognizeImageRequest.h new file mode 100644 index 000000000..7a24eda99 --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/RecognizeImageRequest.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_VCS_MODEL_RECOGNIZEIMAGEREQUEST_H_ +#define ALIBABACLOUD_VCS_MODEL_RECOGNIZEIMAGEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT RecognizeImageRequest : public RpcServiceRequest + { + + public: + RecognizeImageRequest(); + ~RecognizeImageRequest(); + + std::string getCorpId()const; + void setCorpId(const std::string& corpId); + std::string getPicContent()const; + void setPicContent(const std::string& picContent); + std::string getPicFormat()const; + void setPicFormat(const std::string& picFormat); + + private: + std::string corpId_; + std::string picContent_; + std::string picFormat_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_RECOGNIZEIMAGEREQUEST_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/RecognizeImageResult.h b/vcs/include/alibabacloud/vcs/model/RecognizeImageResult.h new file mode 100644 index 000000000..a786ebefd --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/RecognizeImageResult.h @@ -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_VCS_MODEL_RECOGNIZEIMAGERESULT_H_ +#define ALIBABACLOUD_VCS_MODEL_RECOGNIZEIMAGERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT RecognizeImageResult : public ServiceResult + { + public: + struct Data + { + struct Body + { + std::string respiratorColor; + std::string imageBaseSixFour; + std::string rightBottomX; + std::string rightBottomY; + std::string fileName; + std::string leftTopY; + std::string feature; + std::string leftTopX; + std::string localFeature; + }; + struct Face + { + std::string respiratorColor; + std::string imageBaseSixFour; + std::string rightBottomX; + std::string rightBottomY; + std::string fileName; + std::string leftTopY; + std::string feature; + std::string leftTopX; + std::string localFeature; + }; + std::vector bodyList; + std::vector faceList; + }; + + + RecognizeImageResult(); + explicit RecognizeImageResult(const std::string &payload); + ~RecognizeImageResult(); + std::string getMessage()const; + Data getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + Data data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_RECOGNIZEIMAGERESULT_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/SearchFaceRequest.h b/vcs/include/alibabacloud/vcs/model/SearchFaceRequest.h new file mode 100644 index 000000000..4dc6dca9f --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/SearchFaceRequest.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_VCS_MODEL_SEARCHFACEREQUEST_H_ +#define ALIBABACLOUD_VCS_MODEL_SEARCHFACEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT SearchFaceRequest : public RpcServiceRequest + { + + public: + SearchFaceRequest(); + ~SearchFaceRequest(); + + std::string getCorpId()const; + void setCorpId(const std::string& corpId); + std::string getGbId()const; + void setGbId(const std::string& gbId); + long getStartTimeStamp()const; + void setStartTimeStamp(long startTimeStamp); + long getEndTimeStamp()const; + void setEndTimeStamp(long endTimeStamp); + int getPageNo()const; + void setPageNo(int pageNo); + int getPageSize()const; + void setPageSize(int pageSize); + std::string getOptionList()const; + void setOptionList(const std::string& optionList); + + private: + std::string corpId_; + std::string gbId_; + long startTimeStamp_; + long endTimeStamp_; + int pageNo_; + int pageSize_; + std::string optionList_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_SEARCHFACEREQUEST_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/SearchFaceResult.h b/vcs/include/alibabacloud/vcs/model/SearchFaceResult.h new file mode 100644 index 000000000..e51ccd077 --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/SearchFaceResult.h @@ -0,0 +1,74 @@ +/* + * 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_VCS_MODEL_SEARCHFACERESULT_H_ +#define ALIBABACLOUD_VCS_MODEL_SEARCHFACERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT SearchFaceResult : public ServiceResult + { + public: + struct Data + { + struct Record + { + std::string targetImageUrl; + int score; + int rightBottomX; + int rightBottomY; + std::string gbId; + std::string imageUrl; + int leftTopY; + int leftTopX; + }; + int totalCount; + int pageSize; + int totalPage; + int pageNo; + std::vector records; + }; + + + SearchFaceResult(); + explicit SearchFaceResult(const std::string &payload); + ~SearchFaceResult(); + std::string getMessage()const; + Data getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + Data data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_SEARCHFACERESULT_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/UpdateCorpRequest.h b/vcs/include/alibabacloud/vcs/model/UpdateCorpRequest.h new file mode 100644 index 000000000..9b0430835 --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/UpdateCorpRequest.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_VCS_MODEL_UPDATECORPREQUEST_H_ +#define ALIBABACLOUD_VCS_MODEL_UPDATECORPREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT UpdateCorpRequest : public RpcServiceRequest + { + + public: + UpdateCorpRequest(); + ~UpdateCorpRequest(); + + std::string getCorpId()const; + void setCorpId(const std::string& corpId); + std::string getParentCorpId()const; + void setParentCorpId(const std::string& parentCorpId); + std::string getDescription()const; + void setDescription(const std::string& description); + std::string getAppName()const; + void setAppName(const std::string& appName); + std::string getCorpName()const; + void setCorpName(const std::string& corpName); + + private: + std::string corpId_; + std::string parentCorpId_; + std::string description_; + std::string appName_; + std::string corpName_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_UPDATECORPREQUEST_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/UpdateCorpResult.h b/vcs/include/alibabacloud/vcs/model/UpdateCorpResult.h new file mode 100644 index 000000000..397e131a7 --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/UpdateCorpResult.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_VCS_MODEL_UPDATECORPRESULT_H_ +#define ALIBABACLOUD_VCS_MODEL_UPDATECORPRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT UpdateCorpResult : public ServiceResult + { + public: + + + UpdateCorpResult(); + explicit UpdateCorpResult(const std::string &payload); + ~UpdateCorpResult(); + std::string getMessage()const; + std::string getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + std::string data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_UPDATECORPRESULT_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/UpdateDeviceRequest.h b/vcs/include/alibabacloud/vcs/model/UpdateDeviceRequest.h new file mode 100644 index 000000000..b13ad38ab --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/UpdateDeviceRequest.h @@ -0,0 +1,75 @@ +/* + * 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_VCS_MODEL_UPDATEDEVICEREQUEST_H_ +#define ALIBABACLOUD_VCS_MODEL_UPDATEDEVICEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT UpdateDeviceRequest : public RpcServiceRequest + { + + public: + UpdateDeviceRequest(); + ~UpdateDeviceRequest(); + + std::string getDeviceSite()const; + void setDeviceSite(const std::string& deviceSite); + std::string getCorpId()const; + void setCorpId(const std::string& corpId); + std::string getGbId()const; + void setGbId(const std::string& gbId); + std::string getDeviceDirection()const; + void setDeviceDirection(const std::string& deviceDirection); + std::string getDeviceRate()const; + void setDeviceRate(const std::string& deviceRate); + std::string getDeviceAddress()const; + void setDeviceAddress(const std::string& deviceAddress); + std::string getDeviceType()const; + void setDeviceType(const std::string& deviceType); + std::string getDeviceResolution()const; + void setDeviceResolution(const std::string& deviceResolution); + std::string getVendor()const; + void setVendor(const std::string& vendor); + std::string getDeviceName()const; + void setDeviceName(const std::string& deviceName); + + private: + std::string deviceSite_; + std::string corpId_; + std::string gbId_; + std::string deviceDirection_; + std::string deviceRate_; + std::string deviceAddress_; + std::string deviceType_; + std::string deviceResolution_; + std::string vendor_; + std::string deviceName_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_UPDATEDEVICEREQUEST_H_ \ No newline at end of file diff --git a/vcs/include/alibabacloud/vcs/model/UpdateDeviceResult.h b/vcs/include/alibabacloud/vcs/model/UpdateDeviceResult.h new file mode 100644 index 000000000..8d69e7ed0 --- /dev/null +++ b/vcs/include/alibabacloud/vcs/model/UpdateDeviceResult.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_VCS_MODEL_UPDATEDEVICERESULT_H_ +#define ALIBABACLOUD_VCS_MODEL_UPDATEDEVICERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Vcs + { + namespace Model + { + class ALIBABACLOUD_VCS_EXPORT UpdateDeviceResult : public ServiceResult + { + public: + + + UpdateDeviceResult(); + explicit UpdateDeviceResult(const std::string &payload); + ~UpdateDeviceResult(); + std::string getMessage()const; + std::string getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + std::string data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VCS_MODEL_UPDATEDEVICERESULT_H_ \ No newline at end of file diff --git a/vcs/src/VcsClient.cc b/vcs/src/VcsClient.cc new file mode 100644 index 000000000..b1f29292d --- /dev/null +++ b/vcs/src/VcsClient.cc @@ -0,0 +1,449 @@ +/* + * 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; +using namespace AlibabaCloud::Location; +using namespace AlibabaCloud::Vcs; +using namespace AlibabaCloud::Vcs::Model; + +namespace +{ + const std::string SERVICE_NAME = "Vcs"; +} + +VcsClient::VcsClient(const Credentials &credentials, const ClientConfiguration &configuration) : + RpcServiceClient(SERVICE_NAME, std::make_shared(credentials), configuration) +{ + auto locationClient = std::make_shared(credentials, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); +} + +VcsClient::VcsClient(const std::shared_ptr& credentialsProvider, const ClientConfiguration & configuration) : + RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) +{ + auto locationClient = std::make_shared(credentialsProvider, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); +} + +VcsClient::VcsClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) : + RpcServiceClient(SERVICE_NAME, std::make_shared(accessKeyId, accessKeySecret), configuration) +{ + auto locationClient = std::make_shared(accessKeyId, accessKeySecret, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); +} + +VcsClient::~VcsClient() +{} + +VcsClient::AddDeviceOutcome VcsClient::addDevice(const AddDeviceRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return AddDeviceOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return AddDeviceOutcome(AddDeviceResult(outcome.result())); + else + return AddDeviceOutcome(outcome.error()); +} + +void VcsClient::addDeviceAsync(const AddDeviceRequest& request, const AddDeviceAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, addDevice(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +VcsClient::AddDeviceOutcomeCallable VcsClient::addDeviceCallable(const AddDeviceRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->addDevice(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +VcsClient::CreateCorpOutcome VcsClient::createCorp(const CreateCorpRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateCorpOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateCorpOutcome(CreateCorpResult(outcome.result())); + else + return CreateCorpOutcome(outcome.error()); +} + +void VcsClient::createCorpAsync(const CreateCorpRequest& request, const CreateCorpAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createCorp(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +VcsClient::CreateCorpOutcomeCallable VcsClient::createCorpCallable(const CreateCorpRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createCorp(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +VcsClient::DeleteDeviceOutcome VcsClient::deleteDevice(const DeleteDeviceRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DeleteDeviceOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DeleteDeviceOutcome(DeleteDeviceResult(outcome.result())); + else + return DeleteDeviceOutcome(outcome.error()); +} + +void VcsClient::deleteDeviceAsync(const DeleteDeviceRequest& request, const DeleteDeviceAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, deleteDevice(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +VcsClient::DeleteDeviceOutcomeCallable VcsClient::deleteDeviceCallable(const DeleteDeviceRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->deleteDevice(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +VcsClient::GetDeviceLiveUrlOutcome VcsClient::getDeviceLiveUrl(const GetDeviceLiveUrlRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetDeviceLiveUrlOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetDeviceLiveUrlOutcome(GetDeviceLiveUrlResult(outcome.result())); + else + return GetDeviceLiveUrlOutcome(outcome.error()); +} + +void VcsClient::getDeviceLiveUrlAsync(const GetDeviceLiveUrlRequest& request, const GetDeviceLiveUrlAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getDeviceLiveUrl(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +VcsClient::GetDeviceLiveUrlOutcomeCallable VcsClient::getDeviceLiveUrlCallable(const GetDeviceLiveUrlRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getDeviceLiveUrl(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +VcsClient::GetInventoryOutcome VcsClient::getInventory(const GetInventoryRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetInventoryOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetInventoryOutcome(GetInventoryResult(outcome.result())); + else + return GetInventoryOutcome(outcome.error()); +} + +void VcsClient::getInventoryAsync(const GetInventoryRequest& request, const GetInventoryAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getInventory(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +VcsClient::GetInventoryOutcomeCallable VcsClient::getInventoryCallable(const GetInventoryRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getInventory(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +VcsClient::ListCorpsOutcome VcsClient::listCorps(const ListCorpsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListCorpsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListCorpsOutcome(ListCorpsResult(outcome.result())); + else + return ListCorpsOutcome(outcome.error()); +} + +void VcsClient::listCorpsAsync(const ListCorpsRequest& request, const ListCorpsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listCorps(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +VcsClient::ListCorpsOutcomeCallable VcsClient::listCorpsCallable(const ListCorpsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listCorps(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +VcsClient::ListDevicesOutcome VcsClient::listDevices(const ListDevicesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListDevicesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListDevicesOutcome(ListDevicesResult(outcome.result())); + else + return ListDevicesOutcome(outcome.error()); +} + +void VcsClient::listDevicesAsync(const ListDevicesRequest& request, const ListDevicesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listDevices(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +VcsClient::ListDevicesOutcomeCallable VcsClient::listDevicesCallable(const ListDevicesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listDevices(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +VcsClient::RecognizeImageOutcome VcsClient::recognizeImage(const RecognizeImageRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return RecognizeImageOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return RecognizeImageOutcome(RecognizeImageResult(outcome.result())); + else + return RecognizeImageOutcome(outcome.error()); +} + +void VcsClient::recognizeImageAsync(const RecognizeImageRequest& request, const RecognizeImageAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, recognizeImage(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +VcsClient::RecognizeImageOutcomeCallable VcsClient::recognizeImageCallable(const RecognizeImageRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->recognizeImage(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +VcsClient::SearchFaceOutcome VcsClient::searchFace(const SearchFaceRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return SearchFaceOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return SearchFaceOutcome(SearchFaceResult(outcome.result())); + else + return SearchFaceOutcome(outcome.error()); +} + +void VcsClient::searchFaceAsync(const SearchFaceRequest& request, const SearchFaceAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, searchFace(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +VcsClient::SearchFaceOutcomeCallable VcsClient::searchFaceCallable(const SearchFaceRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->searchFace(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +VcsClient::UpdateCorpOutcome VcsClient::updateCorp(const UpdateCorpRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UpdateCorpOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UpdateCorpOutcome(UpdateCorpResult(outcome.result())); + else + return UpdateCorpOutcome(outcome.error()); +} + +void VcsClient::updateCorpAsync(const UpdateCorpRequest& request, const UpdateCorpAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, updateCorp(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +VcsClient::UpdateCorpOutcomeCallable VcsClient::updateCorpCallable(const UpdateCorpRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->updateCorp(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +VcsClient::UpdateDeviceOutcome VcsClient::updateDevice(const UpdateDeviceRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UpdateDeviceOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UpdateDeviceOutcome(UpdateDeviceResult(outcome.result())); + else + return UpdateDeviceOutcome(outcome.error()); +} + +void VcsClient::updateDeviceAsync(const UpdateDeviceRequest& request, const UpdateDeviceAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, updateDevice(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +VcsClient::UpdateDeviceOutcomeCallable VcsClient::updateDeviceCallable(const UpdateDeviceRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->updateDevice(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + diff --git a/vcs/src/model/AddDeviceRequest.cc b/vcs/src/model/AddDeviceRequest.cc new file mode 100644 index 000000000..190271de8 --- /dev/null +++ b/vcs/src/model/AddDeviceRequest.cc @@ -0,0 +1,139 @@ +/* + * 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::Vcs::Model::AddDeviceRequest; + +AddDeviceRequest::AddDeviceRequest() : + RpcServiceRequest("vcs", "2020-05-15", "AddDevice") +{ + setMethod(HttpRequest::Method::Post); +} + +AddDeviceRequest::~AddDeviceRequest() +{} + +std::string AddDeviceRequest::getDeviceSite()const +{ + return deviceSite_; +} + +void AddDeviceRequest::setDeviceSite(const std::string& deviceSite) +{ + deviceSite_ = deviceSite; + setBodyParameter("DeviceSite", deviceSite); +} + +std::string AddDeviceRequest::getCorpId()const +{ + return corpId_; +} + +void AddDeviceRequest::setCorpId(const std::string& corpId) +{ + corpId_ = corpId; + setBodyParameter("CorpId", corpId); +} + +std::string AddDeviceRequest::getGbId()const +{ + return gbId_; +} + +void AddDeviceRequest::setGbId(const std::string& gbId) +{ + gbId_ = gbId; + setBodyParameter("GbId", gbId); +} + +std::string AddDeviceRequest::getDeviceDirection()const +{ + return deviceDirection_; +} + +void AddDeviceRequest::setDeviceDirection(const std::string& deviceDirection) +{ + deviceDirection_ = deviceDirection; + setBodyParameter("DeviceDirection", deviceDirection); +} + +std::string AddDeviceRequest::getDeviceRate()const +{ + return deviceRate_; +} + +void AddDeviceRequest::setDeviceRate(const std::string& deviceRate) +{ + deviceRate_ = deviceRate; + setBodyParameter("DeviceRate", deviceRate); +} + +std::string AddDeviceRequest::getDeviceAddress()const +{ + return deviceAddress_; +} + +void AddDeviceRequest::setDeviceAddress(const std::string& deviceAddress) +{ + deviceAddress_ = deviceAddress; + setBodyParameter("DeviceAddress", deviceAddress); +} + +std::string AddDeviceRequest::getDeviceType()const +{ + return deviceType_; +} + +void AddDeviceRequest::setDeviceType(const std::string& deviceType) +{ + deviceType_ = deviceType; + setBodyParameter("DeviceType", deviceType); +} + +std::string AddDeviceRequest::getDeviceResolution()const +{ + return deviceResolution_; +} + +void AddDeviceRequest::setDeviceResolution(const std::string& deviceResolution) +{ + deviceResolution_ = deviceResolution; + setBodyParameter("DeviceResolution", deviceResolution); +} + +std::string AddDeviceRequest::getVendor()const +{ + return vendor_; +} + +void AddDeviceRequest::setVendor(const std::string& vendor) +{ + vendor_ = vendor; + setBodyParameter("Vendor", vendor); +} + +std::string AddDeviceRequest::getDeviceName()const +{ + return deviceName_; +} + +void AddDeviceRequest::setDeviceName(const std::string& deviceName) +{ + deviceName_ = deviceName; + setBodyParameter("DeviceName", deviceName); +} + diff --git a/vcs/src/model/AddDeviceResult.cc b/vcs/src/model/AddDeviceResult.cc new file mode 100644 index 000000000..4b37f5413 --- /dev/null +++ b/vcs/src/model/AddDeviceResult.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::Vcs; +using namespace AlibabaCloud::Vcs::Model; + +AddDeviceResult::AddDeviceResult() : + ServiceResult() +{} + +AddDeviceResult::AddDeviceResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +AddDeviceResult::~AddDeviceResult() +{} + +void AddDeviceResult::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["Data"].isNull()) + data_ = value["Data"].asString(); + +} + +std::string AddDeviceResult::getMessage()const +{ + return message_; +} + +std::string AddDeviceResult::getData()const +{ + return data_; +} + +std::string AddDeviceResult::getCode()const +{ + return code_; +} + diff --git a/vcs/src/model/CreateCorpRequest.cc b/vcs/src/model/CreateCorpRequest.cc new file mode 100644 index 000000000..11094f7c5 --- /dev/null +++ b/vcs/src/model/CreateCorpRequest.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::Vcs::Model::CreateCorpRequest; + +CreateCorpRequest::CreateCorpRequest() : + RpcServiceRequest("vcs", "2020-05-15", "CreateCorp") +{ + setMethod(HttpRequest::Method::Post); +} + +CreateCorpRequest::~CreateCorpRequest() +{} + +std::string CreateCorpRequest::getParentCorpId()const +{ + return parentCorpId_; +} + +void CreateCorpRequest::setParentCorpId(const std::string& parentCorpId) +{ + parentCorpId_ = parentCorpId; + setBodyParameter("ParentCorpId", parentCorpId); +} + +std::string CreateCorpRequest::getDescription()const +{ + return description_; +} + +void CreateCorpRequest::setDescription(const std::string& description) +{ + description_ = description; + setBodyParameter("Description", description); +} + +std::string CreateCorpRequest::getAppName()const +{ + return appName_; +} + +void CreateCorpRequest::setAppName(const std::string& appName) +{ + appName_ = appName; + setBodyParameter("AppName", appName); +} + +std::string CreateCorpRequest::getCorpName()const +{ + return corpName_; +} + +void CreateCorpRequest::setCorpName(const std::string& corpName) +{ + corpName_ = corpName; + setBodyParameter("CorpName", corpName); +} + diff --git a/vcs/src/model/CreateCorpResult.cc b/vcs/src/model/CreateCorpResult.cc new file mode 100644 index 000000000..71874e0d7 --- /dev/null +++ b/vcs/src/model/CreateCorpResult.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::Vcs; +using namespace AlibabaCloud::Vcs::Model; + +CreateCorpResult::CreateCorpResult() : + ServiceResult() +{} + +CreateCorpResult::CreateCorpResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateCorpResult::~CreateCorpResult() +{} + +void CreateCorpResult::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 CreateCorpResult::getCorpId()const +{ + return corpId_; +} + +std::string CreateCorpResult::getMessage()const +{ + return message_; +} + +std::string CreateCorpResult::getCode()const +{ + return code_; +} + diff --git a/vcs/src/model/DeleteDeviceRequest.cc b/vcs/src/model/DeleteDeviceRequest.cc new file mode 100644 index 000000000..b5ccbc4fa --- /dev/null +++ b/vcs/src/model/DeleteDeviceRequest.cc @@ -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 + +using AlibabaCloud::Vcs::Model::DeleteDeviceRequest; + +DeleteDeviceRequest::DeleteDeviceRequest() : + RpcServiceRequest("vcs", "2020-05-15", "DeleteDevice") +{ + setMethod(HttpRequest::Method::Post); +} + +DeleteDeviceRequest::~DeleteDeviceRequest() +{} + +std::string DeleteDeviceRequest::getCorpId()const +{ + return corpId_; +} + +void DeleteDeviceRequest::setCorpId(const std::string& corpId) +{ + corpId_ = corpId; + setBodyParameter("CorpId", corpId); +} + +std::string DeleteDeviceRequest::getGbId()const +{ + return gbId_; +} + +void DeleteDeviceRequest::setGbId(const std::string& gbId) +{ + gbId_ = gbId; + setBodyParameter("GbId", gbId); +} + diff --git a/vcs/src/model/DeleteDeviceResult.cc b/vcs/src/model/DeleteDeviceResult.cc new file mode 100644 index 000000000..201a63a98 --- /dev/null +++ b/vcs/src/model/DeleteDeviceResult.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::Vcs; +using namespace AlibabaCloud::Vcs::Model; + +DeleteDeviceResult::DeleteDeviceResult() : + ServiceResult() +{} + +DeleteDeviceResult::DeleteDeviceResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DeleteDeviceResult::~DeleteDeviceResult() +{} + +void DeleteDeviceResult::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["Data"].isNull()) + data_ = value["Data"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string DeleteDeviceResult::getMessage()const +{ + return message_; +} + +std::string DeleteDeviceResult::getData()const +{ + return data_; +} + +std::string DeleteDeviceResult::getCode()const +{ + return code_; +} + diff --git a/vcs/src/model/GetDeviceLiveUrlRequest.cc b/vcs/src/model/GetDeviceLiveUrlRequest.cc new file mode 100644 index 000000000..8c1bbd10b --- /dev/null +++ b/vcs/src/model/GetDeviceLiveUrlRequest.cc @@ -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 + +using AlibabaCloud::Vcs::Model::GetDeviceLiveUrlRequest; + +GetDeviceLiveUrlRequest::GetDeviceLiveUrlRequest() : + RpcServiceRequest("vcs", "2020-05-15", "GetDeviceLiveUrl") +{ + setMethod(HttpRequest::Method::Post); +} + +GetDeviceLiveUrlRequest::~GetDeviceLiveUrlRequest() +{} + +std::string GetDeviceLiveUrlRequest::getCorpId()const +{ + return corpId_; +} + +void GetDeviceLiveUrlRequest::setCorpId(const std::string& corpId) +{ + corpId_ = corpId; + setBodyParameter("CorpId", corpId); +} + +std::string GetDeviceLiveUrlRequest::getGbId()const +{ + return gbId_; +} + +void GetDeviceLiveUrlRequest::setGbId(const std::string& gbId) +{ + gbId_ = gbId; + setBodyParameter("GbId", gbId); +} + +long GetDeviceLiveUrlRequest::getDeviceId()const +{ + return deviceId_; +} + +void GetDeviceLiveUrlRequest::setDeviceId(long deviceId) +{ + deviceId_ = deviceId; + setBodyParameter("DeviceId", std::to_string(deviceId)); +} + diff --git a/vcs/src/model/GetDeviceLiveUrlResult.cc b/vcs/src/model/GetDeviceLiveUrlResult.cc new file mode 100644 index 000000000..4cd38a488 --- /dev/null +++ b/vcs/src/model/GetDeviceLiveUrlResult.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::Vcs; +using namespace AlibabaCloud::Vcs::Model; + +GetDeviceLiveUrlResult::GetDeviceLiveUrlResult() : + ServiceResult() +{} + +GetDeviceLiveUrlResult::GetDeviceLiveUrlResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetDeviceLiveUrlResult::~GetDeviceLiveUrlResult() +{} + +void GetDeviceLiveUrlResult::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["Url"].isNull()) + url_ = value["Url"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string GetDeviceLiveUrlResult::getMessage()const +{ + return message_; +} + +std::string GetDeviceLiveUrlResult::getCode()const +{ + return code_; +} + +std::string GetDeviceLiveUrlResult::getUrl()const +{ + return url_; +} + diff --git a/vcs/src/model/GetInventoryRequest.cc b/vcs/src/model/GetInventoryRequest.cc new file mode 100644 index 000000000..beda33e20 --- /dev/null +++ b/vcs/src/model/GetInventoryRequest.cc @@ -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 + +using AlibabaCloud::Vcs::Model::GetInventoryRequest; + +GetInventoryRequest::GetInventoryRequest() : + RpcServiceRequest("vcs", "2020-05-15", "GetInventory") +{ + setMethod(HttpRequest::Method::Post); +} + +GetInventoryRequest::~GetInventoryRequest() +{} + +std::string GetInventoryRequest::getCommodityCode()const +{ + return commodityCode_; +} + +void GetInventoryRequest::setCommodityCode(const std::string& commodityCode) +{ + commodityCode_ = commodityCode; + setBodyParameter("CommodityCode", commodityCode); +} + diff --git a/vcs/src/model/GetInventoryResult.cc b/vcs/src/model/GetInventoryResult.cc new file mode 100644 index 000000000..a95c84d62 --- /dev/null +++ b/vcs/src/model/GetInventoryResult.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::Vcs; +using namespace AlibabaCloud::Vcs::Model; + +GetInventoryResult::GetInventoryResult() : + ServiceResult() +{} + +GetInventoryResult::GetInventoryResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetInventoryResult::~GetInventoryResult() +{} + +void GetInventoryResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + auto allResultObjectNode = dataNode["ResultObject"]["ResultObjectItem"]; + for (auto dataNodeResultObjectResultObjectItem : allResultObjectNode) + { + Data::ResultObjectItem resultObjectItemObject; + if(!dataNodeResultObjectResultObjectItem["BuyerId"].isNull()) + resultObjectItemObject.buyerId = dataNodeResultObjectResultObjectItem["BuyerId"].asString(); + if(!dataNodeResultObjectResultObjectItem["CommodityCode"].isNull()) + resultObjectItemObject.commodityCode = dataNodeResultObjectResultObjectItem["CommodityCode"].asString(); + if(!dataNodeResultObjectResultObjectItem["CurrentInventory"].isNull()) + resultObjectItemObject.currentInventory = dataNodeResultObjectResultObjectItem["CurrentInventory"].asString(); + if(!dataNodeResultObjectResultObjectItem["ValidEndTime"].isNull()) + resultObjectItemObject.validEndTime = dataNodeResultObjectResultObjectItem["ValidEndTime"].asString(); + if(!dataNodeResultObjectResultObjectItem["ValidStartTime"].isNull()) + resultObjectItemObject.validStartTime = dataNodeResultObjectResultObjectItem["ValidStartTime"].asString(); + if(!dataNodeResultObjectResultObjectItem["InstanceId"].isNull()) + resultObjectItemObject.instanceId = dataNodeResultObjectResultObjectItem["InstanceId"].asString(); + if(!dataNodeResultObjectResultObjectItem["InventoryId"].isNull()) + resultObjectItemObject.inventoryId = dataNodeResultObjectResultObjectItem["InventoryId"].asString(); + data_.resultObject.push_back(resultObjectItemObject); + } + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +GetInventoryResult::Data GetInventoryResult::getData()const +{ + return data_; +} + +bool GetInventoryResult::getSuccess()const +{ + return success_; +} + diff --git a/vcs/src/model/ListCorpsRequest.cc b/vcs/src/model/ListCorpsRequest.cc new file mode 100644 index 000000000..e76bfd132 --- /dev/null +++ b/vcs/src/model/ListCorpsRequest.cc @@ -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 + +using AlibabaCloud::Vcs::Model::ListCorpsRequest; + +ListCorpsRequest::ListCorpsRequest() : + RpcServiceRequest("vcs", "2020-05-15", "ListCorps") +{ + setMethod(HttpRequest::Method::Post); +} + +ListCorpsRequest::~ListCorpsRequest() +{} + +int ListCorpsRequest::getPageNumber()const +{ + return pageNumber_; +} + +void ListCorpsRequest::setPageNumber(int pageNumber) +{ + pageNumber_ = pageNumber; + setBodyParameter("PageNumber", std::to_string(pageNumber)); +} + +int ListCorpsRequest::getPageSize()const +{ + return pageSize_; +} + +void ListCorpsRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setBodyParameter("PageSize", std::to_string(pageSize)); +} + diff --git a/vcs/src/model/ListCorpsResult.cc b/vcs/src/model/ListCorpsResult.cc new file mode 100644 index 000000000..e801caab3 --- /dev/null +++ b/vcs/src/model/ListCorpsResult.cc @@ -0,0 +1,92 @@ +/* + * 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::Vcs; +using namespace AlibabaCloud::Vcs::Model; + +ListCorpsResult::ListCorpsResult() : + ServiceResult() +{} + +ListCorpsResult::ListCorpsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListCorpsResult::~ListCorpsResult() +{} + +void ListCorpsResult::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["PageNumber"].isNull()) + data_.pageNumber = std::stoi(dataNode["PageNumber"].asString()); + if(!dataNode["PageSize"].isNull()) + data_.pageSize = std::stoi(dataNode["PageSize"].asString()); + if(!dataNode["TotalCount"].isNull()) + data_.totalCount = std::stoi(dataNode["TotalCount"].asString()); + if(!dataNode["TotalPage"].isNull()) + data_.totalPage = std::stoi(dataNode["TotalPage"].asString()); + auto allRecordsNode = dataNode["Records"]["Record"]; + for (auto dataNodeRecordsRecord : allRecordsNode) + { + Data::Record recordObject; + if(!dataNodeRecordsRecord["CorpId"].isNull()) + recordObject.corpId = dataNodeRecordsRecord["CorpId"].asString(); + if(!dataNodeRecordsRecord["CorpName"].isNull()) + recordObject.corpName = dataNodeRecordsRecord["CorpName"].asString(); + if(!dataNodeRecordsRecord["Description"].isNull()) + recordObject.description = dataNodeRecordsRecord["Description"].asString(); + if(!dataNodeRecordsRecord["CreateDate"].isNull()) + recordObject.createDate = dataNodeRecordsRecord["CreateDate"].asString(); + if(!dataNodeRecordsRecord["ParentCorpId"].isNull()) + recordObject.parentCorpId = dataNodeRecordsRecord["ParentCorpId"].asString(); + if(!dataNodeRecordsRecord["AppName"].isNull()) + recordObject.appName = dataNodeRecordsRecord["AppName"].asString(); + if(!dataNodeRecordsRecord["DeviceCount"].isNull()) + recordObject.deviceCount = std::stoi(dataNodeRecordsRecord["DeviceCount"].asString()); + data_.records.push_back(recordObject); + } + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string ListCorpsResult::getMessage()const +{ + return message_; +} + +ListCorpsResult::Data ListCorpsResult::getData()const +{ + return data_; +} + +std::string ListCorpsResult::getCode()const +{ + return code_; +} + diff --git a/vcs/src/model/ListDevicesRequest.cc b/vcs/src/model/ListDevicesRequest.cc new file mode 100644 index 000000000..8a57c1bc7 --- /dev/null +++ b/vcs/src/model/ListDevicesRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Vcs::Model::ListDevicesRequest; + +ListDevicesRequest::ListDevicesRequest() : + RpcServiceRequest("vcs", "2020-05-15", "ListDevices") +{ + setMethod(HttpRequest::Method::Post); +} + +ListDevicesRequest::~ListDevicesRequest() +{} + +std::string ListDevicesRequest::getCorpId()const +{ + return corpId_; +} + +void ListDevicesRequest::setCorpId(const std::string& corpId) +{ + corpId_ = corpId; + setBodyParameter("CorpId", corpId); +} + +std::string ListDevicesRequest::getGbId()const +{ + return gbId_; +} + +void ListDevicesRequest::setGbId(const std::string& gbId) +{ + gbId_ = gbId; + setBodyParameter("GbId", gbId); +} + +int ListDevicesRequest::getPageNumber()const +{ + return pageNumber_; +} + +void ListDevicesRequest::setPageNumber(int pageNumber) +{ + pageNumber_ = pageNumber; + setBodyParameter("PageNumber", std::to_string(pageNumber)); +} + +int ListDevicesRequest::getPageSize()const +{ + return pageSize_; +} + +void ListDevicesRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setBodyParameter("PageSize", std::to_string(pageSize)); +} + +std::string ListDevicesRequest::getDeviceName()const +{ + return deviceName_; +} + +void ListDevicesRequest::setDeviceName(const std::string& deviceName) +{ + deviceName_ = deviceName; + setBodyParameter("DeviceName", deviceName); +} + diff --git a/vcs/src/model/ListDevicesResult.cc b/vcs/src/model/ListDevicesResult.cc new file mode 100644 index 000000000..56c4c4a52 --- /dev/null +++ b/vcs/src/model/ListDevicesResult.cc @@ -0,0 +1,116 @@ +/* + * 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::Vcs; +using namespace AlibabaCloud::Vcs::Model; + +ListDevicesResult::ListDevicesResult() : + ServiceResult() +{} + +ListDevicesResult::ListDevicesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListDevicesResult::~ListDevicesResult() +{} + +void ListDevicesResult::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["PageNumber"].isNull()) + data_.pageNumber = std::stoi(dataNode["PageNumber"].asString()); + if(!dataNode["PageSize"].isNull()) + data_.pageSize = std::stoi(dataNode["PageSize"].asString()); + if(!dataNode["TotalCount"].isNull()) + data_.totalCount = std::stoi(dataNode["TotalCount"].asString()); + if(!dataNode["TotalPage"].isNull()) + data_.totalPage = std::stoi(dataNode["TotalPage"].asString()); + auto allRecordsNode = dataNode["Records"]["Record"]; + for (auto dataNodeRecordsRecord : allRecordsNode) + { + Data::Record recordObject; + if(!dataNodeRecordsRecord["AccessProtocolType"].isNull()) + recordObject.accessProtocolType = dataNodeRecordsRecord["AccessProtocolType"].asString(); + if(!dataNodeRecordsRecord["BitRate"].isNull()) + recordObject.bitRate = dataNodeRecordsRecord["BitRate"].asString(); + if(!dataNodeRecordsRecord["CoverImageUrl"].isNull()) + recordObject.coverImageUrl = dataNodeRecordsRecord["CoverImageUrl"].asString(); + if(!dataNodeRecordsRecord["GBid"].isNull()) + recordObject.gBid = dataNodeRecordsRecord["GBid"].asString(); + if(!dataNodeRecordsRecord["DeviceAddress"].isNull()) + recordObject.deviceAddress = dataNodeRecordsRecord["DeviceAddress"].asString(); + if(!dataNodeRecordsRecord["DeviceDirection"].isNull()) + recordObject.deviceDirection = dataNodeRecordsRecord["DeviceDirection"].asString(); + if(!dataNodeRecordsRecord["DeviceSite"].isNull()) + recordObject.deviceSite = dataNodeRecordsRecord["DeviceSite"].asString(); + if(!dataNodeRecordsRecord["Latitude"].isNull()) + recordObject.latitude = dataNodeRecordsRecord["Latitude"].asString(); + if(!dataNodeRecordsRecord["Longitude"].isNull()) + recordObject.longitude = dataNodeRecordsRecord["Longitude"].asString(); + if(!dataNodeRecordsRecord["DeviceName"].isNull()) + recordObject.deviceName = dataNodeRecordsRecord["DeviceName"].asString(); + if(!dataNodeRecordsRecord["Resolution"].isNull()) + recordObject.resolution = dataNodeRecordsRecord["Resolution"].asString(); + if(!dataNodeRecordsRecord["SipGBId"].isNull()) + recordObject.sipGBId = dataNodeRecordsRecord["SipGBId"].asString(); + if(!dataNodeRecordsRecord["SipPassword"].isNull()) + recordObject.sipPassword = dataNodeRecordsRecord["SipPassword"].asString(); + if(!dataNodeRecordsRecord["SipServerIp"].isNull()) + recordObject.sipServerIp = dataNodeRecordsRecord["SipServerIp"].asString(); + if(!dataNodeRecordsRecord["SipServerPort"].isNull()) + recordObject.sipServerPort = dataNodeRecordsRecord["SipServerPort"].asString(); + if(!dataNodeRecordsRecord["Status"].isNull()) + recordObject.status = std::stoi(dataNodeRecordsRecord["Status"].asString()); + if(!dataNodeRecordsRecord["DeviceType"].isNull()) + recordObject.deviceType = dataNodeRecordsRecord["DeviceType"].asString(); + if(!dataNodeRecordsRecord["Vendor"].isNull()) + recordObject.vendor = dataNodeRecordsRecord["Vendor"].asString(); + if(!dataNodeRecordsRecord["CreateTime"].isNull()) + recordObject.createTime = dataNodeRecordsRecord["CreateTime"].asString(); + data_.records.push_back(recordObject); + } + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string ListDevicesResult::getMessage()const +{ + return message_; +} + +ListDevicesResult::Data ListDevicesResult::getData()const +{ + return data_; +} + +std::string ListDevicesResult::getCode()const +{ + return code_; +} + diff --git a/vcs/src/model/RecognizeImageRequest.cc b/vcs/src/model/RecognizeImageRequest.cc new file mode 100644 index 000000000..b3417e180 --- /dev/null +++ b/vcs/src/model/RecognizeImageRequest.cc @@ -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 + +using AlibabaCloud::Vcs::Model::RecognizeImageRequest; + +RecognizeImageRequest::RecognizeImageRequest() : + RpcServiceRequest("vcs", "2020-05-15", "RecognizeImage") +{ + setMethod(HttpRequest::Method::Post); +} + +RecognizeImageRequest::~RecognizeImageRequest() +{} + +std::string RecognizeImageRequest::getCorpId()const +{ + return corpId_; +} + +void RecognizeImageRequest::setCorpId(const std::string& corpId) +{ + corpId_ = corpId; + setBodyParameter("CorpId", corpId); +} + +std::string RecognizeImageRequest::getPicContent()const +{ + return picContent_; +} + +void RecognizeImageRequest::setPicContent(const std::string& picContent) +{ + picContent_ = picContent; + setBodyParameter("PicContent", picContent); +} + +std::string RecognizeImageRequest::getPicFormat()const +{ + return picFormat_; +} + +void RecognizeImageRequest::setPicFormat(const std::string& picFormat) +{ + picFormat_ = picFormat; + setBodyParameter("PicFormat", picFormat); +} + diff --git a/vcs/src/model/RecognizeImageResult.cc b/vcs/src/model/RecognizeImageResult.cc new file mode 100644 index 000000000..b11b581ea --- /dev/null +++ b/vcs/src/model/RecognizeImageResult.cc @@ -0,0 +1,112 @@ +/* + * 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::Vcs; +using namespace AlibabaCloud::Vcs::Model; + +RecognizeImageResult::RecognizeImageResult() : + ServiceResult() +{} + +RecognizeImageResult::RecognizeImageResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +RecognizeImageResult::~RecognizeImageResult() +{} + +void RecognizeImageResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + auto allBodyListNode = dataNode["BodyList"]["Body"]; + for (auto dataNodeBodyListBody : allBodyListNode) + { + Data::Body bodyObject; + if(!dataNodeBodyListBody["Feature"].isNull()) + bodyObject.feature = dataNodeBodyListBody["Feature"].asString(); + if(!dataNodeBodyListBody["FileName"].isNull()) + bodyObject.fileName = dataNodeBodyListBody["FileName"].asString(); + if(!dataNodeBodyListBody["ImageBaseSixFour"].isNull()) + bodyObject.imageBaseSixFour = dataNodeBodyListBody["ImageBaseSixFour"].asString(); + if(!dataNodeBodyListBody["LeftTopX"].isNull()) + bodyObject.leftTopX = dataNodeBodyListBody["LeftTopX"].asString(); + if(!dataNodeBodyListBody["LeftTopY"].isNull()) + bodyObject.leftTopY = dataNodeBodyListBody["LeftTopY"].asString(); + if(!dataNodeBodyListBody["LocalFeature"].isNull()) + bodyObject.localFeature = dataNodeBodyListBody["LocalFeature"].asString(); + if(!dataNodeBodyListBody["RespiratorColor"].isNull()) + bodyObject.respiratorColor = dataNodeBodyListBody["RespiratorColor"].asString(); + if(!dataNodeBodyListBody["RightBottomX"].isNull()) + bodyObject.rightBottomX = dataNodeBodyListBody["RightBottomX"].asString(); + if(!dataNodeBodyListBody["RightBottomY"].isNull()) + bodyObject.rightBottomY = dataNodeBodyListBody["RightBottomY"].asString(); + data_.bodyList.push_back(bodyObject); + } + auto allFaceListNode = dataNode["FaceList"]["Face"]; + for (auto dataNodeFaceListFace : allFaceListNode) + { + Data::Face faceObject; + if(!dataNodeFaceListFace["Feature"].isNull()) + faceObject.feature = dataNodeFaceListFace["Feature"].asString(); + if(!dataNodeFaceListFace["FileName"].isNull()) + faceObject.fileName = dataNodeFaceListFace["FileName"].asString(); + if(!dataNodeFaceListFace["ImageBaseSixFour"].isNull()) + faceObject.imageBaseSixFour = dataNodeFaceListFace["ImageBaseSixFour"].asString(); + if(!dataNodeFaceListFace["LeftTopX"].isNull()) + faceObject.leftTopX = dataNodeFaceListFace["LeftTopX"].asString(); + if(!dataNodeFaceListFace["LeftTopY"].isNull()) + faceObject.leftTopY = dataNodeFaceListFace["LeftTopY"].asString(); + if(!dataNodeFaceListFace["LocalFeature"].isNull()) + faceObject.localFeature = dataNodeFaceListFace["LocalFeature"].asString(); + if(!dataNodeFaceListFace["RespiratorColor"].isNull()) + faceObject.respiratorColor = dataNodeFaceListFace["RespiratorColor"].asString(); + if(!dataNodeFaceListFace["RightBottomX"].isNull()) + faceObject.rightBottomX = dataNodeFaceListFace["RightBottomX"].asString(); + if(!dataNodeFaceListFace["RightBottomY"].isNull()) + faceObject.rightBottomY = dataNodeFaceListFace["RightBottomY"].asString(); + data_.faceList.push_back(faceObject); + } + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string RecognizeImageResult::getMessage()const +{ + return message_; +} + +RecognizeImageResult::Data RecognizeImageResult::getData()const +{ + return data_; +} + +std::string RecognizeImageResult::getCode()const +{ + return code_; +} + diff --git a/vcs/src/model/SearchFaceRequest.cc b/vcs/src/model/SearchFaceRequest.cc new file mode 100644 index 000000000..db6a129fd --- /dev/null +++ b/vcs/src/model/SearchFaceRequest.cc @@ -0,0 +1,106 @@ +/* + * 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::Vcs::Model::SearchFaceRequest; + +SearchFaceRequest::SearchFaceRequest() : + RpcServiceRequest("vcs", "2020-05-15", "SearchFace") +{ + setMethod(HttpRequest::Method::Post); +} + +SearchFaceRequest::~SearchFaceRequest() +{} + +std::string SearchFaceRequest::getCorpId()const +{ + return corpId_; +} + +void SearchFaceRequest::setCorpId(const std::string& corpId) +{ + corpId_ = corpId; + setBodyParameter("CorpId", corpId); +} + +std::string SearchFaceRequest::getGbId()const +{ + return gbId_; +} + +void SearchFaceRequest::setGbId(const std::string& gbId) +{ + gbId_ = gbId; + setBodyParameter("GbId", gbId); +} + +long SearchFaceRequest::getStartTimeStamp()const +{ + return startTimeStamp_; +} + +void SearchFaceRequest::setStartTimeStamp(long startTimeStamp) +{ + startTimeStamp_ = startTimeStamp; + setBodyParameter("StartTimeStamp", std::to_string(startTimeStamp)); +} + +long SearchFaceRequest::getEndTimeStamp()const +{ + return endTimeStamp_; +} + +void SearchFaceRequest::setEndTimeStamp(long endTimeStamp) +{ + endTimeStamp_ = endTimeStamp; + setBodyParameter("EndTimeStamp", std::to_string(endTimeStamp)); +} + +int SearchFaceRequest::getPageNo()const +{ + return pageNo_; +} + +void SearchFaceRequest::setPageNo(int pageNo) +{ + pageNo_ = pageNo; + setBodyParameter("PageNo", std::to_string(pageNo)); +} + +int SearchFaceRequest::getPageSize()const +{ + return pageSize_; +} + +void SearchFaceRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setBodyParameter("PageSize", std::to_string(pageSize)); +} + +std::string SearchFaceRequest::getOptionList()const +{ + return optionList_; +} + +void SearchFaceRequest::setOptionList(const std::string& optionList) +{ + optionList_ = optionList; + setBodyParameter("OptionList", optionList); +} + diff --git a/vcs/src/model/SearchFaceResult.cc b/vcs/src/model/SearchFaceResult.cc new file mode 100644 index 000000000..c477b5913 --- /dev/null +++ b/vcs/src/model/SearchFaceResult.cc @@ -0,0 +1,94 @@ +/* + * 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::Vcs; +using namespace AlibabaCloud::Vcs::Model; + +SearchFaceResult::SearchFaceResult() : + ServiceResult() +{} + +SearchFaceResult::SearchFaceResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +SearchFaceResult::~SearchFaceResult() +{} + +void SearchFaceResult::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["PageNo"].isNull()) + data_.pageNo = std::stoi(dataNode["PageNo"].asString()); + if(!dataNode["PageSize"].isNull()) + data_.pageSize = std::stoi(dataNode["PageSize"].asString()); + if(!dataNode["TotalCount"].isNull()) + data_.totalCount = std::stoi(dataNode["TotalCount"].asString()); + if(!dataNode["TotalPage"].isNull()) + data_.totalPage = std::stoi(dataNode["TotalPage"].asString()); + auto allRecordsNode = dataNode["Records"]["Record"]; + for (auto dataNodeRecordsRecord : allRecordsNode) + { + Data::Record recordObject; + if(!dataNodeRecordsRecord["GbId"].isNull()) + recordObject.gbId = dataNodeRecordsRecord["GbId"].asString(); + if(!dataNodeRecordsRecord["ImageUrl"].isNull()) + recordObject.imageUrl = dataNodeRecordsRecord["ImageUrl"].asString(); + if(!dataNodeRecordsRecord["LeftTopX"].isNull()) + recordObject.leftTopX = std::stoi(dataNodeRecordsRecord["LeftTopX"].asString()); + if(!dataNodeRecordsRecord["LeftTopY"].isNull()) + recordObject.leftTopY = std::stoi(dataNodeRecordsRecord["LeftTopY"].asString()); + if(!dataNodeRecordsRecord["RightBottomX"].isNull()) + recordObject.rightBottomX = std::stoi(dataNodeRecordsRecord["RightBottomX"].asString()); + if(!dataNodeRecordsRecord["RightBottomY"].isNull()) + recordObject.rightBottomY = std::stoi(dataNodeRecordsRecord["RightBottomY"].asString()); + if(!dataNodeRecordsRecord["Score"].isNull()) + recordObject.score = std::stoi(dataNodeRecordsRecord["Score"].asString()); + if(!dataNodeRecordsRecord["TargetImageUrl"].isNull()) + recordObject.targetImageUrl = dataNodeRecordsRecord["TargetImageUrl"].asString(); + data_.records.push_back(recordObject); + } + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string SearchFaceResult::getMessage()const +{ + return message_; +} + +SearchFaceResult::Data SearchFaceResult::getData()const +{ + return data_; +} + +std::string SearchFaceResult::getCode()const +{ + return code_; +} + diff --git a/vcs/src/model/UpdateCorpRequest.cc b/vcs/src/model/UpdateCorpRequest.cc new file mode 100644 index 000000000..bf4360a38 --- /dev/null +++ b/vcs/src/model/UpdateCorpRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Vcs::Model::UpdateCorpRequest; + +UpdateCorpRequest::UpdateCorpRequest() : + RpcServiceRequest("vcs", "2020-05-15", "UpdateCorp") +{ + setMethod(HttpRequest::Method::Post); +} + +UpdateCorpRequest::~UpdateCorpRequest() +{} + +std::string UpdateCorpRequest::getCorpId()const +{ + return corpId_; +} + +void UpdateCorpRequest::setCorpId(const std::string& corpId) +{ + corpId_ = corpId; + setBodyParameter("CorpId", corpId); +} + +std::string UpdateCorpRequest::getParentCorpId()const +{ + return parentCorpId_; +} + +void UpdateCorpRequest::setParentCorpId(const std::string& parentCorpId) +{ + parentCorpId_ = parentCorpId; + setBodyParameter("ParentCorpId", parentCorpId); +} + +std::string UpdateCorpRequest::getDescription()const +{ + return description_; +} + +void UpdateCorpRequest::setDescription(const std::string& description) +{ + description_ = description; + setBodyParameter("Description", description); +} + +std::string UpdateCorpRequest::getAppName()const +{ + return appName_; +} + +void UpdateCorpRequest::setAppName(const std::string& appName) +{ + appName_ = appName; + setBodyParameter("AppName", appName); +} + +std::string UpdateCorpRequest::getCorpName()const +{ + return corpName_; +} + +void UpdateCorpRequest::setCorpName(const std::string& corpName) +{ + corpName_ = corpName; + setBodyParameter("CorpName", corpName); +} + diff --git a/vcs/src/model/UpdateCorpResult.cc b/vcs/src/model/UpdateCorpResult.cc new file mode 100644 index 000000000..238bbb1c5 --- /dev/null +++ b/vcs/src/model/UpdateCorpResult.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::Vcs; +using namespace AlibabaCloud::Vcs::Model; + +UpdateCorpResult::UpdateCorpResult() : + ServiceResult() +{} + +UpdateCorpResult::UpdateCorpResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UpdateCorpResult::~UpdateCorpResult() +{} + +void UpdateCorpResult::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["Data"].isNull()) + data_ = value["Data"].asString(); + +} + +std::string UpdateCorpResult::getMessage()const +{ + return message_; +} + +std::string UpdateCorpResult::getData()const +{ + return data_; +} + +std::string UpdateCorpResult::getCode()const +{ + return code_; +} + diff --git a/vcs/src/model/UpdateDeviceRequest.cc b/vcs/src/model/UpdateDeviceRequest.cc new file mode 100644 index 000000000..73cbaa92c --- /dev/null +++ b/vcs/src/model/UpdateDeviceRequest.cc @@ -0,0 +1,139 @@ +/* + * 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::Vcs::Model::UpdateDeviceRequest; + +UpdateDeviceRequest::UpdateDeviceRequest() : + RpcServiceRequest("vcs", "2020-05-15", "UpdateDevice") +{ + setMethod(HttpRequest::Method::Post); +} + +UpdateDeviceRequest::~UpdateDeviceRequest() +{} + +std::string UpdateDeviceRequest::getDeviceSite()const +{ + return deviceSite_; +} + +void UpdateDeviceRequest::setDeviceSite(const std::string& deviceSite) +{ + deviceSite_ = deviceSite; + setBodyParameter("DeviceSite", deviceSite); +} + +std::string UpdateDeviceRequest::getCorpId()const +{ + return corpId_; +} + +void UpdateDeviceRequest::setCorpId(const std::string& corpId) +{ + corpId_ = corpId; + setBodyParameter("CorpId", corpId); +} + +std::string UpdateDeviceRequest::getGbId()const +{ + return gbId_; +} + +void UpdateDeviceRequest::setGbId(const std::string& gbId) +{ + gbId_ = gbId; + setBodyParameter("GbId", gbId); +} + +std::string UpdateDeviceRequest::getDeviceDirection()const +{ + return deviceDirection_; +} + +void UpdateDeviceRequest::setDeviceDirection(const std::string& deviceDirection) +{ + deviceDirection_ = deviceDirection; + setBodyParameter("DeviceDirection", deviceDirection); +} + +std::string UpdateDeviceRequest::getDeviceRate()const +{ + return deviceRate_; +} + +void UpdateDeviceRequest::setDeviceRate(const std::string& deviceRate) +{ + deviceRate_ = deviceRate; + setBodyParameter("DeviceRate", deviceRate); +} + +std::string UpdateDeviceRequest::getDeviceAddress()const +{ + return deviceAddress_; +} + +void UpdateDeviceRequest::setDeviceAddress(const std::string& deviceAddress) +{ + deviceAddress_ = deviceAddress; + setBodyParameter("DeviceAddress", deviceAddress); +} + +std::string UpdateDeviceRequest::getDeviceType()const +{ + return deviceType_; +} + +void UpdateDeviceRequest::setDeviceType(const std::string& deviceType) +{ + deviceType_ = deviceType; + setBodyParameter("DeviceType", deviceType); +} + +std::string UpdateDeviceRequest::getDeviceResolution()const +{ + return deviceResolution_; +} + +void UpdateDeviceRequest::setDeviceResolution(const std::string& deviceResolution) +{ + deviceResolution_ = deviceResolution; + setBodyParameter("DeviceResolution", deviceResolution); +} + +std::string UpdateDeviceRequest::getVendor()const +{ + return vendor_; +} + +void UpdateDeviceRequest::setVendor(const std::string& vendor) +{ + vendor_ = vendor; + setBodyParameter("Vendor", vendor); +} + +std::string UpdateDeviceRequest::getDeviceName()const +{ + return deviceName_; +} + +void UpdateDeviceRequest::setDeviceName(const std::string& deviceName) +{ + deviceName_ = deviceName; + setBodyParameter("DeviceName", deviceName); +} + diff --git a/vcs/src/model/UpdateDeviceResult.cc b/vcs/src/model/UpdateDeviceResult.cc new file mode 100644 index 000000000..676095174 --- /dev/null +++ b/vcs/src/model/UpdateDeviceResult.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::Vcs; +using namespace AlibabaCloud::Vcs::Model; + +UpdateDeviceResult::UpdateDeviceResult() : + ServiceResult() +{} + +UpdateDeviceResult::UpdateDeviceResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UpdateDeviceResult::~UpdateDeviceResult() +{} + +void UpdateDeviceResult::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["Data"].isNull()) + data_ = value["Data"].asString(); + +} + +std::string UpdateDeviceResult::getMessage()const +{ + return message_; +} + +std::string UpdateDeviceResult::getData()const +{ + return data_; +} + +std::string UpdateDeviceResult::getCode()const +{ + return code_; +} +