diff --git a/VERSION b/VERSION index c9d5adb44..3eebce685 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1813 \ No newline at end of file +1.36.1814 \ No newline at end of file diff --git a/imageseg/CMakeLists.txt b/imageseg/CMakeLists.txt index d03ae097b..0e7ffb619 100644 --- a/imageseg/CMakeLists.txt +++ b/imageseg/CMakeLists.txt @@ -29,8 +29,6 @@ set(imageseg_public_header_model include/alibabacloud/imageseg/model/ParseFaceResult.h include/alibabacloud/imageseg/model/RefineMaskRequest.h include/alibabacloud/imageseg/model/RefineMaskResult.h - include/alibabacloud/imageseg/model/SegmentAnimalRequest.h - include/alibabacloud/imageseg/model/SegmentAnimalResult.h include/alibabacloud/imageseg/model/SegmentBodyRequest.h include/alibabacloud/imageseg/model/SegmentBodyResult.h include/alibabacloud/imageseg/model/SegmentClothRequest.h @@ -39,12 +37,8 @@ set(imageseg_public_header_model include/alibabacloud/imageseg/model/SegmentCommodityResult.h include/alibabacloud/imageseg/model/SegmentCommonImageRequest.h include/alibabacloud/imageseg/model/SegmentCommonImageResult.h - include/alibabacloud/imageseg/model/SegmentFaceRequest.h - include/alibabacloud/imageseg/model/SegmentFaceResult.h include/alibabacloud/imageseg/model/SegmentFoodRequest.h include/alibabacloud/imageseg/model/SegmentFoodResult.h - include/alibabacloud/imageseg/model/SegmentFurnitureRequest.h - include/alibabacloud/imageseg/model/SegmentFurnitureResult.h include/alibabacloud/imageseg/model/SegmentHDBodyRequest.h include/alibabacloud/imageseg/model/SegmentHDBodyResult.h include/alibabacloud/imageseg/model/SegmentHDCommonImageRequest.h @@ -55,16 +49,12 @@ set(imageseg_public_header_model include/alibabacloud/imageseg/model/SegmentHairResult.h include/alibabacloud/imageseg/model/SegmentHeadRequest.h include/alibabacloud/imageseg/model/SegmentHeadResult.h - include/alibabacloud/imageseg/model/SegmentLogoRequest.h - include/alibabacloud/imageseg/model/SegmentLogoResult.h include/alibabacloud/imageseg/model/SegmentSceneRequest.h include/alibabacloud/imageseg/model/SegmentSceneResult.h include/alibabacloud/imageseg/model/SegmentSkinRequest.h include/alibabacloud/imageseg/model/SegmentSkinResult.h include/alibabacloud/imageseg/model/SegmentSkyRequest.h - include/alibabacloud/imageseg/model/SegmentSkyResult.h - include/alibabacloud/imageseg/model/SegmentVehicleRequest.h - include/alibabacloud/imageseg/model/SegmentVehicleResult.h ) + include/alibabacloud/imageseg/model/SegmentSkyResult.h ) set(imageseg_src src/ImagesegClient.cc @@ -76,8 +66,6 @@ set(imageseg_src src/model/ParseFaceResult.cc src/model/RefineMaskRequest.cc src/model/RefineMaskResult.cc - src/model/SegmentAnimalRequest.cc - src/model/SegmentAnimalResult.cc src/model/SegmentBodyRequest.cc src/model/SegmentBodyResult.cc src/model/SegmentClothRequest.cc @@ -86,12 +74,8 @@ set(imageseg_src src/model/SegmentCommodityResult.cc src/model/SegmentCommonImageRequest.cc src/model/SegmentCommonImageResult.cc - src/model/SegmentFaceRequest.cc - src/model/SegmentFaceResult.cc src/model/SegmentFoodRequest.cc src/model/SegmentFoodResult.cc - src/model/SegmentFurnitureRequest.cc - src/model/SegmentFurnitureResult.cc src/model/SegmentHDBodyRequest.cc src/model/SegmentHDBodyResult.cc src/model/SegmentHDCommonImageRequest.cc @@ -102,16 +86,12 @@ set(imageseg_src src/model/SegmentHairResult.cc src/model/SegmentHeadRequest.cc src/model/SegmentHeadResult.cc - src/model/SegmentLogoRequest.cc - src/model/SegmentLogoResult.cc src/model/SegmentSceneRequest.cc src/model/SegmentSceneResult.cc src/model/SegmentSkinRequest.cc src/model/SegmentSkinResult.cc src/model/SegmentSkyRequest.cc - src/model/SegmentSkyResult.cc - src/model/SegmentVehicleRequest.cc - src/model/SegmentVehicleResult.cc ) + src/model/SegmentSkyResult.cc ) add_library(imageseg ${LIB_TYPE} ${imageseg_public_header} diff --git a/imageseg/include/alibabacloud/imageseg/ImagesegClient.h b/imageseg/include/alibabacloud/imageseg/ImagesegClient.h index 4496cd68b..da2e29cf3 100644 --- a/imageseg/include/alibabacloud/imageseg/ImagesegClient.h +++ b/imageseg/include/alibabacloud/imageseg/ImagesegClient.h @@ -30,8 +30,6 @@ #include "model/ParseFaceResult.h" #include "model/RefineMaskRequest.h" #include "model/RefineMaskResult.h" -#include "model/SegmentAnimalRequest.h" -#include "model/SegmentAnimalResult.h" #include "model/SegmentBodyRequest.h" #include "model/SegmentBodyResult.h" #include "model/SegmentClothRequest.h" @@ -40,12 +38,8 @@ #include "model/SegmentCommodityResult.h" #include "model/SegmentCommonImageRequest.h" #include "model/SegmentCommonImageResult.h" -#include "model/SegmentFaceRequest.h" -#include "model/SegmentFaceResult.h" #include "model/SegmentFoodRequest.h" #include "model/SegmentFoodResult.h" -#include "model/SegmentFurnitureRequest.h" -#include "model/SegmentFurnitureResult.h" #include "model/SegmentHDBodyRequest.h" #include "model/SegmentHDBodyResult.h" #include "model/SegmentHDCommonImageRequest.h" @@ -56,16 +50,12 @@ #include "model/SegmentHairResult.h" #include "model/SegmentHeadRequest.h" #include "model/SegmentHeadResult.h" -#include "model/SegmentLogoRequest.h" -#include "model/SegmentLogoResult.h" #include "model/SegmentSceneRequest.h" #include "model/SegmentSceneResult.h" #include "model/SegmentSkinRequest.h" #include "model/SegmentSkinResult.h" #include "model/SegmentSkyRequest.h" #include "model/SegmentSkyResult.h" -#include "model/SegmentVehicleRequest.h" -#include "model/SegmentVehicleResult.h" namespace AlibabaCloud @@ -87,9 +77,6 @@ namespace AlibabaCloud typedef Outcome RefineMaskOutcome; typedef std::future RefineMaskOutcomeCallable; typedef std::function&)> RefineMaskAsyncHandler; - typedef Outcome SegmentAnimalOutcome; - typedef std::future SegmentAnimalOutcomeCallable; - typedef std::function&)> SegmentAnimalAsyncHandler; typedef Outcome SegmentBodyOutcome; typedef std::future SegmentBodyOutcomeCallable; typedef std::function&)> SegmentBodyAsyncHandler; @@ -102,15 +89,9 @@ namespace AlibabaCloud typedef Outcome SegmentCommonImageOutcome; typedef std::future SegmentCommonImageOutcomeCallable; typedef std::function&)> SegmentCommonImageAsyncHandler; - typedef Outcome SegmentFaceOutcome; - typedef std::future SegmentFaceOutcomeCallable; - typedef std::function&)> SegmentFaceAsyncHandler; typedef Outcome SegmentFoodOutcome; typedef std::future SegmentFoodOutcomeCallable; typedef std::function&)> SegmentFoodAsyncHandler; - typedef Outcome SegmentFurnitureOutcome; - typedef std::future SegmentFurnitureOutcomeCallable; - typedef std::function&)> SegmentFurnitureAsyncHandler; typedef Outcome SegmentHDBodyOutcome; typedef std::future SegmentHDBodyOutcomeCallable; typedef std::function&)> SegmentHDBodyAsyncHandler; @@ -126,9 +107,6 @@ namespace AlibabaCloud typedef Outcome SegmentHeadOutcome; typedef std::future SegmentHeadOutcomeCallable; typedef std::function&)> SegmentHeadAsyncHandler; - typedef Outcome SegmentLogoOutcome; - typedef std::future SegmentLogoOutcomeCallable; - typedef std::function&)> SegmentLogoAsyncHandler; typedef Outcome SegmentSceneOutcome; typedef std::future SegmentSceneOutcomeCallable; typedef std::function&)> SegmentSceneAsyncHandler; @@ -138,9 +116,6 @@ namespace AlibabaCloud typedef Outcome SegmentSkyOutcome; typedef std::future SegmentSkyOutcomeCallable; typedef std::function&)> SegmentSkyAsyncHandler; - typedef Outcome SegmentVehicleOutcome; - typedef std::future SegmentVehicleOutcomeCallable; - typedef std::function&)> SegmentVehicleAsyncHandler; ImagesegClient(const Credentials &credentials, const ClientConfiguration &configuration); ImagesegClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); @@ -158,9 +133,6 @@ namespace AlibabaCloud RefineMaskOutcome refineMask(const Model::RefineMaskRequest &request)const; void refineMaskAsync(const Model::RefineMaskRequest& request, const RefineMaskAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; RefineMaskOutcomeCallable refineMaskCallable(const Model::RefineMaskRequest& request) const; - SegmentAnimalOutcome segmentAnimal(const Model::SegmentAnimalRequest &request)const; - void segmentAnimalAsync(const Model::SegmentAnimalRequest& request, const SegmentAnimalAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; - SegmentAnimalOutcomeCallable segmentAnimalCallable(const Model::SegmentAnimalRequest& request) const; SegmentBodyOutcome segmentBody(const Model::SegmentBodyRequest &request)const; void segmentBodyAsync(const Model::SegmentBodyRequest& request, const SegmentBodyAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; SegmentBodyOutcomeCallable segmentBodyCallable(const Model::SegmentBodyRequest& request) const; @@ -173,15 +145,9 @@ namespace AlibabaCloud SegmentCommonImageOutcome segmentCommonImage(const Model::SegmentCommonImageRequest &request)const; void segmentCommonImageAsync(const Model::SegmentCommonImageRequest& request, const SegmentCommonImageAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; SegmentCommonImageOutcomeCallable segmentCommonImageCallable(const Model::SegmentCommonImageRequest& request) const; - SegmentFaceOutcome segmentFace(const Model::SegmentFaceRequest &request)const; - void segmentFaceAsync(const Model::SegmentFaceRequest& request, const SegmentFaceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; - SegmentFaceOutcomeCallable segmentFaceCallable(const Model::SegmentFaceRequest& request) const; SegmentFoodOutcome segmentFood(const Model::SegmentFoodRequest &request)const; void segmentFoodAsync(const Model::SegmentFoodRequest& request, const SegmentFoodAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; SegmentFoodOutcomeCallable segmentFoodCallable(const Model::SegmentFoodRequest& request) const; - SegmentFurnitureOutcome segmentFurniture(const Model::SegmentFurnitureRequest &request)const; - void segmentFurnitureAsync(const Model::SegmentFurnitureRequest& request, const SegmentFurnitureAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; - SegmentFurnitureOutcomeCallable segmentFurnitureCallable(const Model::SegmentFurnitureRequest& request) const; SegmentHDBodyOutcome segmentHDBody(const Model::SegmentHDBodyRequest &request)const; void segmentHDBodyAsync(const Model::SegmentHDBodyRequest& request, const SegmentHDBodyAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; SegmentHDBodyOutcomeCallable segmentHDBodyCallable(const Model::SegmentHDBodyRequest& request) const; @@ -197,9 +163,6 @@ namespace AlibabaCloud SegmentHeadOutcome segmentHead(const Model::SegmentHeadRequest &request)const; void segmentHeadAsync(const Model::SegmentHeadRequest& request, const SegmentHeadAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; SegmentHeadOutcomeCallable segmentHeadCallable(const Model::SegmentHeadRequest& request) const; - SegmentLogoOutcome segmentLogo(const Model::SegmentLogoRequest &request)const; - void segmentLogoAsync(const Model::SegmentLogoRequest& request, const SegmentLogoAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; - SegmentLogoOutcomeCallable segmentLogoCallable(const Model::SegmentLogoRequest& request) const; SegmentSceneOutcome segmentScene(const Model::SegmentSceneRequest &request)const; void segmentSceneAsync(const Model::SegmentSceneRequest& request, const SegmentSceneAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; SegmentSceneOutcomeCallable segmentSceneCallable(const Model::SegmentSceneRequest& request) const; @@ -209,9 +172,6 @@ namespace AlibabaCloud SegmentSkyOutcome segmentSky(const Model::SegmentSkyRequest &request)const; void segmentSkyAsync(const Model::SegmentSkyRequest& request, const SegmentSkyAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; SegmentSkyOutcomeCallable segmentSkyCallable(const Model::SegmentSkyRequest& request) const; - SegmentVehicleOutcome segmentVehicle(const Model::SegmentVehicleRequest &request)const; - void segmentVehicleAsync(const Model::SegmentVehicleRequest& request, const SegmentVehicleAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; - SegmentVehicleOutcomeCallable segmentVehicleCallable(const Model::SegmentVehicleRequest& request) const; private: std::shared_ptr endpointProvider_; diff --git a/imageseg/include/alibabacloud/imageseg/model/SegmentAnimalRequest.h b/imageseg/include/alibabacloud/imageseg/model/SegmentAnimalRequest.h deleted file mode 100644 index 8a95ab287..000000000 --- a/imageseg/include/alibabacloud/imageseg/model/SegmentAnimalRequest.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTANIMALREQUEST_H_ -#define ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTANIMALREQUEST_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud { -namespace Imageseg { -namespace Model { -class ALIBABACLOUD_IMAGESEG_EXPORT SegmentAnimalRequest : public RpcServiceRequest { -public: - SegmentAnimalRequest(); - ~SegmentAnimalRequest(); - std::string getReturnForm() const; - void setReturnForm(const std::string &returnForm); - std::string getOssFile() const; - void setOssFile(const std::string &ossFile); - std::string getRequestProxyBy() const; - void setRequestProxyBy(const std::string &requestProxyBy); - std::string getImageURL() const; - void setImageURL(const std::string &imageURL); - -private: - std::string returnForm_; - std::string ossFile_; - std::string requestProxyBy_; - std::string imageURL_; -}; -} // namespace Model -} // namespace Imageseg -} // namespace AlibabaCloud -#endif // !ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTANIMALREQUEST_H_ diff --git a/imageseg/include/alibabacloud/imageseg/model/SegmentAnimalResult.h b/imageseg/include/alibabacloud/imageseg/model/SegmentAnimalResult.h deleted file mode 100644 index 2dc071ae4..000000000 --- a/imageseg/include/alibabacloud/imageseg/model/SegmentAnimalResult.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTANIMALRESULT_H_ -#define ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTANIMALRESULT_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Imageseg - { - namespace Model - { - class ALIBABACLOUD_IMAGESEG_EXPORT SegmentAnimalResult : public ServiceResult - { - public: - struct Data - { - std::string imageURL; - }; - - - SegmentAnimalResult(); - explicit SegmentAnimalResult(const std::string &payload); - ~SegmentAnimalResult(); - Data getData()const; - - protected: - void parse(const std::string &payload); - private: - Data data_; - - }; - } - } -} -#endif // !ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTANIMALRESULT_H_ \ No newline at end of file diff --git a/imageseg/include/alibabacloud/imageseg/model/SegmentClothRequest.h b/imageseg/include/alibabacloud/imageseg/model/SegmentClothRequest.h index f588dd56b..12758d5b0 100644 --- a/imageseg/include/alibabacloud/imageseg/model/SegmentClothRequest.h +++ b/imageseg/include/alibabacloud/imageseg/model/SegmentClothRequest.h @@ -30,6 +30,10 @@ class ALIBABACLOUD_IMAGESEG_EXPORT SegmentClothRequest : public RpcServiceReques public: SegmentClothRequest(); ~SegmentClothRequest(); + std::vector getClothClass() const; + void setClothClass(const std::vector &clothClass); + std::string getReturnForm() const; + void setReturnForm(const std::string &returnForm); std::string getOssFile() const; void setOssFile(const std::string &ossFile); std::string getRequestProxyBy() const; @@ -38,6 +42,8 @@ public: void setImageURL(const std::string &imageURL); private: + std::vector clothClass_; + std::string returnForm_; std::string ossFile_; std::string requestProxyBy_; std::string imageURL_; diff --git a/imageseg/include/alibabacloud/imageseg/model/SegmentClothResult.h b/imageseg/include/alibabacloud/imageseg/model/SegmentClothResult.h index e25122712..1bf8f12e3 100644 --- a/imageseg/include/alibabacloud/imageseg/model/SegmentClothResult.h +++ b/imageseg/include/alibabacloud/imageseg/model/SegmentClothResult.h @@ -36,6 +36,7 @@ namespace AlibabaCloud { struct Element { + std::string classUrl; std::string imageURL; }; std::vector elements; diff --git a/imageseg/include/alibabacloud/imageseg/model/SegmentFaceRequest.h b/imageseg/include/alibabacloud/imageseg/model/SegmentFaceRequest.h deleted file mode 100644 index 0ec21d4f6..000000000 --- a/imageseg/include/alibabacloud/imageseg/model/SegmentFaceRequest.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTFACEREQUEST_H_ -#define ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTFACEREQUEST_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud { -namespace Imageseg { -namespace Model { -class ALIBABACLOUD_IMAGESEG_EXPORT SegmentFaceRequest : public RpcServiceRequest { -public: - SegmentFaceRequest(); - ~SegmentFaceRequest(); - std::string getOssFile() const; - void setOssFile(const std::string &ossFile); - std::string getRequestProxyBy() const; - void setRequestProxyBy(const std::string &requestProxyBy); - std::string getImageURL() const; - void setImageURL(const std::string &imageURL); - -private: - std::string ossFile_; - std::string requestProxyBy_; - std::string imageURL_; -}; -} // namespace Model -} // namespace Imageseg -} // namespace AlibabaCloud -#endif // !ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTFACEREQUEST_H_ diff --git a/imageseg/include/alibabacloud/imageseg/model/SegmentFaceResult.h b/imageseg/include/alibabacloud/imageseg/model/SegmentFaceResult.h deleted file mode 100644 index 4cedb46fa..000000000 --- a/imageseg/include/alibabacloud/imageseg/model/SegmentFaceResult.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTFACERESULT_H_ -#define ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTFACERESULT_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Imageseg - { - namespace Model - { - class ALIBABACLOUD_IMAGESEG_EXPORT SegmentFaceResult : public ServiceResult - { - public: - struct Data - { - struct Element - { - int x; - std::string imageURL; - int y; - int height; - int width; - }; - std::vector elements; - }; - - - SegmentFaceResult(); - explicit SegmentFaceResult(const std::string &payload); - ~SegmentFaceResult(); - Data getData()const; - - protected: - void parse(const std::string &payload); - private: - Data data_; - - }; - } - } -} -#endif // !ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTFACERESULT_H_ \ No newline at end of file diff --git a/imageseg/include/alibabacloud/imageseg/model/SegmentFurnitureRequest.h b/imageseg/include/alibabacloud/imageseg/model/SegmentFurnitureRequest.h deleted file mode 100644 index 55dbba639..000000000 --- a/imageseg/include/alibabacloud/imageseg/model/SegmentFurnitureRequest.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTFURNITUREREQUEST_H_ -#define ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTFURNITUREREQUEST_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud { -namespace Imageseg { -namespace Model { -class ALIBABACLOUD_IMAGESEG_EXPORT SegmentFurnitureRequest : public RpcServiceRequest { -public: - SegmentFurnitureRequest(); - ~SegmentFurnitureRequest(); - std::string getOssFile() const; - void setOssFile(const std::string &ossFile); - std::string getRequestProxyBy() const; - void setRequestProxyBy(const std::string &requestProxyBy); - std::string getImageURL() const; - void setImageURL(const std::string &imageURL); - -private: - std::string ossFile_; - std::string requestProxyBy_; - std::string imageURL_; -}; -} // namespace Model -} // namespace Imageseg -} // namespace AlibabaCloud -#endif // !ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTFURNITUREREQUEST_H_ diff --git a/imageseg/include/alibabacloud/imageseg/model/SegmentFurnitureResult.h b/imageseg/include/alibabacloud/imageseg/model/SegmentFurnitureResult.h deleted file mode 100644 index 6daea722c..000000000 --- a/imageseg/include/alibabacloud/imageseg/model/SegmentFurnitureResult.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTFURNITURERESULT_H_ -#define ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTFURNITURERESULT_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Imageseg - { - namespace Model - { - class ALIBABACLOUD_IMAGESEG_EXPORT SegmentFurnitureResult : public ServiceResult - { - public: - struct Data - { - struct Element - { - std::string imageURL; - }; - std::vector elements; - }; - - - SegmentFurnitureResult(); - explicit SegmentFurnitureResult(const std::string &payload); - ~SegmentFurnitureResult(); - Data getData()const; - - protected: - void parse(const std::string &payload); - private: - Data data_; - - }; - } - } -} -#endif // !ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTFURNITURERESULT_H_ \ No newline at end of file diff --git a/imageseg/include/alibabacloud/imageseg/model/SegmentLogoRequest.h b/imageseg/include/alibabacloud/imageseg/model/SegmentLogoRequest.h deleted file mode 100644 index eec7dbadb..000000000 --- a/imageseg/include/alibabacloud/imageseg/model/SegmentLogoRequest.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTLOGOREQUEST_H_ -#define ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTLOGOREQUEST_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud { -namespace Imageseg { -namespace Model { -class ALIBABACLOUD_IMAGESEG_EXPORT SegmentLogoRequest : public RpcServiceRequest { -public: - SegmentLogoRequest(); - ~SegmentLogoRequest(); - std::string getOssFile() const; - void setOssFile(const std::string &ossFile); - std::string getRequestProxyBy() const; - void setRequestProxyBy(const std::string &requestProxyBy); - std::string getImageURL() const; - void setImageURL(const std::string &imageURL); - -private: - std::string ossFile_; - std::string requestProxyBy_; - std::string imageURL_; -}; -} // namespace Model -} // namespace Imageseg -} // namespace AlibabaCloud -#endif // !ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTLOGOREQUEST_H_ diff --git a/imageseg/include/alibabacloud/imageseg/model/SegmentLogoResult.h b/imageseg/include/alibabacloud/imageseg/model/SegmentLogoResult.h deleted file mode 100644 index aa07db04e..000000000 --- a/imageseg/include/alibabacloud/imageseg/model/SegmentLogoResult.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTLOGORESULT_H_ -#define ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTLOGORESULT_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Imageseg - { - namespace Model - { - class ALIBABACLOUD_IMAGESEG_EXPORT SegmentLogoResult : public ServiceResult - { - public: - struct Data - { - std::string imageURL; - }; - - - SegmentLogoResult(); - explicit SegmentLogoResult(const std::string &payload); - ~SegmentLogoResult(); - Data getData()const; - - protected: - void parse(const std::string &payload); - private: - Data data_; - - }; - } - } -} -#endif // !ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTLOGORESULT_H_ \ No newline at end of file diff --git a/imageseg/include/alibabacloud/imageseg/model/SegmentVehicleRequest.h b/imageseg/include/alibabacloud/imageseg/model/SegmentVehicleRequest.h deleted file mode 100644 index 8a7582f9d..000000000 --- a/imageseg/include/alibabacloud/imageseg/model/SegmentVehicleRequest.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTVEHICLEREQUEST_H_ -#define ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTVEHICLEREQUEST_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud { -namespace Imageseg { -namespace Model { -class ALIBABACLOUD_IMAGESEG_EXPORT SegmentVehicleRequest : public RpcServiceRequest { -public: - SegmentVehicleRequest(); - ~SegmentVehicleRequest(); - std::string getOssFile() const; - void setOssFile(const std::string &ossFile); - std::string getRequestProxyBy() const; - void setRequestProxyBy(const std::string &requestProxyBy); - std::string getImageURL() const; - void setImageURL(const std::string &imageURL); - -private: - std::string ossFile_; - std::string requestProxyBy_; - std::string imageURL_; -}; -} // namespace Model -} // namespace Imageseg -} // namespace AlibabaCloud -#endif // !ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTVEHICLEREQUEST_H_ diff --git a/imageseg/include/alibabacloud/imageseg/model/SegmentVehicleResult.h b/imageseg/include/alibabacloud/imageseg/model/SegmentVehicleResult.h deleted file mode 100644 index 793df99c2..000000000 --- a/imageseg/include/alibabacloud/imageseg/model/SegmentVehicleResult.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTVEHICLERESULT_H_ -#define ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTVEHICLERESULT_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Imageseg - { - namespace Model - { - class ALIBABACLOUD_IMAGESEG_EXPORT SegmentVehicleResult : public ServiceResult - { - public: - struct Data - { - struct Element - { - std::string originImageURL; - std::string imageURL; - }; - std::vector elements; - }; - - - SegmentVehicleResult(); - explicit SegmentVehicleResult(const std::string &payload); - ~SegmentVehicleResult(); - Data getData()const; - - protected: - void parse(const std::string &payload); - private: - Data data_; - - }; - } - } -} -#endif // !ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTVEHICLERESULT_H_ \ No newline at end of file diff --git a/imageseg/src/ImagesegClient.cc b/imageseg/src/ImagesegClient.cc index c6d298e97..3d65fd282 100644 --- a/imageseg/src/ImagesegClient.cc +++ b/imageseg/src/ImagesegClient.cc @@ -31,21 +31,21 @@ ImagesegClient::ImagesegClient(const Credentials &credentials, const ClientConfi RpcServiceClient(SERVICE_NAME, std::make_shared(credentials), configuration) { auto locationClient = std::make_shared(credentials, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "imageseg"); } ImagesegClient::ImagesegClient(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, ""); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "imageseg"); } ImagesegClient::ImagesegClient(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, ""); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "imageseg"); } ImagesegClient::~ImagesegClient() @@ -195,42 +195,6 @@ ImagesegClient::RefineMaskOutcomeCallable ImagesegClient::refineMaskCallable(con return task->get_future(); } -ImagesegClient::SegmentAnimalOutcome ImagesegClient::segmentAnimal(const SegmentAnimalRequest &request) const -{ - auto endpointOutcome = endpointProvider_->getEndpoint(); - if (!endpointOutcome.isSuccess()) - return SegmentAnimalOutcome(endpointOutcome.error()); - - auto outcome = makeRequest(endpointOutcome.result(), request); - - if (outcome.isSuccess()) - return SegmentAnimalOutcome(SegmentAnimalResult(outcome.result())); - else - return SegmentAnimalOutcome(outcome.error()); -} - -void ImagesegClient::segmentAnimalAsync(const SegmentAnimalRequest& request, const SegmentAnimalAsyncHandler& handler, const std::shared_ptr& context) const -{ - auto fn = [this, request, handler, context]() - { - handler(this, request, segmentAnimal(request), context); - }; - - asyncExecute(new Runnable(fn)); -} - -ImagesegClient::SegmentAnimalOutcomeCallable ImagesegClient::segmentAnimalCallable(const SegmentAnimalRequest &request) const -{ - auto task = std::make_shared>( - [this, request]() - { - return this->segmentAnimal(request); - }); - - asyncExecute(new Runnable([task]() { (*task)(); })); - return task->get_future(); -} - ImagesegClient::SegmentBodyOutcome ImagesegClient::segmentBody(const SegmentBodyRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -375,42 +339,6 @@ ImagesegClient::SegmentCommonImageOutcomeCallable ImagesegClient::segmentCommonI return task->get_future(); } -ImagesegClient::SegmentFaceOutcome ImagesegClient::segmentFace(const SegmentFaceRequest &request) const -{ - auto endpointOutcome = endpointProvider_->getEndpoint(); - if (!endpointOutcome.isSuccess()) - return SegmentFaceOutcome(endpointOutcome.error()); - - auto outcome = makeRequest(endpointOutcome.result(), request); - - if (outcome.isSuccess()) - return SegmentFaceOutcome(SegmentFaceResult(outcome.result())); - else - return SegmentFaceOutcome(outcome.error()); -} - -void ImagesegClient::segmentFaceAsync(const SegmentFaceRequest& request, const SegmentFaceAsyncHandler& handler, const std::shared_ptr& context) const -{ - auto fn = [this, request, handler, context]() - { - handler(this, request, segmentFace(request), context); - }; - - asyncExecute(new Runnable(fn)); -} - -ImagesegClient::SegmentFaceOutcomeCallable ImagesegClient::segmentFaceCallable(const SegmentFaceRequest &request) const -{ - auto task = std::make_shared>( - [this, request]() - { - return this->segmentFace(request); - }); - - asyncExecute(new Runnable([task]() { (*task)(); })); - return task->get_future(); -} - ImagesegClient::SegmentFoodOutcome ImagesegClient::segmentFood(const SegmentFoodRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -447,42 +375,6 @@ ImagesegClient::SegmentFoodOutcomeCallable ImagesegClient::segmentFoodCallable(c return task->get_future(); } -ImagesegClient::SegmentFurnitureOutcome ImagesegClient::segmentFurniture(const SegmentFurnitureRequest &request) const -{ - auto endpointOutcome = endpointProvider_->getEndpoint(); - if (!endpointOutcome.isSuccess()) - return SegmentFurnitureOutcome(endpointOutcome.error()); - - auto outcome = makeRequest(endpointOutcome.result(), request); - - if (outcome.isSuccess()) - return SegmentFurnitureOutcome(SegmentFurnitureResult(outcome.result())); - else - return SegmentFurnitureOutcome(outcome.error()); -} - -void ImagesegClient::segmentFurnitureAsync(const SegmentFurnitureRequest& request, const SegmentFurnitureAsyncHandler& handler, const std::shared_ptr& context) const -{ - auto fn = [this, request, handler, context]() - { - handler(this, request, segmentFurniture(request), context); - }; - - asyncExecute(new Runnable(fn)); -} - -ImagesegClient::SegmentFurnitureOutcomeCallable ImagesegClient::segmentFurnitureCallable(const SegmentFurnitureRequest &request) const -{ - auto task = std::make_shared>( - [this, request]() - { - return this->segmentFurniture(request); - }); - - asyncExecute(new Runnable([task]() { (*task)(); })); - return task->get_future(); -} - ImagesegClient::SegmentHDBodyOutcome ImagesegClient::segmentHDBody(const SegmentHDBodyRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -663,42 +555,6 @@ ImagesegClient::SegmentHeadOutcomeCallable ImagesegClient::segmentHeadCallable(c return task->get_future(); } -ImagesegClient::SegmentLogoOutcome ImagesegClient::segmentLogo(const SegmentLogoRequest &request) const -{ - auto endpointOutcome = endpointProvider_->getEndpoint(); - if (!endpointOutcome.isSuccess()) - return SegmentLogoOutcome(endpointOutcome.error()); - - auto outcome = makeRequest(endpointOutcome.result(), request); - - if (outcome.isSuccess()) - return SegmentLogoOutcome(SegmentLogoResult(outcome.result())); - else - return SegmentLogoOutcome(outcome.error()); -} - -void ImagesegClient::segmentLogoAsync(const SegmentLogoRequest& request, const SegmentLogoAsyncHandler& handler, const std::shared_ptr& context) const -{ - auto fn = [this, request, handler, context]() - { - handler(this, request, segmentLogo(request), context); - }; - - asyncExecute(new Runnable(fn)); -} - -ImagesegClient::SegmentLogoOutcomeCallable ImagesegClient::segmentLogoCallable(const SegmentLogoRequest &request) const -{ - auto task = std::make_shared>( - [this, request]() - { - return this->segmentLogo(request); - }); - - asyncExecute(new Runnable([task]() { (*task)(); })); - return task->get_future(); -} - ImagesegClient::SegmentSceneOutcome ImagesegClient::segmentScene(const SegmentSceneRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -807,39 +663,3 @@ ImagesegClient::SegmentSkyOutcomeCallable ImagesegClient::segmentSkyCallable(con return task->get_future(); } -ImagesegClient::SegmentVehicleOutcome ImagesegClient::segmentVehicle(const SegmentVehicleRequest &request) const -{ - auto endpointOutcome = endpointProvider_->getEndpoint(); - if (!endpointOutcome.isSuccess()) - return SegmentVehicleOutcome(endpointOutcome.error()); - - auto outcome = makeRequest(endpointOutcome.result(), request); - - if (outcome.isSuccess()) - return SegmentVehicleOutcome(SegmentVehicleResult(outcome.result())); - else - return SegmentVehicleOutcome(outcome.error()); -} - -void ImagesegClient::segmentVehicleAsync(const SegmentVehicleRequest& request, const SegmentVehicleAsyncHandler& handler, const std::shared_ptr& context) const -{ - auto fn = [this, request, handler, context]() - { - handler(this, request, segmentVehicle(request), context); - }; - - asyncExecute(new Runnable(fn)); -} - -ImagesegClient::SegmentVehicleOutcomeCallable ImagesegClient::segmentVehicleCallable(const SegmentVehicleRequest &request) const -{ - auto task = std::make_shared>( - [this, request]() - { - return this->segmentVehicle(request); - }); - - asyncExecute(new Runnable([task]() { (*task)(); })); - return task->get_future(); -} - diff --git a/imageseg/src/model/SegmentAnimalRequest.cc b/imageseg/src/model/SegmentAnimalRequest.cc deleted file mode 100644 index 97e71b4b9..000000000 --- a/imageseg/src/model/SegmentAnimalRequest.cc +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include - -using AlibabaCloud::Imageseg::Model::SegmentAnimalRequest; - -SegmentAnimalRequest::SegmentAnimalRequest() - : RpcServiceRequest("imageseg", "2019-12-30", "SegmentAnimal") { - setMethod(HttpRequest::Method::Post); -} - -SegmentAnimalRequest::~SegmentAnimalRequest() {} - -std::string SegmentAnimalRequest::getReturnForm() const { - return returnForm_; -} - -void SegmentAnimalRequest::setReturnForm(const std::string &returnForm) { - returnForm_ = returnForm; - setParameter(std::string("ReturnForm"), returnForm); -} - -std::string SegmentAnimalRequest::getOssFile() const { - return ossFile_; -} - -void SegmentAnimalRequest::setOssFile(const std::string &ossFile) { - ossFile_ = ossFile; - setParameter(std::string("OssFile"), ossFile); -} - -std::string SegmentAnimalRequest::getRequestProxyBy() const { - return requestProxyBy_; -} - -void SegmentAnimalRequest::setRequestProxyBy(const std::string &requestProxyBy) { - requestProxyBy_ = requestProxyBy; - setParameter(std::string("RequestProxyBy"), requestProxyBy); -} - -std::string SegmentAnimalRequest::getImageURL() const { - return imageURL_; -} - -void SegmentAnimalRequest::setImageURL(const std::string &imageURL) { - imageURL_ = imageURL; - setParameter(std::string("ImageURL"), imageURL); -} - diff --git a/imageseg/src/model/SegmentAnimalResult.cc b/imageseg/src/model/SegmentAnimalResult.cc deleted file mode 100644 index 09936677b..000000000 --- a/imageseg/src/model/SegmentAnimalResult.cc +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include - -using namespace AlibabaCloud::Imageseg; -using namespace AlibabaCloud::Imageseg::Model; - -SegmentAnimalResult::SegmentAnimalResult() : - ServiceResult() -{} - -SegmentAnimalResult::SegmentAnimalResult(const std::string &payload) : - ServiceResult() -{ - parse(payload); -} - -SegmentAnimalResult::~SegmentAnimalResult() -{} - -void SegmentAnimalResult::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["ImageURL"].isNull()) - data_.imageURL = dataNode["ImageURL"].asString(); - -} - -SegmentAnimalResult::Data SegmentAnimalResult::getData()const -{ - return data_; -} - diff --git a/imageseg/src/model/SegmentClothRequest.cc b/imageseg/src/model/SegmentClothRequest.cc index 2ca41e0c3..3d24570bd 100644 --- a/imageseg/src/model/SegmentClothRequest.cc +++ b/imageseg/src/model/SegmentClothRequest.cc @@ -25,6 +25,23 @@ SegmentClothRequest::SegmentClothRequest() SegmentClothRequest::~SegmentClothRequest() {} +std::vector SegmentClothRequest::getClothClass() const { + return clothClass_; +} + +void SegmentClothRequest::setClothClass(const std::vector &clothClass) { + clothClass_ = clothClass; +} + +std::string SegmentClothRequest::getReturnForm() const { + return returnForm_; +} + +void SegmentClothRequest::setReturnForm(const std::string &returnForm) { + returnForm_ = returnForm; + setParameter(std::string("ReturnForm"), returnForm); +} + std::string SegmentClothRequest::getOssFile() const { return ossFile_; } diff --git a/imageseg/src/model/SegmentClothResult.cc b/imageseg/src/model/SegmentClothResult.cc index 627a2d538..19809d576 100644 --- a/imageseg/src/model/SegmentClothResult.cc +++ b/imageseg/src/model/SegmentClothResult.cc @@ -46,6 +46,8 @@ void SegmentClothResult::parse(const std::string &payload) Data::Element elementObject; if(!dataNodeElementsElement["ImageURL"].isNull()) elementObject.imageURL = dataNodeElementsElement["ImageURL"].asString(); + if(!dataNodeElementsElement["ClassUrl"].isNull()) + elementObject.classUrl = dataNodeElementsElement["ClassUrl"].asString(); data_.elements.push_back(elementObject); } diff --git a/imageseg/src/model/SegmentFaceRequest.cc b/imageseg/src/model/SegmentFaceRequest.cc deleted file mode 100644 index d03f05743..000000000 --- a/imageseg/src/model/SegmentFaceRequest.cc +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include - -using AlibabaCloud::Imageseg::Model::SegmentFaceRequest; - -SegmentFaceRequest::SegmentFaceRequest() - : RpcServiceRequest("imageseg", "2019-12-30", "SegmentFace") { - setMethod(HttpRequest::Method::Post); -} - -SegmentFaceRequest::~SegmentFaceRequest() {} - -std::string SegmentFaceRequest::getOssFile() const { - return ossFile_; -} - -void SegmentFaceRequest::setOssFile(const std::string &ossFile) { - ossFile_ = ossFile; - setParameter(std::string("OssFile"), ossFile); -} - -std::string SegmentFaceRequest::getRequestProxyBy() const { - return requestProxyBy_; -} - -void SegmentFaceRequest::setRequestProxyBy(const std::string &requestProxyBy) { - requestProxyBy_ = requestProxyBy; - setParameter(std::string("RequestProxyBy"), requestProxyBy); -} - -std::string SegmentFaceRequest::getImageURL() const { - return imageURL_; -} - -void SegmentFaceRequest::setImageURL(const std::string &imageURL) { - imageURL_ = imageURL; - setParameter(std::string("ImageURL"), imageURL); -} - diff --git a/imageseg/src/model/SegmentFaceResult.cc b/imageseg/src/model/SegmentFaceResult.cc deleted file mode 100644 index b2ca059cf..000000000 --- a/imageseg/src/model/SegmentFaceResult.cc +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include - -using namespace AlibabaCloud::Imageseg; -using namespace AlibabaCloud::Imageseg::Model; - -SegmentFaceResult::SegmentFaceResult() : - ServiceResult() -{} - -SegmentFaceResult::SegmentFaceResult(const std::string &payload) : - ServiceResult() -{ - parse(payload); -} - -SegmentFaceResult::~SegmentFaceResult() -{} - -void SegmentFaceResult::parse(const std::string &payload) -{ - Json::Reader reader; - Json::Value value; - reader.parse(payload, value); - setRequestId(value["RequestId"].asString()); - auto dataNode = value["Data"]; - auto allElementsNode = dataNode["Elements"]["Element"]; - for (auto dataNodeElementsElement : allElementsNode) - { - Data::Element elementObject; - if(!dataNodeElementsElement["ImageURL"].isNull()) - elementObject.imageURL = dataNodeElementsElement["ImageURL"].asString(); - if(!dataNodeElementsElement["Width"].isNull()) - elementObject.width = std::stoi(dataNodeElementsElement["Width"].asString()); - if(!dataNodeElementsElement["Height"].isNull()) - elementObject.height = std::stoi(dataNodeElementsElement["Height"].asString()); - if(!dataNodeElementsElement["Y"].isNull()) - elementObject.y = std::stoi(dataNodeElementsElement["Y"].asString()); - if(!dataNodeElementsElement["X"].isNull()) - elementObject.x = std::stoi(dataNodeElementsElement["X"].asString()); - data_.elements.push_back(elementObject); - } - -} - -SegmentFaceResult::Data SegmentFaceResult::getData()const -{ - return data_; -} - diff --git a/imageseg/src/model/SegmentFurnitureRequest.cc b/imageseg/src/model/SegmentFurnitureRequest.cc deleted file mode 100644 index 6d7cd7131..000000000 --- a/imageseg/src/model/SegmentFurnitureRequest.cc +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include - -using AlibabaCloud::Imageseg::Model::SegmentFurnitureRequest; - -SegmentFurnitureRequest::SegmentFurnitureRequest() - : RpcServiceRequest("imageseg", "2019-12-30", "SegmentFurniture") { - setMethod(HttpRequest::Method::Post); -} - -SegmentFurnitureRequest::~SegmentFurnitureRequest() {} - -std::string SegmentFurnitureRequest::getOssFile() const { - return ossFile_; -} - -void SegmentFurnitureRequest::setOssFile(const std::string &ossFile) { - ossFile_ = ossFile; - setParameter(std::string("OssFile"), ossFile); -} - -std::string SegmentFurnitureRequest::getRequestProxyBy() const { - return requestProxyBy_; -} - -void SegmentFurnitureRequest::setRequestProxyBy(const std::string &requestProxyBy) { - requestProxyBy_ = requestProxyBy; - setParameter(std::string("RequestProxyBy"), requestProxyBy); -} - -std::string SegmentFurnitureRequest::getImageURL() const { - return imageURL_; -} - -void SegmentFurnitureRequest::setImageURL(const std::string &imageURL) { - imageURL_ = imageURL; - setBodyParameter(std::string("ImageURL"), imageURL); -} - diff --git a/imageseg/src/model/SegmentFurnitureResult.cc b/imageseg/src/model/SegmentFurnitureResult.cc deleted file mode 100644 index dda0f0bde..000000000 --- a/imageseg/src/model/SegmentFurnitureResult.cc +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include - -using namespace AlibabaCloud::Imageseg; -using namespace AlibabaCloud::Imageseg::Model; - -SegmentFurnitureResult::SegmentFurnitureResult() : - ServiceResult() -{} - -SegmentFurnitureResult::SegmentFurnitureResult(const std::string &payload) : - ServiceResult() -{ - parse(payload); -} - -SegmentFurnitureResult::~SegmentFurnitureResult() -{} - -void SegmentFurnitureResult::parse(const std::string &payload) -{ - Json::Reader reader; - Json::Value value; - reader.parse(payload, value); - setRequestId(value["RequestId"].asString()); - auto dataNode = value["Data"]; - auto allElementsNode = dataNode["Elements"]["Element"]; - for (auto dataNodeElementsElement : allElementsNode) - { - Data::Element elementObject; - if(!dataNodeElementsElement["ImageURL"].isNull()) - elementObject.imageURL = dataNodeElementsElement["ImageURL"].asString(); - data_.elements.push_back(elementObject); - } - -} - -SegmentFurnitureResult::Data SegmentFurnitureResult::getData()const -{ - return data_; -} - diff --git a/imageseg/src/model/SegmentLogoRequest.cc b/imageseg/src/model/SegmentLogoRequest.cc deleted file mode 100644 index 3f3462159..000000000 --- a/imageseg/src/model/SegmentLogoRequest.cc +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include - -using AlibabaCloud::Imageseg::Model::SegmentLogoRequest; - -SegmentLogoRequest::SegmentLogoRequest() - : RpcServiceRequest("imageseg", "2019-12-30", "SegmentLogo") { - setMethod(HttpRequest::Method::Post); -} - -SegmentLogoRequest::~SegmentLogoRequest() {} - -std::string SegmentLogoRequest::getOssFile() const { - return ossFile_; -} - -void SegmentLogoRequest::setOssFile(const std::string &ossFile) { - ossFile_ = ossFile; - setParameter(std::string("OssFile"), ossFile); -} - -std::string SegmentLogoRequest::getRequestProxyBy() const { - return requestProxyBy_; -} - -void SegmentLogoRequest::setRequestProxyBy(const std::string &requestProxyBy) { - requestProxyBy_ = requestProxyBy; - setParameter(std::string("RequestProxyBy"), requestProxyBy); -} - -std::string SegmentLogoRequest::getImageURL() const { - return imageURL_; -} - -void SegmentLogoRequest::setImageURL(const std::string &imageURL) { - imageURL_ = imageURL; - setParameter(std::string("ImageURL"), imageURL); -} - diff --git a/imageseg/src/model/SegmentLogoResult.cc b/imageseg/src/model/SegmentLogoResult.cc deleted file mode 100644 index e1fe40411..000000000 --- a/imageseg/src/model/SegmentLogoResult.cc +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include - -using namespace AlibabaCloud::Imageseg; -using namespace AlibabaCloud::Imageseg::Model; - -SegmentLogoResult::SegmentLogoResult() : - ServiceResult() -{} - -SegmentLogoResult::SegmentLogoResult(const std::string &payload) : - ServiceResult() -{ - parse(payload); -} - -SegmentLogoResult::~SegmentLogoResult() -{} - -void SegmentLogoResult::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["ImageURL"].isNull()) - data_.imageURL = dataNode["ImageURL"].asString(); - -} - -SegmentLogoResult::Data SegmentLogoResult::getData()const -{ - return data_; -} - diff --git a/imageseg/src/model/SegmentVehicleRequest.cc b/imageseg/src/model/SegmentVehicleRequest.cc deleted file mode 100644 index c5c534e84..000000000 --- a/imageseg/src/model/SegmentVehicleRequest.cc +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include - -using AlibabaCloud::Imageseg::Model::SegmentVehicleRequest; - -SegmentVehicleRequest::SegmentVehicleRequest() - : RpcServiceRequest("imageseg", "2019-12-30", "SegmentVehicle") { - setMethod(HttpRequest::Method::Post); -} - -SegmentVehicleRequest::~SegmentVehicleRequest() {} - -std::string SegmentVehicleRequest::getOssFile() const { - return ossFile_; -} - -void SegmentVehicleRequest::setOssFile(const std::string &ossFile) { - ossFile_ = ossFile; - setParameter(std::string("OssFile"), ossFile); -} - -std::string SegmentVehicleRequest::getRequestProxyBy() const { - return requestProxyBy_; -} - -void SegmentVehicleRequest::setRequestProxyBy(const std::string &requestProxyBy) { - requestProxyBy_ = requestProxyBy; - setParameter(std::string("RequestProxyBy"), requestProxyBy); -} - -std::string SegmentVehicleRequest::getImageURL() const { - return imageURL_; -} - -void SegmentVehicleRequest::setImageURL(const std::string &imageURL) { - imageURL_ = imageURL; - setBodyParameter(std::string("ImageURL"), imageURL); -} - diff --git a/imageseg/src/model/SegmentVehicleResult.cc b/imageseg/src/model/SegmentVehicleResult.cc deleted file mode 100644 index a6ba65ead..000000000 --- a/imageseg/src/model/SegmentVehicleResult.cc +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include - -using namespace AlibabaCloud::Imageseg; -using namespace AlibabaCloud::Imageseg::Model; - -SegmentVehicleResult::SegmentVehicleResult() : - ServiceResult() -{} - -SegmentVehicleResult::SegmentVehicleResult(const std::string &payload) : - ServiceResult() -{ - parse(payload); -} - -SegmentVehicleResult::~SegmentVehicleResult() -{} - -void SegmentVehicleResult::parse(const std::string &payload) -{ - Json::Reader reader; - Json::Value value; - reader.parse(payload, value); - setRequestId(value["RequestId"].asString()); - auto dataNode = value["Data"]; - auto allElementsNode = dataNode["Elements"]["Element"]; - for (auto dataNodeElementsElement : allElementsNode) - { - Data::Element elementObject; - if(!dataNodeElementsElement["ImageURL"].isNull()) - elementObject.imageURL = dataNodeElementsElement["ImageURL"].asString(); - if(!dataNodeElementsElement["OriginImageURL"].isNull()) - elementObject.originImageURL = dataNodeElementsElement["OriginImageURL"].asString(); - data_.elements.push_back(elementObject); - } - -} - -SegmentVehicleResult::Data SegmentVehicleResult::getData()const -{ - return data_; -} -