code
stringlengths
1
1.05M
repo_name
stringlengths
6
83
path
stringlengths
3
242
language
stringclasses
222 values
license
stringclasses
20 values
size
int64
1
1.05M
/* * 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_IMAGEENHAN_MODEL_GENERATEDYNAMICIMAGERESULT_H_ #define ALIBABACLOUD_IMAGEENHAN_MODEL_GENERATEDYNAMICIMAGERESULT_H_ #include <string> #include <vector> #include <utility> #include <alibabacloud/core/ServiceResult.h> #include <alibabacloud/imageenhan/ImageenhanExport.h> namespace AlibabaCloud { namespace Imageenhan { namespace Model { class ALIBABACLOUD_IMAGEENHAN_EXPORT GenerateDynamicImageResult : public ServiceResult { public: struct Data { std::string url; }; GenerateDynamicImageResult(); explicit GenerateDynamicImageResult(const std::string &payload); ~GenerateDynamicImageResult(); Data getData()const; protected: void parse(const std::string &payload); private: Data data_; }; } } } #endif // !ALIBABACLOUD_IMAGEENHAN_MODEL_GENERATEDYNAMICIMAGERESULT_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/include/alibabacloud/imageenhan/model/GenerateDynamicImageResult.h
C++
apache-2.0
1,487
/* * 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_IMAGEENHAN_MODEL_GETASYNCJOBRESULTREQUEST_H_ #define ALIBABACLOUD_IMAGEENHAN_MODEL_GETASYNCJOBRESULTREQUEST_H_ #include <string> #include <vector> #include <alibabacloud/core/RpcServiceRequest.h> #include <alibabacloud/imageenhan/ImageenhanExport.h> namespace AlibabaCloud { namespace Imageenhan { namespace Model { class ALIBABACLOUD_IMAGEENHAN_EXPORT GetAsyncJobResultRequest : public RpcServiceRequest { public: GetAsyncJobResultRequest(); ~GetAsyncJobResultRequest(); bool getAsync()const; void setAsync(bool async); std::string getJobId()const; void setJobId(const std::string& jobId); private: bool async_; std::string jobId_; }; } } } #endif // !ALIBABACLOUD_IMAGEENHAN_MODEL_GETASYNCJOBRESULTREQUEST_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/include/alibabacloud/imageenhan/model/GetAsyncJobResultRequest.h
C++
apache-2.0
1,436
/* * 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_IMAGEENHAN_MODEL_GETASYNCJOBRESULTRESULT_H_ #define ALIBABACLOUD_IMAGEENHAN_MODEL_GETASYNCJOBRESULTRESULT_H_ #include <string> #include <vector> #include <utility> #include <alibabacloud/core/ServiceResult.h> #include <alibabacloud/imageenhan/ImageenhanExport.h> namespace AlibabaCloud { namespace Imageenhan { namespace Model { class ALIBABACLOUD_IMAGEENHAN_EXPORT GetAsyncJobResultResult : public ServiceResult { public: struct Data { std::string status; std::string errorCode; std::string errorMessage; std::string jobId; std::string result; }; GetAsyncJobResultResult(); explicit GetAsyncJobResultResult(const std::string &payload); ~GetAsyncJobResultResult(); Data getData()const; protected: void parse(const std::string &payload); private: Data data_; }; } } } #endif // !ALIBABACLOUD_IMAGEENHAN_MODEL_GETASYNCJOBRESULTRESULT_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/include/alibabacloud/imageenhan/model/GetAsyncJobResultResult.h
C++
apache-2.0
1,577
/* * 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_IMAGEENHAN_MODEL_IMAGEBLINDCHARACTERWATERMARKREQUEST_H_ #define ALIBABACLOUD_IMAGEENHAN_MODEL_IMAGEBLINDCHARACTERWATERMARKREQUEST_H_ #include <string> #include <vector> #include <alibabacloud/core/RpcServiceRequest.h> #include <alibabacloud/imageenhan/ImageenhanExport.h> namespace AlibabaCloud { namespace Imageenhan { namespace Model { class ALIBABACLOUD_IMAGEENHAN_EXPORT ImageBlindCharacterWatermarkRequest : public RpcServiceRequest { public: ImageBlindCharacterWatermarkRequest(); ~ImageBlindCharacterWatermarkRequest(); std::string getWatermarkImageURL()const; void setWatermarkImageURL(const std::string& watermarkImageURL); int getQualityFactor()const; void setQualityFactor(int qualityFactor); std::string getFunctionType()const; void setFunctionType(const std::string& functionType); std::string getOutputFileType()const; void setOutputFileType(const std::string& outputFileType); std::string getOriginImageURL()const; void setOriginImageURL(const std::string& originImageURL); std::string getText()const; void setText(const std::string& text); private: std::string watermarkImageURL_; int qualityFactor_; std::string functionType_; std::string outputFileType_; std::string originImageURL_; std::string text_; }; } } } #endif // !ALIBABACLOUD_IMAGEENHAN_MODEL_IMAGEBLINDCHARACTERWATERMARKREQUEST_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/include/alibabacloud/imageenhan/model/ImageBlindCharacterWatermarkRequest.h
C++
apache-2.0
2,095
/* * 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_IMAGEENHAN_MODEL_IMAGEBLINDCHARACTERWATERMARKRESULT_H_ #define ALIBABACLOUD_IMAGEENHAN_MODEL_IMAGEBLINDCHARACTERWATERMARKRESULT_H_ #include <string> #include <vector> #include <utility> #include <alibabacloud/core/ServiceResult.h> #include <alibabacloud/imageenhan/ImageenhanExport.h> namespace AlibabaCloud { namespace Imageenhan { namespace Model { class ALIBABACLOUD_IMAGEENHAN_EXPORT ImageBlindCharacterWatermarkResult : public ServiceResult { public: struct Data { std::string textImageURL; std::string watermarkImageURL; }; ImageBlindCharacterWatermarkResult(); explicit ImageBlindCharacterWatermarkResult(const std::string &payload); ~ImageBlindCharacterWatermarkResult(); Data getData()const; protected: void parse(const std::string &payload); private: Data data_; }; } } } #endif // !ALIBABACLOUD_IMAGEENHAN_MODEL_IMAGEBLINDCHARACTERWATERMARKRESULT_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/include/alibabacloud/imageenhan/model/ImageBlindCharacterWatermarkResult.h
C++
apache-2.0
1,588
/* * 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_IMAGEENHAN_MODEL_IMAGEBLINDPICWATERMARKREQUEST_H_ #define ALIBABACLOUD_IMAGEENHAN_MODEL_IMAGEBLINDPICWATERMARKREQUEST_H_ #include <string> #include <vector> #include <alibabacloud/core/RpcServiceRequest.h> #include <alibabacloud/imageenhan/ImageenhanExport.h> namespace AlibabaCloud { namespace Imageenhan { namespace Model { class ALIBABACLOUD_IMAGEENHAN_EXPORT ImageBlindPicWatermarkRequest : public RpcServiceRequest { public: ImageBlindPicWatermarkRequest(); ~ImageBlindPicWatermarkRequest(); std::string getWatermarkImageURL()const; void setWatermarkImageURL(const std::string& watermarkImageURL); int getQualityFactor()const; void setQualityFactor(int qualityFactor); std::string getFunctionType()const; void setFunctionType(const std::string& functionType); std::string getLogoURL()const; void setLogoURL(const std::string& logoURL); std::string getOutputFileType()const; void setOutputFileType(const std::string& outputFileType); std::string getOriginImageURL()const; void setOriginImageURL(const std::string& originImageURL); private: std::string watermarkImageURL_; int qualityFactor_; std::string functionType_; std::string logoURL_; std::string outputFileType_; std::string originImageURL_; }; } } } #endif // !ALIBABACLOUD_IMAGEENHAN_MODEL_IMAGEBLINDPICWATERMARKREQUEST_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/include/alibabacloud/imageenhan/model/ImageBlindPicWatermarkRequest.h
C++
apache-2.0
2,071
/* * 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_IMAGEENHAN_MODEL_IMAGEBLINDPICWATERMARKRESULT_H_ #define ALIBABACLOUD_IMAGEENHAN_MODEL_IMAGEBLINDPICWATERMARKRESULT_H_ #include <string> #include <vector> #include <utility> #include <alibabacloud/core/ServiceResult.h> #include <alibabacloud/imageenhan/ImageenhanExport.h> namespace AlibabaCloud { namespace Imageenhan { namespace Model { class ALIBABACLOUD_IMAGEENHAN_EXPORT ImageBlindPicWatermarkResult : public ServiceResult { public: struct Data { std::string watermarkImageURL; std::string logoURL; }; ImageBlindPicWatermarkResult(); explicit ImageBlindPicWatermarkResult(const std::string &payload); ~ImageBlindPicWatermarkResult(); Data getData()const; protected: void parse(const std::string &payload); private: Data data_; }; } } } #endif // !ALIBABACLOUD_IMAGEENHAN_MODEL_IMAGEBLINDPICWATERMARKRESULT_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/include/alibabacloud/imageenhan/model/ImageBlindPicWatermarkResult.h
C++
apache-2.0
1,541
/* * 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_IMAGEENHAN_MODEL_IMITATEPHOTOSTYLEREQUEST_H_ #define ALIBABACLOUD_IMAGEENHAN_MODEL_IMITATEPHOTOSTYLEREQUEST_H_ #include <string> #include <vector> #include <alibabacloud/core/RpcServiceRequest.h> #include <alibabacloud/imageenhan/ImageenhanExport.h> namespace AlibabaCloud { namespace Imageenhan { namespace Model { class ALIBABACLOUD_IMAGEENHAN_EXPORT ImitatePhotoStyleRequest : public RpcServiceRequest { public: ImitatePhotoStyleRequest(); ~ImitatePhotoStyleRequest(); std::string getStyleUrl()const; void setStyleUrl(const std::string& styleUrl); std::string getImageURL()const; void setImageURL(const std::string& imageURL); private: std::string styleUrl_; std::string imageURL_; }; } } } #endif // !ALIBABACLOUD_IMAGEENHAN_MODEL_IMITATEPHOTOSTYLEREQUEST_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/include/alibabacloud/imageenhan/model/ImitatePhotoStyleRequest.h
C++
apache-2.0
1,488
/* * 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_IMAGEENHAN_MODEL_IMITATEPHOTOSTYLERESULT_H_ #define ALIBABACLOUD_IMAGEENHAN_MODEL_IMITATEPHOTOSTYLERESULT_H_ #include <string> #include <vector> #include <utility> #include <alibabacloud/core/ServiceResult.h> #include <alibabacloud/imageenhan/ImageenhanExport.h> namespace AlibabaCloud { namespace Imageenhan { namespace Model { class ALIBABACLOUD_IMAGEENHAN_EXPORT ImitatePhotoStyleResult : public ServiceResult { public: struct Data { std::string imageURL; }; ImitatePhotoStyleResult(); explicit ImitatePhotoStyleResult(const std::string &payload); ~ImitatePhotoStyleResult(); Data getData()const; protected: void parse(const std::string &payload); private: Data data_; }; } } } #endif // !ALIBABACLOUD_IMAGEENHAN_MODEL_IMITATEPHOTOSTYLERESULT_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/include/alibabacloud/imageenhan/model/ImitatePhotoStyleResult.h
C++
apache-2.0
1,471
/* * 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_IMAGEENHAN_MODEL_INTELLIGENTCOMPOSITIONREQUEST_H_ #define ALIBABACLOUD_IMAGEENHAN_MODEL_INTELLIGENTCOMPOSITIONREQUEST_H_ #include <string> #include <vector> #include <alibabacloud/core/RpcServiceRequest.h> #include <alibabacloud/imageenhan/ImageenhanExport.h> namespace AlibabaCloud { namespace Imageenhan { namespace Model { class ALIBABACLOUD_IMAGEENHAN_EXPORT IntelligentCompositionRequest : public RpcServiceRequest { public: IntelligentCompositionRequest(); ~IntelligentCompositionRequest(); int getNumBoxes()const; void setNumBoxes(int numBoxes); std::string getImageURL()const; void setImageURL(const std::string& imageURL); private: int numBoxes_; std::string imageURL_; }; } } } #endif // !ALIBABACLOUD_IMAGEENHAN_MODEL_INTELLIGENTCOMPOSITIONREQUEST_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/include/alibabacloud/imageenhan/model/IntelligentCompositionRequest.h
C++
apache-2.0
1,487
/* * 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_IMAGEENHAN_MODEL_INTELLIGENTCOMPOSITIONRESULT_H_ #define ALIBABACLOUD_IMAGEENHAN_MODEL_INTELLIGENTCOMPOSITIONRESULT_H_ #include <string> #include <vector> #include <utility> #include <alibabacloud/core/ServiceResult.h> #include <alibabacloud/imageenhan/ImageenhanExport.h> namespace AlibabaCloud { namespace Imageenhan { namespace Model { class ALIBABACLOUD_IMAGEENHAN_EXPORT IntelligentCompositionResult : public ServiceResult { public: struct Data { struct Element { int maxX; int maxY; int minX; float score; int minY; }; std::vector<Element> elements; }; IntelligentCompositionResult(); explicit IntelligentCompositionResult(const std::string &payload); ~IntelligentCompositionResult(); Data getData()const; protected: void parse(const std::string &payload); private: Data data_; }; } } } #endif // !ALIBABACLOUD_IMAGEENHAN_MODEL_INTELLIGENTCOMPOSITIONRESULT_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/include/alibabacloud/imageenhan/model/IntelligentCompositionResult.h
C++
apache-2.0
1,633
/* * 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_IMAGEENHAN_MODEL_MAKESUPERRESOLUTIONIMAGEREQUEST_H_ #define ALIBABACLOUD_IMAGEENHAN_MODEL_MAKESUPERRESOLUTIONIMAGEREQUEST_H_ #include <string> #include <vector> #include <alibabacloud/core/RpcServiceRequest.h> #include <alibabacloud/imageenhan/ImageenhanExport.h> namespace AlibabaCloud { namespace Imageenhan { namespace Model { class ALIBABACLOUD_IMAGEENHAN_EXPORT MakeSuperResolutionImageRequest : public RpcServiceRequest { public: MakeSuperResolutionImageRequest(); ~MakeSuperResolutionImageRequest(); std::string getUrl()const; void setUrl(const std::string& url); private: std::string url_; }; } } } #endif // !ALIBABACLOUD_IMAGEENHAN_MODEL_MAKESUPERRESOLUTIONIMAGEREQUEST_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/include/alibabacloud/imageenhan/model/MakeSuperResolutionImageRequest.h
C++
apache-2.0
1,393
/* * 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_IMAGEENHAN_MODEL_MAKESUPERRESOLUTIONIMAGERESULT_H_ #define ALIBABACLOUD_IMAGEENHAN_MODEL_MAKESUPERRESOLUTIONIMAGERESULT_H_ #include <string> #include <vector> #include <utility> #include <alibabacloud/core/ServiceResult.h> #include <alibabacloud/imageenhan/ImageenhanExport.h> namespace AlibabaCloud { namespace Imageenhan { namespace Model { class ALIBABACLOUD_IMAGEENHAN_EXPORT MakeSuperResolutionImageResult : public ServiceResult { public: struct Data { std::string url; }; MakeSuperResolutionImageResult(); explicit MakeSuperResolutionImageResult(const std::string &payload); ~MakeSuperResolutionImageResult(); Data getData()const; protected: void parse(const std::string &payload); private: Data data_; }; } } } #endif // !ALIBABACLOUD_IMAGEENHAN_MODEL_MAKESUPERRESOLUTIONIMAGERESULT_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/include/alibabacloud/imageenhan/model/MakeSuperResolutionImageResult.h
C++
apache-2.0
1,515
/* * 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_IMAGEENHAN_MODEL_RECOLORHDIMAGEREQUEST_H_ #define ALIBABACLOUD_IMAGEENHAN_MODEL_RECOLORHDIMAGEREQUEST_H_ #include <string> #include <vector> #include <alibabacloud/core/RpcServiceRequest.h> #include <alibabacloud/imageenhan/ImageenhanExport.h> namespace AlibabaCloud { namespace Imageenhan { namespace Model { class ALIBABACLOUD_IMAGEENHAN_EXPORT RecolorHDImageRequest : public RpcServiceRequest { public: struct ColorTemplate { std::string color; }; public: RecolorHDImageRequest(); ~RecolorHDImageRequest(); std::vector<ColorTemplate> getColorTemplate()const; void setColorTemplate(const std::vector<ColorTemplate>& colorTemplate); std::string getDegree()const; void setDegree(const std::string& degree); std::string getUrl()const; void setUrl(const std::string& url); std::string getMode()const; void setMode(const std::string& mode); bool getAsync()const; void setAsync(bool async); int getColorCount()const; void setColorCount(int colorCount); std::string getRefUrl()const; void setRefUrl(const std::string& refUrl); private: std::vector<ColorTemplate> colorTemplate_; std::string degree_; std::string url_; std::string mode_; bool async_; int colorCount_; std::string refUrl_; }; } } } #endif // !ALIBABACLOUD_IMAGEENHAN_MODEL_RECOLORHDIMAGEREQUEST_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/include/alibabacloud/imageenhan/model/RecolorHDImageRequest.h
C++
apache-2.0
2,083
/* * 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_IMAGEENHAN_MODEL_RECOLORHDIMAGERESULT_H_ #define ALIBABACLOUD_IMAGEENHAN_MODEL_RECOLORHDIMAGERESULT_H_ #include <string> #include <vector> #include <utility> #include <alibabacloud/core/ServiceResult.h> #include <alibabacloud/imageenhan/ImageenhanExport.h> namespace AlibabaCloud { namespace Imageenhan { namespace Model { class ALIBABACLOUD_IMAGEENHAN_EXPORT RecolorHDImageResult : public ServiceResult { public: struct Data { std::vector<std::string> imageList; }; RecolorHDImageResult(); explicit RecolorHDImageResult(const std::string &payload); ~RecolorHDImageResult(); Data getData()const; protected: void parse(const std::string &payload); private: Data data_; }; } } } #endif // !ALIBABACLOUD_IMAGEENHAN_MODEL_RECOLORHDIMAGERESULT_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/include/alibabacloud/imageenhan/model/RecolorHDImageResult.h
C++
apache-2.0
1,464
/* * 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_IMAGEENHAN_MODEL_RECOLORIMAGEREQUEST_H_ #define ALIBABACLOUD_IMAGEENHAN_MODEL_RECOLORIMAGEREQUEST_H_ #include <string> #include <vector> #include <alibabacloud/core/RpcServiceRequest.h> #include <alibabacloud/imageenhan/ImageenhanExport.h> namespace AlibabaCloud { namespace Imageenhan { namespace Model { class ALIBABACLOUD_IMAGEENHAN_EXPORT RecolorImageRequest : public RpcServiceRequest { public: struct ColorTemplate { std::string color; }; public: RecolorImageRequest(); ~RecolorImageRequest(); std::vector<ColorTemplate> getColorTemplate()const; void setColorTemplate(const std::vector<ColorTemplate>& colorTemplate); std::string getUrl()const; void setUrl(const std::string& url); std::string getMode()const; void setMode(const std::string& mode); int getColorCount()const; void setColorCount(int colorCount); std::string getRefUrl()const; void setRefUrl(const std::string& refUrl); private: std::vector<ColorTemplate> colorTemplate_; std::string url_; std::string mode_; int colorCount_; std::string refUrl_; }; } } } #endif // !ALIBABACLOUD_IMAGEENHAN_MODEL_RECOLORIMAGEREQUEST_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/include/alibabacloud/imageenhan/model/RecolorImageRequest.h
C++
apache-2.0
1,885
/* * 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_IMAGEENHAN_MODEL_RECOLORIMAGERESULT_H_ #define ALIBABACLOUD_IMAGEENHAN_MODEL_RECOLORIMAGERESULT_H_ #include <string> #include <vector> #include <utility> #include <alibabacloud/core/ServiceResult.h> #include <alibabacloud/imageenhan/ImageenhanExport.h> namespace AlibabaCloud { namespace Imageenhan { namespace Model { class ALIBABACLOUD_IMAGEENHAN_EXPORT RecolorImageResult : public ServiceResult { public: struct Data { std::vector<std::string> imageList; }; RecolorImageResult(); explicit RecolorImageResult(const std::string &payload); ~RecolorImageResult(); Data getData()const; protected: void parse(const std::string &payload); private: Data data_; }; } } } #endif // !ALIBABACLOUD_IMAGEENHAN_MODEL_RECOLORIMAGERESULT_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/include/alibabacloud/imageenhan/model/RecolorImageResult.h
C++
apache-2.0
1,450
/* * 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_IMAGEENHAN_MODEL_REMOVEIMAGESUBTITLESREQUEST_H_ #define ALIBABACLOUD_IMAGEENHAN_MODEL_REMOVEIMAGESUBTITLESREQUEST_H_ #include <string> #include <vector> #include <alibabacloud/core/RpcServiceRequest.h> #include <alibabacloud/imageenhan/ImageenhanExport.h> namespace AlibabaCloud { namespace Imageenhan { namespace Model { class ALIBABACLOUD_IMAGEENHAN_EXPORT RemoveImageSubtitlesRequest : public RpcServiceRequest { public: RemoveImageSubtitlesRequest(); ~RemoveImageSubtitlesRequest(); float getBH()const; void setBH(float bH); float getBW()const; void setBW(float bW); float getBX()const; void setBX(float bX); std::string getImageURL()const; void setImageURL(const std::string& imageURL); float getBY()const; void setBY(float bY); private: float bH_; float bW_; float bX_; std::string imageURL_; float bY_; }; } } } #endif // !ALIBABACLOUD_IMAGEENHAN_MODEL_REMOVEIMAGESUBTITLESREQUEST_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/include/alibabacloud/imageenhan/model/RemoveImageSubtitlesRequest.h
C++
apache-2.0
1,661
/* * 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_IMAGEENHAN_MODEL_REMOVEIMAGESUBTITLESRESULT_H_ #define ALIBABACLOUD_IMAGEENHAN_MODEL_REMOVEIMAGESUBTITLESRESULT_H_ #include <string> #include <vector> #include <utility> #include <alibabacloud/core/ServiceResult.h> #include <alibabacloud/imageenhan/ImageenhanExport.h> namespace AlibabaCloud { namespace Imageenhan { namespace Model { class ALIBABACLOUD_IMAGEENHAN_EXPORT RemoveImageSubtitlesResult : public ServiceResult { public: struct Data { std::string imageURL; }; RemoveImageSubtitlesResult(); explicit RemoveImageSubtitlesResult(const std::string &payload); ~RemoveImageSubtitlesResult(); Data getData()const; protected: void parse(const std::string &payload); private: Data data_; }; } } } #endif // !ALIBABACLOUD_IMAGEENHAN_MODEL_REMOVEIMAGESUBTITLESRESULT_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/include/alibabacloud/imageenhan/model/RemoveImageSubtitlesResult.h
C++
apache-2.0
1,492
/* * 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_IMAGEENHAN_MODEL_REMOVEIMAGEWATERMARKREQUEST_H_ #define ALIBABACLOUD_IMAGEENHAN_MODEL_REMOVEIMAGEWATERMARKREQUEST_H_ #include <string> #include <vector> #include <alibabacloud/core/RpcServiceRequest.h> #include <alibabacloud/imageenhan/ImageenhanExport.h> namespace AlibabaCloud { namespace Imageenhan { namespace Model { class ALIBABACLOUD_IMAGEENHAN_EXPORT RemoveImageWatermarkRequest : public RpcServiceRequest { public: RemoveImageWatermarkRequest(); ~RemoveImageWatermarkRequest(); std::string getImageURL()const; void setImageURL(const std::string& imageURL); private: std::string imageURL_; }; } } } #endif // !ALIBABACLOUD_IMAGEENHAN_MODEL_REMOVEIMAGEWATERMARKREQUEST_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/include/alibabacloud/imageenhan/model/RemoveImageWatermarkRequest.h
C++
apache-2.0
1,389
/* * 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_IMAGEENHAN_MODEL_REMOVEIMAGEWATERMARKRESULT_H_ #define ALIBABACLOUD_IMAGEENHAN_MODEL_REMOVEIMAGEWATERMARKRESULT_H_ #include <string> #include <vector> #include <utility> #include <alibabacloud/core/ServiceResult.h> #include <alibabacloud/imageenhan/ImageenhanExport.h> namespace AlibabaCloud { namespace Imageenhan { namespace Model { class ALIBABACLOUD_IMAGEENHAN_EXPORT RemoveImageWatermarkResult : public ServiceResult { public: struct Data { std::string imageURL; }; RemoveImageWatermarkResult(); explicit RemoveImageWatermarkResult(const std::string &payload); ~RemoveImageWatermarkResult(); Data getData()const; protected: void parse(const std::string &payload); private: Data data_; }; } } } #endif // !ALIBABACLOUD_IMAGEENHAN_MODEL_REMOVEIMAGEWATERMARKRESULT_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/include/alibabacloud/imageenhan/model/RemoveImageWatermarkResult.h
C++
apache-2.0
1,492
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/ImageenhanClient.h> #include <alibabacloud/core/SimpleCredentialsProvider.h> using namespace AlibabaCloud; using namespace AlibabaCloud::Location; using namespace AlibabaCloud::Imageenhan; using namespace AlibabaCloud::Imageenhan::Model; namespace { const std::string SERVICE_NAME = "imageenhan"; } ImageenhanClient::ImageenhanClient(const Credentials &credentials, const ClientConfiguration &configuration) : RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration) { auto locationClient = std::make_shared<LocationClient>(credentials, configuration); endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "imageenhan"); } ImageenhanClient::ImageenhanClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) { auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration); endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "imageenhan"); } ImageenhanClient::ImageenhanClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration) { auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration); endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "imageenhan"); } ImageenhanClient::~ImageenhanClient() {} ImageenhanClient::AssessCompositionOutcome ImageenhanClient::assessComposition(const AssessCompositionRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return AssessCompositionOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return AssessCompositionOutcome(AssessCompositionResult(outcome.result())); else return AssessCompositionOutcome(outcome.error()); } void ImageenhanClient::assessCompositionAsync(const AssessCompositionRequest& request, const AssessCompositionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, assessComposition(request), context); }; asyncExecute(new Runnable(fn)); } ImageenhanClient::AssessCompositionOutcomeCallable ImageenhanClient::assessCompositionCallable(const AssessCompositionRequest &request) const { auto task = std::make_shared<std::packaged_task<AssessCompositionOutcome()>>( [this, request]() { return this->assessComposition(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImageenhanClient::AssessExposureOutcome ImageenhanClient::assessExposure(const AssessExposureRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return AssessExposureOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return AssessExposureOutcome(AssessExposureResult(outcome.result())); else return AssessExposureOutcome(outcome.error()); } void ImageenhanClient::assessExposureAsync(const AssessExposureRequest& request, const AssessExposureAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, assessExposure(request), context); }; asyncExecute(new Runnable(fn)); } ImageenhanClient::AssessExposureOutcomeCallable ImageenhanClient::assessExposureCallable(const AssessExposureRequest &request) const { auto task = std::make_shared<std::packaged_task<AssessExposureOutcome()>>( [this, request]() { return this->assessExposure(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImageenhanClient::AssessSharpnessOutcome ImageenhanClient::assessSharpness(const AssessSharpnessRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return AssessSharpnessOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return AssessSharpnessOutcome(AssessSharpnessResult(outcome.result())); else return AssessSharpnessOutcome(outcome.error()); } void ImageenhanClient::assessSharpnessAsync(const AssessSharpnessRequest& request, const AssessSharpnessAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, assessSharpness(request), context); }; asyncExecute(new Runnable(fn)); } ImageenhanClient::AssessSharpnessOutcomeCallable ImageenhanClient::assessSharpnessCallable(const AssessSharpnessRequest &request) const { auto task = std::make_shared<std::packaged_task<AssessSharpnessOutcome()>>( [this, request]() { return this->assessSharpness(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImageenhanClient::ChangeImageSizeOutcome ImageenhanClient::changeImageSize(const ChangeImageSizeRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return ChangeImageSizeOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return ChangeImageSizeOutcome(ChangeImageSizeResult(outcome.result())); else return ChangeImageSizeOutcome(outcome.error()); } void ImageenhanClient::changeImageSizeAsync(const ChangeImageSizeRequest& request, const ChangeImageSizeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, changeImageSize(request), context); }; asyncExecute(new Runnable(fn)); } ImageenhanClient::ChangeImageSizeOutcomeCallable ImageenhanClient::changeImageSizeCallable(const ChangeImageSizeRequest &request) const { auto task = std::make_shared<std::packaged_task<ChangeImageSizeOutcome()>>( [this, request]() { return this->changeImageSize(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImageenhanClient::ColorizeImageOutcome ImageenhanClient::colorizeImage(const ColorizeImageRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return ColorizeImageOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return ColorizeImageOutcome(ColorizeImageResult(outcome.result())); else return ColorizeImageOutcome(outcome.error()); } void ImageenhanClient::colorizeImageAsync(const ColorizeImageRequest& request, const ColorizeImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, colorizeImage(request), context); }; asyncExecute(new Runnable(fn)); } ImageenhanClient::ColorizeImageOutcomeCallable ImageenhanClient::colorizeImageCallable(const ColorizeImageRequest &request) const { auto task = std::make_shared<std::packaged_task<ColorizeImageOutcome()>>( [this, request]() { return this->colorizeImage(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImageenhanClient::EnhanceImageColorOutcome ImageenhanClient::enhanceImageColor(const EnhanceImageColorRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return EnhanceImageColorOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return EnhanceImageColorOutcome(EnhanceImageColorResult(outcome.result())); else return EnhanceImageColorOutcome(outcome.error()); } void ImageenhanClient::enhanceImageColorAsync(const EnhanceImageColorRequest& request, const EnhanceImageColorAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, enhanceImageColor(request), context); }; asyncExecute(new Runnable(fn)); } ImageenhanClient::EnhanceImageColorOutcomeCallable ImageenhanClient::enhanceImageColorCallable(const EnhanceImageColorRequest &request) const { auto task = std::make_shared<std::packaged_task<EnhanceImageColorOutcome()>>( [this, request]() { return this->enhanceImageColor(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImageenhanClient::ErasePersonOutcome ImageenhanClient::erasePerson(const ErasePersonRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return ErasePersonOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return ErasePersonOutcome(ErasePersonResult(outcome.result())); else return ErasePersonOutcome(outcome.error()); } void ImageenhanClient::erasePersonAsync(const ErasePersonRequest& request, const ErasePersonAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, erasePerson(request), context); }; asyncExecute(new Runnable(fn)); } ImageenhanClient::ErasePersonOutcomeCallable ImageenhanClient::erasePersonCallable(const ErasePersonRequest &request) const { auto task = std::make_shared<std::packaged_task<ErasePersonOutcome()>>( [this, request]() { return this->erasePerson(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImageenhanClient::ExtendImageStyleOutcome ImageenhanClient::extendImageStyle(const ExtendImageStyleRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return ExtendImageStyleOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return ExtendImageStyleOutcome(ExtendImageStyleResult(outcome.result())); else return ExtendImageStyleOutcome(outcome.error()); } void ImageenhanClient::extendImageStyleAsync(const ExtendImageStyleRequest& request, const ExtendImageStyleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, extendImageStyle(request), context); }; asyncExecute(new Runnable(fn)); } ImageenhanClient::ExtendImageStyleOutcomeCallable ImageenhanClient::extendImageStyleCallable(const ExtendImageStyleRequest &request) const { auto task = std::make_shared<std::packaged_task<ExtendImageStyleOutcome()>>( [this, request]() { return this->extendImageStyle(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImageenhanClient::GenerateDynamicImageOutcome ImageenhanClient::generateDynamicImage(const GenerateDynamicImageRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return GenerateDynamicImageOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return GenerateDynamicImageOutcome(GenerateDynamicImageResult(outcome.result())); else return GenerateDynamicImageOutcome(outcome.error()); } void ImageenhanClient::generateDynamicImageAsync(const GenerateDynamicImageRequest& request, const GenerateDynamicImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, generateDynamicImage(request), context); }; asyncExecute(new Runnable(fn)); } ImageenhanClient::GenerateDynamicImageOutcomeCallable ImageenhanClient::generateDynamicImageCallable(const GenerateDynamicImageRequest &request) const { auto task = std::make_shared<std::packaged_task<GenerateDynamicImageOutcome()>>( [this, request]() { return this->generateDynamicImage(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImageenhanClient::GetAsyncJobResultOutcome ImageenhanClient::getAsyncJobResult(const GetAsyncJobResultRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return GetAsyncJobResultOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return GetAsyncJobResultOutcome(GetAsyncJobResultResult(outcome.result())); else return GetAsyncJobResultOutcome(outcome.error()); } void ImageenhanClient::getAsyncJobResultAsync(const GetAsyncJobResultRequest& request, const GetAsyncJobResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, getAsyncJobResult(request), context); }; asyncExecute(new Runnable(fn)); } ImageenhanClient::GetAsyncJobResultOutcomeCallable ImageenhanClient::getAsyncJobResultCallable(const GetAsyncJobResultRequest &request) const { auto task = std::make_shared<std::packaged_task<GetAsyncJobResultOutcome()>>( [this, request]() { return this->getAsyncJobResult(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImageenhanClient::ImageBlindCharacterWatermarkOutcome ImageenhanClient::imageBlindCharacterWatermark(const ImageBlindCharacterWatermarkRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return ImageBlindCharacterWatermarkOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return ImageBlindCharacterWatermarkOutcome(ImageBlindCharacterWatermarkResult(outcome.result())); else return ImageBlindCharacterWatermarkOutcome(outcome.error()); } void ImageenhanClient::imageBlindCharacterWatermarkAsync(const ImageBlindCharacterWatermarkRequest& request, const ImageBlindCharacterWatermarkAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, imageBlindCharacterWatermark(request), context); }; asyncExecute(new Runnable(fn)); } ImageenhanClient::ImageBlindCharacterWatermarkOutcomeCallable ImageenhanClient::imageBlindCharacterWatermarkCallable(const ImageBlindCharacterWatermarkRequest &request) const { auto task = std::make_shared<std::packaged_task<ImageBlindCharacterWatermarkOutcome()>>( [this, request]() { return this->imageBlindCharacterWatermark(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImageenhanClient::ImageBlindPicWatermarkOutcome ImageenhanClient::imageBlindPicWatermark(const ImageBlindPicWatermarkRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return ImageBlindPicWatermarkOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return ImageBlindPicWatermarkOutcome(ImageBlindPicWatermarkResult(outcome.result())); else return ImageBlindPicWatermarkOutcome(outcome.error()); } void ImageenhanClient::imageBlindPicWatermarkAsync(const ImageBlindPicWatermarkRequest& request, const ImageBlindPicWatermarkAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, imageBlindPicWatermark(request), context); }; asyncExecute(new Runnable(fn)); } ImageenhanClient::ImageBlindPicWatermarkOutcomeCallable ImageenhanClient::imageBlindPicWatermarkCallable(const ImageBlindPicWatermarkRequest &request) const { auto task = std::make_shared<std::packaged_task<ImageBlindPicWatermarkOutcome()>>( [this, request]() { return this->imageBlindPicWatermark(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImageenhanClient::ImitatePhotoStyleOutcome ImageenhanClient::imitatePhotoStyle(const ImitatePhotoStyleRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return ImitatePhotoStyleOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return ImitatePhotoStyleOutcome(ImitatePhotoStyleResult(outcome.result())); else return ImitatePhotoStyleOutcome(outcome.error()); } void ImageenhanClient::imitatePhotoStyleAsync(const ImitatePhotoStyleRequest& request, const ImitatePhotoStyleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, imitatePhotoStyle(request), context); }; asyncExecute(new Runnable(fn)); } ImageenhanClient::ImitatePhotoStyleOutcomeCallable ImageenhanClient::imitatePhotoStyleCallable(const ImitatePhotoStyleRequest &request) const { auto task = std::make_shared<std::packaged_task<ImitatePhotoStyleOutcome()>>( [this, request]() { return this->imitatePhotoStyle(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImageenhanClient::IntelligentCompositionOutcome ImageenhanClient::intelligentComposition(const IntelligentCompositionRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return IntelligentCompositionOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return IntelligentCompositionOutcome(IntelligentCompositionResult(outcome.result())); else return IntelligentCompositionOutcome(outcome.error()); } void ImageenhanClient::intelligentCompositionAsync(const IntelligentCompositionRequest& request, const IntelligentCompositionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, intelligentComposition(request), context); }; asyncExecute(new Runnable(fn)); } ImageenhanClient::IntelligentCompositionOutcomeCallable ImageenhanClient::intelligentCompositionCallable(const IntelligentCompositionRequest &request) const { auto task = std::make_shared<std::packaged_task<IntelligentCompositionOutcome()>>( [this, request]() { return this->intelligentComposition(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImageenhanClient::MakeSuperResolutionImageOutcome ImageenhanClient::makeSuperResolutionImage(const MakeSuperResolutionImageRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return MakeSuperResolutionImageOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return MakeSuperResolutionImageOutcome(MakeSuperResolutionImageResult(outcome.result())); else return MakeSuperResolutionImageOutcome(outcome.error()); } void ImageenhanClient::makeSuperResolutionImageAsync(const MakeSuperResolutionImageRequest& request, const MakeSuperResolutionImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, makeSuperResolutionImage(request), context); }; asyncExecute(new Runnable(fn)); } ImageenhanClient::MakeSuperResolutionImageOutcomeCallable ImageenhanClient::makeSuperResolutionImageCallable(const MakeSuperResolutionImageRequest &request) const { auto task = std::make_shared<std::packaged_task<MakeSuperResolutionImageOutcome()>>( [this, request]() { return this->makeSuperResolutionImage(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImageenhanClient::RecolorHDImageOutcome ImageenhanClient::recolorHDImage(const RecolorHDImageRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return RecolorHDImageOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return RecolorHDImageOutcome(RecolorHDImageResult(outcome.result())); else return RecolorHDImageOutcome(outcome.error()); } void ImageenhanClient::recolorHDImageAsync(const RecolorHDImageRequest& request, const RecolorHDImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, recolorHDImage(request), context); }; asyncExecute(new Runnable(fn)); } ImageenhanClient::RecolorHDImageOutcomeCallable ImageenhanClient::recolorHDImageCallable(const RecolorHDImageRequest &request) const { auto task = std::make_shared<std::packaged_task<RecolorHDImageOutcome()>>( [this, request]() { return this->recolorHDImage(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImageenhanClient::RecolorImageOutcome ImageenhanClient::recolorImage(const RecolorImageRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return RecolorImageOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return RecolorImageOutcome(RecolorImageResult(outcome.result())); else return RecolorImageOutcome(outcome.error()); } void ImageenhanClient::recolorImageAsync(const RecolorImageRequest& request, const RecolorImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, recolorImage(request), context); }; asyncExecute(new Runnable(fn)); } ImageenhanClient::RecolorImageOutcomeCallable ImageenhanClient::recolorImageCallable(const RecolorImageRequest &request) const { auto task = std::make_shared<std::packaged_task<RecolorImageOutcome()>>( [this, request]() { return this->recolorImage(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImageenhanClient::RemoveImageSubtitlesOutcome ImageenhanClient::removeImageSubtitles(const RemoveImageSubtitlesRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return RemoveImageSubtitlesOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return RemoveImageSubtitlesOutcome(RemoveImageSubtitlesResult(outcome.result())); else return RemoveImageSubtitlesOutcome(outcome.error()); } void ImageenhanClient::removeImageSubtitlesAsync(const RemoveImageSubtitlesRequest& request, const RemoveImageSubtitlesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, removeImageSubtitles(request), context); }; asyncExecute(new Runnable(fn)); } ImageenhanClient::RemoveImageSubtitlesOutcomeCallable ImageenhanClient::removeImageSubtitlesCallable(const RemoveImageSubtitlesRequest &request) const { auto task = std::make_shared<std::packaged_task<RemoveImageSubtitlesOutcome()>>( [this, request]() { return this->removeImageSubtitles(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImageenhanClient::RemoveImageWatermarkOutcome ImageenhanClient::removeImageWatermark(const RemoveImageWatermarkRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return RemoveImageWatermarkOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return RemoveImageWatermarkOutcome(RemoveImageWatermarkResult(outcome.result())); else return RemoveImageWatermarkOutcome(outcome.error()); } void ImageenhanClient::removeImageWatermarkAsync(const RemoveImageWatermarkRequest& request, const RemoveImageWatermarkAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, removeImageWatermark(request), context); }; asyncExecute(new Runnable(fn)); } ImageenhanClient::RemoveImageWatermarkOutcomeCallable ImageenhanClient::removeImageWatermarkCallable(const RemoveImageWatermarkRequest &request) const { auto task = std::make_shared<std::packaged_task<RemoveImageWatermarkOutcome()>>( [this, request]() { return this->removeImageWatermark(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/ImageenhanClient.cc
C++
apache-2.0
26,348
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/AssessCompositionRequest.h> using AlibabaCloud::Imageenhan::Model::AssessCompositionRequest; AssessCompositionRequest::AssessCompositionRequest() : RpcServiceRequest("imageenhan", "2019-09-30", "AssessComposition") { setMethod(HttpRequest::Method::Post); } AssessCompositionRequest::~AssessCompositionRequest() {} std::string AssessCompositionRequest::getImageURL()const { return imageURL_; } void AssessCompositionRequest::setImageURL(const std::string& imageURL) { imageURL_ = imageURL; setBodyParameter("ImageURL", imageURL); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/AssessCompositionRequest.cc
C++
apache-2.0
1,223
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/AssessCompositionResult.h> #include <json/json.h> using namespace AlibabaCloud::Imageenhan; using namespace AlibabaCloud::Imageenhan::Model; AssessCompositionResult::AssessCompositionResult() : ServiceResult() {} AssessCompositionResult::AssessCompositionResult(const std::string &payload) : ServiceResult() { parse(payload); } AssessCompositionResult::~AssessCompositionResult() {} void AssessCompositionResult::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["Score"].isNull()) data_.score = std::stof(dataNode["Score"].asString()); } AssessCompositionResult::Data AssessCompositionResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/AssessCompositionResult.cc
C++
apache-2.0
1,460
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/AssessExposureRequest.h> using AlibabaCloud::Imageenhan::Model::AssessExposureRequest; AssessExposureRequest::AssessExposureRequest() : RpcServiceRequest("imageenhan", "2019-09-30", "AssessExposure") { setMethod(HttpRequest::Method::Post); } AssessExposureRequest::~AssessExposureRequest() {} std::string AssessExposureRequest::getImageURL()const { return imageURL_; } void AssessExposureRequest::setImageURL(const std::string& imageURL) { imageURL_ = imageURL; setBodyParameter("ImageURL", imageURL); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/AssessExposureRequest.cc
C++
apache-2.0
1,196
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/AssessExposureResult.h> #include <json/json.h> using namespace AlibabaCloud::Imageenhan; using namespace AlibabaCloud::Imageenhan::Model; AssessExposureResult::AssessExposureResult() : ServiceResult() {} AssessExposureResult::AssessExposureResult(const std::string &payload) : ServiceResult() { parse(payload); } AssessExposureResult::~AssessExposureResult() {} void AssessExposureResult::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["Exposure"].isNull()) data_.exposure = std::stof(dataNode["Exposure"].asString()); } AssessExposureResult::Data AssessExposureResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/AssessExposureResult.cc
C++
apache-2.0
1,439
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/AssessSharpnessRequest.h> using AlibabaCloud::Imageenhan::Model::AssessSharpnessRequest; AssessSharpnessRequest::AssessSharpnessRequest() : RpcServiceRequest("imageenhan", "2019-09-30", "AssessSharpness") { setMethod(HttpRequest::Method::Post); } AssessSharpnessRequest::~AssessSharpnessRequest() {} std::string AssessSharpnessRequest::getImageURL()const { return imageURL_; } void AssessSharpnessRequest::setImageURL(const std::string& imageURL) { imageURL_ = imageURL; setBodyParameter("ImageURL", imageURL); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/AssessSharpnessRequest.cc
C++
apache-2.0
1,205
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/AssessSharpnessResult.h> #include <json/json.h> using namespace AlibabaCloud::Imageenhan; using namespace AlibabaCloud::Imageenhan::Model; AssessSharpnessResult::AssessSharpnessResult() : ServiceResult() {} AssessSharpnessResult::AssessSharpnessResult(const std::string &payload) : ServiceResult() { parse(payload); } AssessSharpnessResult::~AssessSharpnessResult() {} void AssessSharpnessResult::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["Sharpness"].isNull()) data_.sharpness = std::stof(dataNode["Sharpness"].asString()); } AssessSharpnessResult::Data AssessSharpnessResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/AssessSharpnessResult.cc
C++
apache-2.0
1,452
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/ChangeImageSizeRequest.h> using AlibabaCloud::Imageenhan::Model::ChangeImageSizeRequest; ChangeImageSizeRequest::ChangeImageSizeRequest() : RpcServiceRequest("imageenhan", "2019-09-30", "ChangeImageSize") { setMethod(HttpRequest::Method::Post); } ChangeImageSizeRequest::~ChangeImageSizeRequest() {} std::string ChangeImageSizeRequest::getUrl()const { return url_; } void ChangeImageSizeRequest::setUrl(const std::string& url) { url_ = url; setBodyParameter("Url", url); } int ChangeImageSizeRequest::getWidth()const { return width_; } void ChangeImageSizeRequest::setWidth(int width) { width_ = width; setBodyParameter("Width", std::to_string(width)); } int ChangeImageSizeRequest::getHeight()const { return height_; } void ChangeImageSizeRequest::setHeight(int height) { height_ = height; setBodyParameter("Height", std::to_string(height)); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/ChangeImageSizeRequest.cc
C++
apache-2.0
1,569
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/ChangeImageSizeResult.h> #include <json/json.h> using namespace AlibabaCloud::Imageenhan; using namespace AlibabaCloud::Imageenhan::Model; ChangeImageSizeResult::ChangeImageSizeResult() : ServiceResult() {} ChangeImageSizeResult::ChangeImageSizeResult(const std::string &payload) : ServiceResult() { parse(payload); } ChangeImageSizeResult::~ChangeImageSizeResult() {} void ChangeImageSizeResult::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["Url"].isNull()) data_.url = dataNode["Url"].asString(); auto retainLocationNode = dataNode["RetainLocation"]; if(!retainLocationNode["X"].isNull()) data_.retainLocation.x = std::stoi(retainLocationNode["X"].asString()); if(!retainLocationNode["Y"].isNull()) data_.retainLocation.y = std::stoi(retainLocationNode["Y"].asString()); if(!retainLocationNode["Width"].isNull()) data_.retainLocation.width = std::stoi(retainLocationNode["Width"].asString()); if(!retainLocationNode["Height"].isNull()) data_.retainLocation.height = std::stoi(retainLocationNode["Height"].asString()); } ChangeImageSizeResult::Data ChangeImageSizeResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/ChangeImageSizeResult.cc
C++
apache-2.0
1,957
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/ColorizeImageRequest.h> using AlibabaCloud::Imageenhan::Model::ColorizeImageRequest; ColorizeImageRequest::ColorizeImageRequest() : RpcServiceRequest("imageenhan", "2019-09-30", "ColorizeImage") { setMethod(HttpRequest::Method::Post); } ColorizeImageRequest::~ColorizeImageRequest() {} std::string ColorizeImageRequest::getImageURL()const { return imageURL_; } void ColorizeImageRequest::setImageURL(const std::string& imageURL) { imageURL_ = imageURL; setBodyParameter("ImageURL", imageURL); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/ColorizeImageRequest.cc
C++
apache-2.0
1,187
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/ColorizeImageResult.h> #include <json/json.h> using namespace AlibabaCloud::Imageenhan; using namespace AlibabaCloud::Imageenhan::Model; ColorizeImageResult::ColorizeImageResult() : ServiceResult() {} ColorizeImageResult::ColorizeImageResult(const std::string &payload) : ServiceResult() { parse(payload); } ColorizeImageResult::~ColorizeImageResult() {} void ColorizeImageResult::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(); } ColorizeImageResult::Data ColorizeImageResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/ColorizeImageResult.cc
C++
apache-2.0
1,418
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/EnhanceImageColorRequest.h> using AlibabaCloud::Imageenhan::Model::EnhanceImageColorRequest; EnhanceImageColorRequest::EnhanceImageColorRequest() : RpcServiceRequest("imageenhan", "2019-09-30", "EnhanceImageColor") { setMethod(HttpRequest::Method::Post); } EnhanceImageColorRequest::~EnhanceImageColorRequest() {} std::string EnhanceImageColorRequest::getMode()const { return mode_; } void EnhanceImageColorRequest::setMode(const std::string& mode) { mode_ = mode; setBodyParameter("Mode", mode); } std::string EnhanceImageColorRequest::getImageURL()const { return imageURL_; } void EnhanceImageColorRequest::setImageURL(const std::string& imageURL) { imageURL_ = imageURL; setBodyParameter("ImageURL", imageURL); } std::string EnhanceImageColorRequest::getOutputFormat()const { return outputFormat_; } void EnhanceImageColorRequest::setOutputFormat(const std::string& outputFormat) { outputFormat_ = outputFormat; setBodyParameter("OutputFormat", outputFormat); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/EnhanceImageColorRequest.cc
C++
apache-2.0
1,689
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/EnhanceImageColorResult.h> #include <json/json.h> using namespace AlibabaCloud::Imageenhan; using namespace AlibabaCloud::Imageenhan::Model; EnhanceImageColorResult::EnhanceImageColorResult() : ServiceResult() {} EnhanceImageColorResult::EnhanceImageColorResult(const std::string &payload) : ServiceResult() { parse(payload); } EnhanceImageColorResult::~EnhanceImageColorResult() {} void EnhanceImageColorResult::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(); } EnhanceImageColorResult::Data EnhanceImageColorResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/EnhanceImageColorResult.cc
C++
apache-2.0
1,458
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/ErasePersonRequest.h> using AlibabaCloud::Imageenhan::Model::ErasePersonRequest; ErasePersonRequest::ErasePersonRequest() : RpcServiceRequest("imageenhan", "2019-09-30", "ErasePerson") { setMethod(HttpRequest::Method::Post); } ErasePersonRequest::~ErasePersonRequest() {} std::string ErasePersonRequest::getImageURL()const { return imageURL_; } void ErasePersonRequest::setImageURL(const std::string& imageURL) { imageURL_ = imageURL; setBodyParameter("ImageURL", imageURL); } std::string ErasePersonRequest::getUserMask()const { return userMask_; } void ErasePersonRequest::setUserMask(const std::string& userMask) { userMask_ = userMask; setBodyParameter("UserMask", userMask); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/ErasePersonRequest.cc
C++
apache-2.0
1,390
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/ErasePersonResult.h> #include <json/json.h> using namespace AlibabaCloud::Imageenhan; using namespace AlibabaCloud::Imageenhan::Model; ErasePersonResult::ErasePersonResult() : ServiceResult() {} ErasePersonResult::ErasePersonResult(const std::string &payload) : ServiceResult() { parse(payload); } ErasePersonResult::~ErasePersonResult() {} void ErasePersonResult::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(); } ErasePersonResult::Data ErasePersonResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/ErasePersonResult.cc
C++
apache-2.0
1,398
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/ExtendImageStyleRequest.h> using AlibabaCloud::Imageenhan::Model::ExtendImageStyleRequest; ExtendImageStyleRequest::ExtendImageStyleRequest() : RpcServiceRequest("imageenhan", "2019-09-30", "ExtendImageStyle") { setMethod(HttpRequest::Method::Post); } ExtendImageStyleRequest::~ExtendImageStyleRequest() {} std::string ExtendImageStyleRequest::getMajorUrl()const { return majorUrl_; } void ExtendImageStyleRequest::setMajorUrl(const std::string& majorUrl) { majorUrl_ = majorUrl; setBodyParameter("MajorUrl", majorUrl); } std::string ExtendImageStyleRequest::getStyleUrl()const { return styleUrl_; } void ExtendImageStyleRequest::setStyleUrl(const std::string& styleUrl) { styleUrl_ = styleUrl; setBodyParameter("StyleUrl", styleUrl); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/ExtendImageStyleRequest.cc
C++
apache-2.0
1,445
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/ExtendImageStyleResult.h> #include <json/json.h> using namespace AlibabaCloud::Imageenhan; using namespace AlibabaCloud::Imageenhan::Model; ExtendImageStyleResult::ExtendImageStyleResult() : ServiceResult() {} ExtendImageStyleResult::ExtendImageStyleResult(const std::string &payload) : ServiceResult() { parse(payload); } ExtendImageStyleResult::~ExtendImageStyleResult() {} void ExtendImageStyleResult::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["Url"].isNull()) data_.url = dataNode["Url"].asString(); if(!dataNode["MajorUrl"].isNull()) data_.majorUrl = dataNode["MajorUrl"].asString(); } ExtendImageStyleResult::Data ExtendImageStyleResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/ExtendImageStyleResult.cc
C++
apache-2.0
1,521
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/GenerateDynamicImageRequest.h> using AlibabaCloud::Imageenhan::Model::GenerateDynamicImageRequest; GenerateDynamicImageRequest::GenerateDynamicImageRequest() : RpcServiceRequest("imageenhan", "2019-09-30", "GenerateDynamicImage") { setMethod(HttpRequest::Method::Post); } GenerateDynamicImageRequest::~GenerateDynamicImageRequest() {} std::string GenerateDynamicImageRequest::getUrl()const { return url_; } void GenerateDynamicImageRequest::setUrl(const std::string& url) { url_ = url; setBodyParameter("Url", url); } std::string GenerateDynamicImageRequest::getOperation()const { return operation_; } void GenerateDynamicImageRequest::setOperation(const std::string& operation) { operation_ = operation; setBodyParameter("Operation", operation); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/GenerateDynamicImageRequest.cc
C++
apache-2.0
1,457
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/GenerateDynamicImageResult.h> #include <json/json.h> using namespace AlibabaCloud::Imageenhan; using namespace AlibabaCloud::Imageenhan::Model; GenerateDynamicImageResult::GenerateDynamicImageResult() : ServiceResult() {} GenerateDynamicImageResult::GenerateDynamicImageResult(const std::string &payload) : ServiceResult() { parse(payload); } GenerateDynamicImageResult::~GenerateDynamicImageResult() {} void GenerateDynamicImageResult::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["Url"].isNull()) data_.url = dataNode["Url"].asString(); } GenerateDynamicImageResult::Data GenerateDynamicImageResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/GenerateDynamicImageResult.cc
C++
apache-2.0
1,473
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/GetAsyncJobResultRequest.h> using AlibabaCloud::Imageenhan::Model::GetAsyncJobResultRequest; GetAsyncJobResultRequest::GetAsyncJobResultRequest() : RpcServiceRequest("imageenhan", "2019-09-30", "GetAsyncJobResult") { setMethod(HttpRequest::Method::Post); } GetAsyncJobResultRequest::~GetAsyncJobResultRequest() {} bool GetAsyncJobResultRequest::getAsync()const { return async_; } void GetAsyncJobResultRequest::setAsync(bool async) { async_ = async; setBodyParameter("Async", async ? "true" : "false"); } std::string GetAsyncJobResultRequest::getJobId()const { return jobId_; } void GetAsyncJobResultRequest::setJobId(const std::string& jobId) { jobId_ = jobId; setBodyParameter("JobId", jobId); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/GetAsyncJobResultRequest.cc
C++
apache-2.0
1,406
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/GetAsyncJobResultResult.h> #include <json/json.h> using namespace AlibabaCloud::Imageenhan; using namespace AlibabaCloud::Imageenhan::Model; GetAsyncJobResultResult::GetAsyncJobResultResult() : ServiceResult() {} GetAsyncJobResultResult::GetAsyncJobResultResult(const std::string &payload) : ServiceResult() { parse(payload); } GetAsyncJobResultResult::~GetAsyncJobResultResult() {} void GetAsyncJobResultResult::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["JobId"].isNull()) data_.jobId = dataNode["JobId"].asString(); if(!dataNode["Status"].isNull()) data_.status = dataNode["Status"].asString(); if(!dataNode["Result"].isNull()) data_.result = dataNode["Result"].asString(); if(!dataNode["ErrorCode"].isNull()) data_.errorCode = dataNode["ErrorCode"].asString(); if(!dataNode["ErrorMessage"].isNull()) data_.errorMessage = dataNode["ErrorMessage"].asString(); } GetAsyncJobResultResult::Data GetAsyncJobResultResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/GetAsyncJobResultResult.cc
C++
apache-2.0
1,804
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/ImageBlindCharacterWatermarkRequest.h> using AlibabaCloud::Imageenhan::Model::ImageBlindCharacterWatermarkRequest; ImageBlindCharacterWatermarkRequest::ImageBlindCharacterWatermarkRequest() : RpcServiceRequest("imageenhan", "2019-09-30", "ImageBlindCharacterWatermark") { setMethod(HttpRequest::Method::Post); } ImageBlindCharacterWatermarkRequest::~ImageBlindCharacterWatermarkRequest() {} std::string ImageBlindCharacterWatermarkRequest::getWatermarkImageURL()const { return watermarkImageURL_; } void ImageBlindCharacterWatermarkRequest::setWatermarkImageURL(const std::string& watermarkImageURL) { watermarkImageURL_ = watermarkImageURL; setBodyParameter("WatermarkImageURL", watermarkImageURL); } int ImageBlindCharacterWatermarkRequest::getQualityFactor()const { return qualityFactor_; } void ImageBlindCharacterWatermarkRequest::setQualityFactor(int qualityFactor) { qualityFactor_ = qualityFactor; setBodyParameter("QualityFactor", std::to_string(qualityFactor)); } std::string ImageBlindCharacterWatermarkRequest::getFunctionType()const { return functionType_; } void ImageBlindCharacterWatermarkRequest::setFunctionType(const std::string& functionType) { functionType_ = functionType; setBodyParameter("FunctionType", functionType); } std::string ImageBlindCharacterWatermarkRequest::getOutputFileType()const { return outputFileType_; } void ImageBlindCharacterWatermarkRequest::setOutputFileType(const std::string& outputFileType) { outputFileType_ = outputFileType; setBodyParameter("OutputFileType", outputFileType); } std::string ImageBlindCharacterWatermarkRequest::getOriginImageURL()const { return originImageURL_; } void ImageBlindCharacterWatermarkRequest::setOriginImageURL(const std::string& originImageURL) { originImageURL_ = originImageURL; setBodyParameter("OriginImageURL", originImageURL); } std::string ImageBlindCharacterWatermarkRequest::getText()const { return text_; } void ImageBlindCharacterWatermarkRequest::setText(const std::string& text) { text_ = text; setBodyParameter("Text", text); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/ImageBlindCharacterWatermarkRequest.cc
C++
apache-2.0
2,798
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/ImageBlindCharacterWatermarkResult.h> #include <json/json.h> using namespace AlibabaCloud::Imageenhan; using namespace AlibabaCloud::Imageenhan::Model; ImageBlindCharacterWatermarkResult::ImageBlindCharacterWatermarkResult() : ServiceResult() {} ImageBlindCharacterWatermarkResult::ImageBlindCharacterWatermarkResult(const std::string &payload) : ServiceResult() { parse(payload); } ImageBlindCharacterWatermarkResult::~ImageBlindCharacterWatermarkResult() {} void ImageBlindCharacterWatermarkResult::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["WatermarkImageURL"].isNull()) data_.watermarkImageURL = dataNode["WatermarkImageURL"].asString(); if(!dataNode["TextImageURL"].isNull()) data_.textImageURL = dataNode["TextImageURL"].asString(); } ImageBlindCharacterWatermarkResult::Data ImageBlindCharacterWatermarkResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/ImageBlindCharacterWatermarkResult.cc
C++
apache-2.0
1,695
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/ImageBlindPicWatermarkRequest.h> using AlibabaCloud::Imageenhan::Model::ImageBlindPicWatermarkRequest; ImageBlindPicWatermarkRequest::ImageBlindPicWatermarkRequest() : RpcServiceRequest("imageenhan", "2019-09-30", "ImageBlindPicWatermark") { setMethod(HttpRequest::Method::Post); } ImageBlindPicWatermarkRequest::~ImageBlindPicWatermarkRequest() {} std::string ImageBlindPicWatermarkRequest::getWatermarkImageURL()const { return watermarkImageURL_; } void ImageBlindPicWatermarkRequest::setWatermarkImageURL(const std::string& watermarkImageURL) { watermarkImageURL_ = watermarkImageURL; setBodyParameter("WatermarkImageURL", watermarkImageURL); } int ImageBlindPicWatermarkRequest::getQualityFactor()const { return qualityFactor_; } void ImageBlindPicWatermarkRequest::setQualityFactor(int qualityFactor) { qualityFactor_ = qualityFactor; setBodyParameter("QualityFactor", std::to_string(qualityFactor)); } std::string ImageBlindPicWatermarkRequest::getFunctionType()const { return functionType_; } void ImageBlindPicWatermarkRequest::setFunctionType(const std::string& functionType) { functionType_ = functionType; setBodyParameter("FunctionType", functionType); } std::string ImageBlindPicWatermarkRequest::getLogoURL()const { return logoURL_; } void ImageBlindPicWatermarkRequest::setLogoURL(const std::string& logoURL) { logoURL_ = logoURL; setBodyParameter("LogoURL", logoURL); } std::string ImageBlindPicWatermarkRequest::getOutputFileType()const { return outputFileType_; } void ImageBlindPicWatermarkRequest::setOutputFileType(const std::string& outputFileType) { outputFileType_ = outputFileType; setBodyParameter("OutputFileType", outputFileType); } std::string ImageBlindPicWatermarkRequest::getOriginImageURL()const { return originImageURL_; } void ImageBlindPicWatermarkRequest::setOriginImageURL(const std::string& originImageURL) { originImageURL_ = originImageURL; setBodyParameter("OriginImageURL", originImageURL); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/ImageBlindPicWatermarkRequest.cc
C++
apache-2.0
2,708
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/ImageBlindPicWatermarkResult.h> #include <json/json.h> using namespace AlibabaCloud::Imageenhan; using namespace AlibabaCloud::Imageenhan::Model; ImageBlindPicWatermarkResult::ImageBlindPicWatermarkResult() : ServiceResult() {} ImageBlindPicWatermarkResult::ImageBlindPicWatermarkResult(const std::string &payload) : ServiceResult() { parse(payload); } ImageBlindPicWatermarkResult::~ImageBlindPicWatermarkResult() {} void ImageBlindPicWatermarkResult::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["WatermarkImageURL"].isNull()) data_.watermarkImageURL = dataNode["WatermarkImageURL"].asString(); if(!dataNode["LogoURL"].isNull()) data_.logoURL = dataNode["LogoURL"].asString(); } ImageBlindPicWatermarkResult::Data ImageBlindPicWatermarkResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/ImageBlindPicWatermarkResult.cc
C++
apache-2.0
1,620
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/ImitatePhotoStyleRequest.h> using AlibabaCloud::Imageenhan::Model::ImitatePhotoStyleRequest; ImitatePhotoStyleRequest::ImitatePhotoStyleRequest() : RpcServiceRequest("imageenhan", "2019-09-30", "ImitatePhotoStyle") { setMethod(HttpRequest::Method::Post); } ImitatePhotoStyleRequest::~ImitatePhotoStyleRequest() {} std::string ImitatePhotoStyleRequest::getStyleUrl()const { return styleUrl_; } void ImitatePhotoStyleRequest::setStyleUrl(const std::string& styleUrl) { styleUrl_ = styleUrl; setBodyParameter("StyleUrl", styleUrl); } std::string ImitatePhotoStyleRequest::getImageURL()const { return imageURL_; } void ImitatePhotoStyleRequest::setImageURL(const std::string& imageURL) { imageURL_ = imageURL; setBodyParameter("ImageURL", imageURL); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/ImitatePhotoStyleRequest.cc
C++
apache-2.0
1,456
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/ImitatePhotoStyleResult.h> #include <json/json.h> using namespace AlibabaCloud::Imageenhan; using namespace AlibabaCloud::Imageenhan::Model; ImitatePhotoStyleResult::ImitatePhotoStyleResult() : ServiceResult() {} ImitatePhotoStyleResult::ImitatePhotoStyleResult(const std::string &payload) : ServiceResult() { parse(payload); } ImitatePhotoStyleResult::~ImitatePhotoStyleResult() {} void ImitatePhotoStyleResult::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(); } ImitatePhotoStyleResult::Data ImitatePhotoStyleResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/ImitatePhotoStyleResult.cc
C++
apache-2.0
1,458
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/IntelligentCompositionRequest.h> using AlibabaCloud::Imageenhan::Model::IntelligentCompositionRequest; IntelligentCompositionRequest::IntelligentCompositionRequest() : RpcServiceRequest("imageenhan", "2019-09-30", "IntelligentComposition") { setMethod(HttpRequest::Method::Post); } IntelligentCompositionRequest::~IntelligentCompositionRequest() {} int IntelligentCompositionRequest::getNumBoxes()const { return numBoxes_; } void IntelligentCompositionRequest::setNumBoxes(int numBoxes) { numBoxes_ = numBoxes; setBodyParameter("NumBoxes", std::to_string(numBoxes)); } std::string IntelligentCompositionRequest::getImageURL()const { return imageURL_; } void IntelligentCompositionRequest::setImageURL(const std::string& imageURL) { imageURL_ = imageURL; setBodyParameter("ImageURL", imageURL); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/IntelligentCompositionRequest.cc
C++
apache-2.0
1,504
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/IntelligentCompositionResult.h> #include <json/json.h> using namespace AlibabaCloud::Imageenhan; using namespace AlibabaCloud::Imageenhan::Model; IntelligentCompositionResult::IntelligentCompositionResult() : ServiceResult() {} IntelligentCompositionResult::IntelligentCompositionResult(const std::string &payload) : ServiceResult() { parse(payload); } IntelligentCompositionResult::~IntelligentCompositionResult() {} void IntelligentCompositionResult::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["MinX"].isNull()) elementObject.minX = std::stoi(dataNodeElementsElement["MinX"].asString()); if(!dataNodeElementsElement["MinY"].isNull()) elementObject.minY = std::stoi(dataNodeElementsElement["MinY"].asString()); if(!dataNodeElementsElement["MaxX"].isNull()) elementObject.maxX = std::stoi(dataNodeElementsElement["MaxX"].asString()); if(!dataNodeElementsElement["MaxY"].isNull()) elementObject.maxY = std::stoi(dataNodeElementsElement["MaxY"].asString()); if(!dataNodeElementsElement["Score"].isNull()) elementObject.score = std::stof(dataNodeElementsElement["Score"].asString()); data_.elements.push_back(elementObject); } } IntelligentCompositionResult::Data IntelligentCompositionResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/IntelligentCompositionResult.cc
C++
apache-2.0
2,249
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/MakeSuperResolutionImageRequest.h> using AlibabaCloud::Imageenhan::Model::MakeSuperResolutionImageRequest; MakeSuperResolutionImageRequest::MakeSuperResolutionImageRequest() : RpcServiceRequest("imageenhan", "2019-09-30", "MakeSuperResolutionImage") { setMethod(HttpRequest::Method::Post); } MakeSuperResolutionImageRequest::~MakeSuperResolutionImageRequest() {} std::string MakeSuperResolutionImageRequest::getUrl()const { return url_; } void MakeSuperResolutionImageRequest::setUrl(const std::string& url) { url_ = url; setBodyParameter("Url", url); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/MakeSuperResolutionImageRequest.cc
C++
apache-2.0
1,246
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/MakeSuperResolutionImageResult.h> #include <json/json.h> using namespace AlibabaCloud::Imageenhan; using namespace AlibabaCloud::Imageenhan::Model; MakeSuperResolutionImageResult::MakeSuperResolutionImageResult() : ServiceResult() {} MakeSuperResolutionImageResult::MakeSuperResolutionImageResult(const std::string &payload) : ServiceResult() { parse(payload); } MakeSuperResolutionImageResult::~MakeSuperResolutionImageResult() {} void MakeSuperResolutionImageResult::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["Url"].isNull()) data_.url = dataNode["Url"].asString(); } MakeSuperResolutionImageResult::Data MakeSuperResolutionImageResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/MakeSuperResolutionImageResult.cc
C++
apache-2.0
1,513
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/RecolorHDImageRequest.h> using AlibabaCloud::Imageenhan::Model::RecolorHDImageRequest; RecolorHDImageRequest::RecolorHDImageRequest() : RpcServiceRequest("imageenhan", "2019-09-30", "RecolorHDImage") { setMethod(HttpRequest::Method::Post); } RecolorHDImageRequest::~RecolorHDImageRequest() {} std::vector<RecolorHDImageRequest::ColorTemplate> RecolorHDImageRequest::getColorTemplate()const { return colorTemplate_; } void RecolorHDImageRequest::setColorTemplate(const std::vector<ColorTemplate>& colorTemplate) { colorTemplate_ = colorTemplate; for(int dep1 = 0; dep1!= colorTemplate.size(); dep1++) { auto colorTemplateObj = colorTemplate.at(dep1); std::string colorTemplateObjStr = "ColorTemplate." + std::to_string(dep1 + 1); setParameter(colorTemplateObjStr + ".Color", colorTemplateObj.color); } } std::string RecolorHDImageRequest::getDegree()const { return degree_; } void RecolorHDImageRequest::setDegree(const std::string& degree) { degree_ = degree; setBodyParameter("Degree", degree); } std::string RecolorHDImageRequest::getUrl()const { return url_; } void RecolorHDImageRequest::setUrl(const std::string& url) { url_ = url; setBodyParameter("Url", url); } std::string RecolorHDImageRequest::getMode()const { return mode_; } void RecolorHDImageRequest::setMode(const std::string& mode) { mode_ = mode; setBodyParameter("Mode", mode); } bool RecolorHDImageRequest::getAsync()const { return async_; } void RecolorHDImageRequest::setAsync(bool async) { async_ = async; setBodyParameter("Async", async ? "true" : "false"); } int RecolorHDImageRequest::getColorCount()const { return colorCount_; } void RecolorHDImageRequest::setColorCount(int colorCount) { colorCount_ = colorCount; setBodyParameter("ColorCount", std::to_string(colorCount)); } std::string RecolorHDImageRequest::getRefUrl()const { return refUrl_; } void RecolorHDImageRequest::setRefUrl(const std::string& refUrl) { refUrl_ = refUrl; setBodyParameter("RefUrl", refUrl); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/RecolorHDImageRequest.cc
C++
apache-2.0
2,746
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/RecolorHDImageResult.h> #include <json/json.h> using namespace AlibabaCloud::Imageenhan; using namespace AlibabaCloud::Imageenhan::Model; RecolorHDImageResult::RecolorHDImageResult() : ServiceResult() {} RecolorHDImageResult::RecolorHDImageResult(const std::string &payload) : ServiceResult() { parse(payload); } RecolorHDImageResult::~RecolorHDImageResult() {} void RecolorHDImageResult::parse(const std::string &payload) { Json::Reader reader; Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); auto dataNode = value["Data"]; auto allImageList = dataNode["ImageList"]["ImageList"]; for (auto value : allImageList) data_.imageList.push_back(value.asString()); } RecolorHDImageResult::Data RecolorHDImageResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/RecolorHDImageResult.cc
C++
apache-2.0
1,480
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/RecolorImageRequest.h> using AlibabaCloud::Imageenhan::Model::RecolorImageRequest; RecolorImageRequest::RecolorImageRequest() : RpcServiceRequest("imageenhan", "2019-09-30", "RecolorImage") { setMethod(HttpRequest::Method::Post); } RecolorImageRequest::~RecolorImageRequest() {} std::vector<RecolorImageRequest::ColorTemplate> RecolorImageRequest::getColorTemplate()const { return colorTemplate_; } void RecolorImageRequest::setColorTemplate(const std::vector<ColorTemplate>& colorTemplate) { colorTemplate_ = colorTemplate; for(int dep1 = 0; dep1!= colorTemplate.size(); dep1++) { auto colorTemplateObj = colorTemplate.at(dep1); std::string colorTemplateObjStr = "ColorTemplate." + std::to_string(dep1 + 1); setParameter(colorTemplateObjStr + ".Color", colorTemplateObj.color); } } std::string RecolorImageRequest::getUrl()const { return url_; } void RecolorImageRequest::setUrl(const std::string& url) { url_ = url; setBodyParameter("Url", url); } std::string RecolorImageRequest::getMode()const { return mode_; } void RecolorImageRequest::setMode(const std::string& mode) { mode_ = mode; setBodyParameter("Mode", mode); } int RecolorImageRequest::getColorCount()const { return colorCount_; } void RecolorImageRequest::setColorCount(int colorCount) { colorCount_ = colorCount; setBodyParameter("ColorCount", std::to_string(colorCount)); } std::string RecolorImageRequest::getRefUrl()const { return refUrl_; } void RecolorImageRequest::setRefUrl(const std::string& refUrl) { refUrl_ = refUrl; setBodyParameter("RefUrl", refUrl); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/RecolorImageRequest.cc
C++
apache-2.0
2,298
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/RecolorImageResult.h> #include <json/json.h> using namespace AlibabaCloud::Imageenhan; using namespace AlibabaCloud::Imageenhan::Model; RecolorImageResult::RecolorImageResult() : ServiceResult() {} RecolorImageResult::RecolorImageResult(const std::string &payload) : ServiceResult() { parse(payload); } RecolorImageResult::~RecolorImageResult() {} void RecolorImageResult::parse(const std::string &payload) { Json::Reader reader; Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); auto dataNode = value["Data"]; auto allImageList = dataNode["ImageList"]["ImageList"]; for (auto value : allImageList) data_.imageList.push_back(value.asString()); } RecolorImageResult::Data RecolorImageResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/RecolorImageResult.cc
C++
apache-2.0
1,460
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/RemoveImageSubtitlesRequest.h> using AlibabaCloud::Imageenhan::Model::RemoveImageSubtitlesRequest; RemoveImageSubtitlesRequest::RemoveImageSubtitlesRequest() : RpcServiceRequest("imageenhan", "2019-09-30", "RemoveImageSubtitles") { setMethod(HttpRequest::Method::Post); } RemoveImageSubtitlesRequest::~RemoveImageSubtitlesRequest() {} float RemoveImageSubtitlesRequest::getBH()const { return bH_; } void RemoveImageSubtitlesRequest::setBH(float bH) { bH_ = bH; setBodyParameter("BH", std::to_string(bH)); } float RemoveImageSubtitlesRequest::getBW()const { return bW_; } void RemoveImageSubtitlesRequest::setBW(float bW) { bW_ = bW; setBodyParameter("BW", std::to_string(bW)); } float RemoveImageSubtitlesRequest::getBX()const { return bX_; } void RemoveImageSubtitlesRequest::setBX(float bX) { bX_ = bX; setBodyParameter("BX", std::to_string(bX)); } std::string RemoveImageSubtitlesRequest::getImageURL()const { return imageURL_; } void RemoveImageSubtitlesRequest::setImageURL(const std::string& imageURL) { imageURL_ = imageURL; setBodyParameter("ImageURL", imageURL); } float RemoveImageSubtitlesRequest::getBY()const { return bY_; } void RemoveImageSubtitlesRequest::setBY(float bY) { bY_ = bY; setBodyParameter("BY", std::to_string(bY)); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/RemoveImageSubtitlesRequest.cc
C++
apache-2.0
2,002
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/RemoveImageSubtitlesResult.h> #include <json/json.h> using namespace AlibabaCloud::Imageenhan; using namespace AlibabaCloud::Imageenhan::Model; RemoveImageSubtitlesResult::RemoveImageSubtitlesResult() : ServiceResult() {} RemoveImageSubtitlesResult::RemoveImageSubtitlesResult(const std::string &payload) : ServiceResult() { parse(payload); } RemoveImageSubtitlesResult::~RemoveImageSubtitlesResult() {} void RemoveImageSubtitlesResult::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(); } RemoveImageSubtitlesResult::Data RemoveImageSubtitlesResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/RemoveImageSubtitlesResult.cc
C++
apache-2.0
1,488
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/RemoveImageWatermarkRequest.h> using AlibabaCloud::Imageenhan::Model::RemoveImageWatermarkRequest; RemoveImageWatermarkRequest::RemoveImageWatermarkRequest() : RpcServiceRequest("imageenhan", "2019-09-30", "RemoveImageWatermark") { setMethod(HttpRequest::Method::Post); } RemoveImageWatermarkRequest::~RemoveImageWatermarkRequest() {} std::string RemoveImageWatermarkRequest::getImageURL()const { return imageURL_; } void RemoveImageWatermarkRequest::setImageURL(const std::string& imageURL) { imageURL_ = imageURL; setBodyParameter("ImageURL", imageURL); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/RemoveImageWatermarkRequest.cc
C++
apache-2.0
1,250
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imageenhan/model/RemoveImageWatermarkResult.h> #include <json/json.h> using namespace AlibabaCloud::Imageenhan; using namespace AlibabaCloud::Imageenhan::Model; RemoveImageWatermarkResult::RemoveImageWatermarkResult() : ServiceResult() {} RemoveImageWatermarkResult::RemoveImageWatermarkResult(const std::string &payload) : ServiceResult() { parse(payload); } RemoveImageWatermarkResult::~RemoveImageWatermarkResult() {} void RemoveImageWatermarkResult::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(); } RemoveImageWatermarkResult::Data RemoveImageWatermarkResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imageenhan/src/model/RemoveImageWatermarkResult.cc
C++
apache-2.0
1,488
# # 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(imagerecog_public_header include/alibabacloud/imagerecog/ImagerecogClient.h include/alibabacloud/imagerecog/ImagerecogExport.h ) set(imagerecog_public_header_model include/alibabacloud/imagerecog/model/ClassifyingRubbishRequest.h include/alibabacloud/imagerecog/model/ClassifyingRubbishResult.h include/alibabacloud/imagerecog/model/DetectFruitsRequest.h include/alibabacloud/imagerecog/model/DetectFruitsResult.h include/alibabacloud/imagerecog/model/DetectImageElementsRequest.h include/alibabacloud/imagerecog/model/DetectImageElementsResult.h include/alibabacloud/imagerecog/model/RecognizeImageColorRequest.h include/alibabacloud/imagerecog/model/RecognizeImageColorResult.h include/alibabacloud/imagerecog/model/RecognizeImageStyleRequest.h include/alibabacloud/imagerecog/model/RecognizeImageStyleResult.h include/alibabacloud/imagerecog/model/RecognizeLogoRequest.h include/alibabacloud/imagerecog/model/RecognizeLogoResult.h include/alibabacloud/imagerecog/model/RecognizeSceneRequest.h include/alibabacloud/imagerecog/model/RecognizeSceneResult.h include/alibabacloud/imagerecog/model/RecognizeVehicleTypeRequest.h include/alibabacloud/imagerecog/model/RecognizeVehicleTypeResult.h include/alibabacloud/imagerecog/model/TaggingImageRequest.h include/alibabacloud/imagerecog/model/TaggingImageResult.h ) set(imagerecog_src src/ImagerecogClient.cc src/model/ClassifyingRubbishRequest.cc src/model/ClassifyingRubbishResult.cc src/model/DetectFruitsRequest.cc src/model/DetectFruitsResult.cc src/model/DetectImageElementsRequest.cc src/model/DetectImageElementsResult.cc src/model/RecognizeImageColorRequest.cc src/model/RecognizeImageColorResult.cc src/model/RecognizeImageStyleRequest.cc src/model/RecognizeImageStyleResult.cc src/model/RecognizeLogoRequest.cc src/model/RecognizeLogoResult.cc src/model/RecognizeSceneRequest.cc src/model/RecognizeSceneResult.cc src/model/RecognizeVehicleTypeRequest.cc src/model/RecognizeVehicleTypeResult.cc src/model/TaggingImageRequest.cc src/model/TaggingImageResult.cc ) add_library(imagerecog ${LIB_TYPE} ${imagerecog_public_header} ${imagerecog_public_header_model} ${imagerecog_src}) set_target_properties(imagerecog 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}imagerecog ) if(${LIB_TYPE} STREQUAL "SHARED") set_target_properties(imagerecog PROPERTIES DEFINE_SYMBOL ALIBABACLOUD_IMAGERECOG_LIBRARY) endif() target_include_directories(imagerecog PRIVATE include ${CMAKE_SOURCE_DIR}/core/include ) target_link_libraries(imagerecog core) if(CMAKE_HOST_WIN32) ExternalProject_Get_Property(jsoncpp INSTALL_DIR) set(jsoncpp_install_dir ${INSTALL_DIR}) add_dependencies(imagerecog jsoncpp) target_include_directories(imagerecog PRIVATE ${jsoncpp_install_dir}/include) target_link_libraries(imagerecog ${jsoncpp_install_dir}/lib/jsoncpp.lib) set_target_properties(imagerecog PROPERTIES COMPILE_OPTIONS "/bigobj") else() target_include_directories(imagerecog PRIVATE /usr/include/jsoncpp) target_link_libraries(imagerecog jsoncpp) endif() install(FILES ${imagerecog_public_header} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/imagerecog) install(FILES ${imagerecog_public_header_model} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/imagerecog/model) install(TARGETS imagerecog ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/CMakeLists.txt
CMake
apache-2.0
4,325
/* * 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_IMAGERECOG_IMAGERECOGCLIENT_H_ #define ALIBABACLOUD_IMAGERECOG_IMAGERECOGCLIENT_H_ #include <future> #include <alibabacloud/core/AsyncCallerContext.h> #include <alibabacloud/core/EndpointProvider.h> #include <alibabacloud/core/RpcServiceClient.h> #include "ImagerecogExport.h" #include "model/ClassifyingRubbishRequest.h" #include "model/ClassifyingRubbishResult.h" #include "model/DetectFruitsRequest.h" #include "model/DetectFruitsResult.h" #include "model/DetectImageElementsRequest.h" #include "model/DetectImageElementsResult.h" #include "model/RecognizeImageColorRequest.h" #include "model/RecognizeImageColorResult.h" #include "model/RecognizeImageStyleRequest.h" #include "model/RecognizeImageStyleResult.h" #include "model/RecognizeLogoRequest.h" #include "model/RecognizeLogoResult.h" #include "model/RecognizeSceneRequest.h" #include "model/RecognizeSceneResult.h" #include "model/RecognizeVehicleTypeRequest.h" #include "model/RecognizeVehicleTypeResult.h" #include "model/TaggingImageRequest.h" #include "model/TaggingImageResult.h" namespace AlibabaCloud { namespace Imagerecog { class ALIBABACLOUD_IMAGERECOG_EXPORT ImagerecogClient : public RpcServiceClient { public: typedef Outcome<Error, Model::ClassifyingRubbishResult> ClassifyingRubbishOutcome; typedef std::future<ClassifyingRubbishOutcome> ClassifyingRubbishOutcomeCallable; typedef std::function<void(const ImagerecogClient*, const Model::ClassifyingRubbishRequest&, const ClassifyingRubbishOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ClassifyingRubbishAsyncHandler; typedef Outcome<Error, Model::DetectFruitsResult> DetectFruitsOutcome; typedef std::future<DetectFruitsOutcome> DetectFruitsOutcomeCallable; typedef std::function<void(const ImagerecogClient*, const Model::DetectFruitsRequest&, const DetectFruitsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectFruitsAsyncHandler; typedef Outcome<Error, Model::DetectImageElementsResult> DetectImageElementsOutcome; typedef std::future<DetectImageElementsOutcome> DetectImageElementsOutcomeCallable; typedef std::function<void(const ImagerecogClient*, const Model::DetectImageElementsRequest&, const DetectImageElementsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectImageElementsAsyncHandler; typedef Outcome<Error, Model::RecognizeImageColorResult> RecognizeImageColorOutcome; typedef std::future<RecognizeImageColorOutcome> RecognizeImageColorOutcomeCallable; typedef std::function<void(const ImagerecogClient*, const Model::RecognizeImageColorRequest&, const RecognizeImageColorOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeImageColorAsyncHandler; typedef Outcome<Error, Model::RecognizeImageStyleResult> RecognizeImageStyleOutcome; typedef std::future<RecognizeImageStyleOutcome> RecognizeImageStyleOutcomeCallable; typedef std::function<void(const ImagerecogClient*, const Model::RecognizeImageStyleRequest&, const RecognizeImageStyleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeImageStyleAsyncHandler; typedef Outcome<Error, Model::RecognizeLogoResult> RecognizeLogoOutcome; typedef std::future<RecognizeLogoOutcome> RecognizeLogoOutcomeCallable; typedef std::function<void(const ImagerecogClient*, const Model::RecognizeLogoRequest&, const RecognizeLogoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeLogoAsyncHandler; typedef Outcome<Error, Model::RecognizeSceneResult> RecognizeSceneOutcome; typedef std::future<RecognizeSceneOutcome> RecognizeSceneOutcomeCallable; typedef std::function<void(const ImagerecogClient*, const Model::RecognizeSceneRequest&, const RecognizeSceneOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeSceneAsyncHandler; typedef Outcome<Error, Model::RecognizeVehicleTypeResult> RecognizeVehicleTypeOutcome; typedef std::future<RecognizeVehicleTypeOutcome> RecognizeVehicleTypeOutcomeCallable; typedef std::function<void(const ImagerecogClient*, const Model::RecognizeVehicleTypeRequest&, const RecognizeVehicleTypeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeVehicleTypeAsyncHandler; typedef Outcome<Error, Model::TaggingImageResult> TaggingImageOutcome; typedef std::future<TaggingImageOutcome> TaggingImageOutcomeCallable; typedef std::function<void(const ImagerecogClient*, const Model::TaggingImageRequest&, const TaggingImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> TaggingImageAsyncHandler; ImagerecogClient(const Credentials &credentials, const ClientConfiguration &configuration); ImagerecogClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration); ImagerecogClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); ~ImagerecogClient(); ClassifyingRubbishOutcome classifyingRubbish(const Model::ClassifyingRubbishRequest &request)const; void classifyingRubbishAsync(const Model::ClassifyingRubbishRequest& request, const ClassifyingRubbishAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const; ClassifyingRubbishOutcomeCallable classifyingRubbishCallable(const Model::ClassifyingRubbishRequest& request) const; DetectFruitsOutcome detectFruits(const Model::DetectFruitsRequest &request)const; void detectFruitsAsync(const Model::DetectFruitsRequest& request, const DetectFruitsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const; DetectFruitsOutcomeCallable detectFruitsCallable(const Model::DetectFruitsRequest& request) const; DetectImageElementsOutcome detectImageElements(const Model::DetectImageElementsRequest &request)const; void detectImageElementsAsync(const Model::DetectImageElementsRequest& request, const DetectImageElementsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const; DetectImageElementsOutcomeCallable detectImageElementsCallable(const Model::DetectImageElementsRequest& request) const; RecognizeImageColorOutcome recognizeImageColor(const Model::RecognizeImageColorRequest &request)const; void recognizeImageColorAsync(const Model::RecognizeImageColorRequest& request, const RecognizeImageColorAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const; RecognizeImageColorOutcomeCallable recognizeImageColorCallable(const Model::RecognizeImageColorRequest& request) const; RecognizeImageStyleOutcome recognizeImageStyle(const Model::RecognizeImageStyleRequest &request)const; void recognizeImageStyleAsync(const Model::RecognizeImageStyleRequest& request, const RecognizeImageStyleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const; RecognizeImageStyleOutcomeCallable recognizeImageStyleCallable(const Model::RecognizeImageStyleRequest& request) const; RecognizeLogoOutcome recognizeLogo(const Model::RecognizeLogoRequest &request)const; void recognizeLogoAsync(const Model::RecognizeLogoRequest& request, const RecognizeLogoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const; RecognizeLogoOutcomeCallable recognizeLogoCallable(const Model::RecognizeLogoRequest& request) const; RecognizeSceneOutcome recognizeScene(const Model::RecognizeSceneRequest &request)const; void recognizeSceneAsync(const Model::RecognizeSceneRequest& request, const RecognizeSceneAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const; RecognizeSceneOutcomeCallable recognizeSceneCallable(const Model::RecognizeSceneRequest& request) const; RecognizeVehicleTypeOutcome recognizeVehicleType(const Model::RecognizeVehicleTypeRequest &request)const; void recognizeVehicleTypeAsync(const Model::RecognizeVehicleTypeRequest& request, const RecognizeVehicleTypeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const; RecognizeVehicleTypeOutcomeCallable recognizeVehicleTypeCallable(const Model::RecognizeVehicleTypeRequest& request) const; TaggingImageOutcome taggingImage(const Model::TaggingImageRequest &request)const; void taggingImageAsync(const Model::TaggingImageRequest& request, const TaggingImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const; TaggingImageOutcomeCallable taggingImageCallable(const Model::TaggingImageRequest& request) const; private: std::shared_ptr<EndpointProvider> endpointProvider_; }; } } #endif // !ALIBABACLOUD_IMAGERECOG_IMAGERECOGCLIENT_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/include/alibabacloud/imagerecog/ImagerecogClient.h
C++
apache-2.0
9,428
/* * 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_IMAGERECOG_IMAGERECOGEXPORT_H_ #define ALIBABACLOUD_IMAGERECOG_IMAGERECOGEXPORT_H_ #include <alibabacloud/core/Global.h> #if defined(ALIBABACLOUD_SHARED) # if defined(ALIBABACLOUD_IMAGERECOG_LIBRARY) # define ALIBABACLOUD_IMAGERECOG_EXPORT ALIBABACLOUD_DECL_EXPORT # else # define ALIBABACLOUD_IMAGERECOG_EXPORT ALIBABACLOUD_DECL_IMPORT # endif #else # define ALIBABACLOUD_IMAGERECOG_EXPORT #endif #endif // !ALIBABACLOUD_IMAGERECOG_IMAGERECOGEXPORT_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/include/alibabacloud/imagerecog/ImagerecogExport.h
C
apache-2.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. */ #ifndef ALIBABACLOUD_IMAGERECOG_MODEL_CLASSIFYINGRUBBISHREQUEST_H_ #define ALIBABACLOUD_IMAGERECOG_MODEL_CLASSIFYINGRUBBISHREQUEST_H_ #include <string> #include <vector> #include <alibabacloud/core/RpcServiceRequest.h> #include <alibabacloud/imagerecog/ImagerecogExport.h> namespace AlibabaCloud { namespace Imagerecog { namespace Model { class ALIBABACLOUD_IMAGERECOG_EXPORT ClassifyingRubbishRequest : public RpcServiceRequest { public: ClassifyingRubbishRequest(); ~ClassifyingRubbishRequest(); std::string getImageURL()const; void setImageURL(const std::string& imageURL); private: std::string imageURL_; }; } } } #endif // !ALIBABACLOUD_IMAGERECOG_MODEL_CLASSIFYINGRUBBISHREQUEST_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/include/alibabacloud/imagerecog/model/ClassifyingRubbishRequest.h
C++
apache-2.0
1,377
/* * 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_IMAGERECOG_MODEL_CLASSIFYINGRUBBISHRESULT_H_ #define ALIBABACLOUD_IMAGERECOG_MODEL_CLASSIFYINGRUBBISHRESULT_H_ #include <string> #include <vector> #include <utility> #include <alibabacloud/core/ServiceResult.h> #include <alibabacloud/imagerecog/ImagerecogExport.h> namespace AlibabaCloud { namespace Imagerecog { namespace Model { class ALIBABACLOUD_IMAGERECOG_EXPORT ClassifyingRubbishResult : public ServiceResult { public: struct Data { struct Element { std::string rubbish; std::string category; float categoryScore; float rubbishScore; }; bool sensitive; std::vector<Element> elements; }; ClassifyingRubbishResult(); explicit ClassifyingRubbishResult(const std::string &payload); ~ClassifyingRubbishResult(); Data getData()const; protected: void parse(const std::string &payload); private: Data data_; }; } } } #endif // !ALIBABACLOUD_IMAGERECOG_MODEL_CLASSIFYINGRUBBISHRESULT_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/include/alibabacloud/imagerecog/model/ClassifyingRubbishResult.h
C++
apache-2.0
1,651
/* * 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_IMAGERECOG_MODEL_DETECTFRUITSREQUEST_H_ #define ALIBABACLOUD_IMAGERECOG_MODEL_DETECTFRUITSREQUEST_H_ #include <string> #include <vector> #include <alibabacloud/core/RpcServiceRequest.h> #include <alibabacloud/imagerecog/ImagerecogExport.h> namespace AlibabaCloud { namespace Imagerecog { namespace Model { class ALIBABACLOUD_IMAGERECOG_EXPORT DetectFruitsRequest : public RpcServiceRequest { public: DetectFruitsRequest(); ~DetectFruitsRequest(); std::string getImageURL()const; void setImageURL(const std::string& imageURL); private: std::string imageURL_; }; } } } #endif // !ALIBABACLOUD_IMAGERECOG_MODEL_DETECTFRUITSREQUEST_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/include/alibabacloud/imagerecog/model/DetectFruitsRequest.h
C++
apache-2.0
1,341
/* * 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_IMAGERECOG_MODEL_DETECTFRUITSRESULT_H_ #define ALIBABACLOUD_IMAGERECOG_MODEL_DETECTFRUITSRESULT_H_ #include <string> #include <vector> #include <utility> #include <alibabacloud/core/ServiceResult.h> #include <alibabacloud/imagerecog/ImagerecogExport.h> namespace AlibabaCloud { namespace Imagerecog { namespace Model { class ALIBABACLOUD_IMAGERECOG_EXPORT DetectFruitsResult : public ServiceResult { public: struct Data { struct Element { float score; std::vector<std::string> box; std::string name; }; std::vector<Element> elements; }; DetectFruitsResult(); explicit DetectFruitsResult(const std::string &payload); ~DetectFruitsResult(); Data getData()const; protected: void parse(const std::string &payload); private: Data data_; }; } } } #endif // !ALIBABACLOUD_IMAGERECOG_MODEL_DETECTFRUITSRESULT_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/include/alibabacloud/imagerecog/model/DetectFruitsResult.h
C++
apache-2.0
1,559
/* * 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_IMAGERECOG_MODEL_DETECTIMAGEELEMENTSREQUEST_H_ #define ALIBABACLOUD_IMAGERECOG_MODEL_DETECTIMAGEELEMENTSREQUEST_H_ #include <string> #include <vector> #include <alibabacloud/core/RpcServiceRequest.h> #include <alibabacloud/imagerecog/ImagerecogExport.h> namespace AlibabaCloud { namespace Imagerecog { namespace Model { class ALIBABACLOUD_IMAGERECOG_EXPORT DetectImageElementsRequest : public RpcServiceRequest { public: DetectImageElementsRequest(); ~DetectImageElementsRequest(); std::string getUrl()const; void setUrl(const std::string& url); private: std::string url_; }; } } } #endif // !ALIBABACLOUD_IMAGERECOG_MODEL_DETECTIMAGEELEMENTSREQUEST_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/include/alibabacloud/imagerecog/model/DetectImageElementsRequest.h
C++
apache-2.0
1,363
/* * 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_IMAGERECOG_MODEL_DETECTIMAGEELEMENTSRESULT_H_ #define ALIBABACLOUD_IMAGERECOG_MODEL_DETECTIMAGEELEMENTSRESULT_H_ #include <string> #include <vector> #include <utility> #include <alibabacloud/core/ServiceResult.h> #include <alibabacloud/imagerecog/ImagerecogExport.h> namespace AlibabaCloud { namespace Imagerecog { namespace Model { class ALIBABACLOUD_IMAGERECOG_EXPORT DetectImageElementsResult : public ServiceResult { public: struct Data { struct Element { std::string type; float score; int x; int y; int height; int width; }; std::vector<Element> elements; }; DetectImageElementsResult(); explicit DetectImageElementsResult(const std::string &payload); ~DetectImageElementsResult(); Data getData()const; protected: void parse(const std::string &payload); private: Data data_; }; } } } #endif // !ALIBABACLOUD_IMAGERECOG_MODEL_DETECTIMAGEELEMENTSRESULT_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/include/alibabacloud/imagerecog/model/DetectImageElementsResult.h
C++
apache-2.0
1,633
/* * 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_IMAGERECOG_MODEL_RECOGNIZEIMAGECOLORREQUEST_H_ #define ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZEIMAGECOLORREQUEST_H_ #include <string> #include <vector> #include <alibabacloud/core/RpcServiceRequest.h> #include <alibabacloud/imagerecog/ImagerecogExport.h> namespace AlibabaCloud { namespace Imagerecog { namespace Model { class ALIBABACLOUD_IMAGERECOG_EXPORT RecognizeImageColorRequest : public RpcServiceRequest { public: RecognizeImageColorRequest(); ~RecognizeImageColorRequest(); std::string getUrl()const; void setUrl(const std::string& url); int getColorCount()const; void setColorCount(int colorCount); private: std::string url_; int colorCount_; }; } } } #endif // !ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZEIMAGECOLORREQUEST_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/include/alibabacloud/imagerecog/model/RecognizeImageColorRequest.h
C++
apache-2.0
1,457
/* * 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_IMAGERECOG_MODEL_RECOGNIZEIMAGECOLORRESULT_H_ #define ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZEIMAGECOLORRESULT_H_ #include <string> #include <vector> #include <utility> #include <alibabacloud/core/ServiceResult.h> #include <alibabacloud/imagerecog/ImagerecogExport.h> namespace AlibabaCloud { namespace Imagerecog { namespace Model { class ALIBABACLOUD_IMAGERECOG_EXPORT RecognizeImageColorResult : public ServiceResult { public: struct Data { struct ColorTemplate { float percentage; std::string color; std::string label; }; std::vector<ColorTemplate> colorTemplateList; }; RecognizeImageColorResult(); explicit RecognizeImageColorResult(const std::string &payload); ~RecognizeImageColorResult(); Data getData()const; protected: void parse(const std::string &payload); private: Data data_; }; } } } #endif // !ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZEIMAGECOLORRESULT_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/include/alibabacloud/imagerecog/model/RecognizeImageColorResult.h
C++
apache-2.0
1,624
/* * 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_IMAGERECOG_MODEL_RECOGNIZEIMAGESTYLEREQUEST_H_ #define ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZEIMAGESTYLEREQUEST_H_ #include <string> #include <vector> #include <alibabacloud/core/RpcServiceRequest.h> #include <alibabacloud/imagerecog/ImagerecogExport.h> namespace AlibabaCloud { namespace Imagerecog { namespace Model { class ALIBABACLOUD_IMAGERECOG_EXPORT RecognizeImageStyleRequest : public RpcServiceRequest { public: RecognizeImageStyleRequest(); ~RecognizeImageStyleRequest(); std::string getUrl()const; void setUrl(const std::string& url); private: std::string url_; }; } } } #endif // !ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZEIMAGESTYLEREQUEST_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/include/alibabacloud/imagerecog/model/RecognizeImageStyleRequest.h
C++
apache-2.0
1,363
/* * 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_IMAGERECOG_MODEL_RECOGNIZEIMAGESTYLERESULT_H_ #define ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZEIMAGESTYLERESULT_H_ #include <string> #include <vector> #include <utility> #include <alibabacloud/core/ServiceResult.h> #include <alibabacloud/imagerecog/ImagerecogExport.h> namespace AlibabaCloud { namespace Imagerecog { namespace Model { class ALIBABACLOUD_IMAGERECOG_EXPORT RecognizeImageStyleResult : public ServiceResult { public: struct Data { std::vector<std::string> styles; }; RecognizeImageStyleResult(); explicit RecognizeImageStyleResult(const std::string &payload); ~RecognizeImageStyleResult(); Data getData()const; protected: void parse(const std::string &payload); private: Data data_; }; } } } #endif // !ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZEIMAGESTYLERESULT_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/include/alibabacloud/imagerecog/model/RecognizeImageStyleResult.h
C++
apache-2.0
1,496
/* * 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_IMAGERECOG_MODEL_RECOGNIZELOGOREQUEST_H_ #define ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZELOGOREQUEST_H_ #include <string> #include <vector> #include <alibabacloud/core/RpcServiceRequest.h> #include <alibabacloud/imagerecog/ImagerecogExport.h> namespace AlibabaCloud { namespace Imagerecog { namespace Model { class ALIBABACLOUD_IMAGERECOG_EXPORT RecognizeLogoRequest : public RpcServiceRequest { public: struct Tasks { std::string imageURL; }; public: RecognizeLogoRequest(); ~RecognizeLogoRequest(); std::vector<Tasks> getTasks()const; void setTasks(const std::vector<Tasks>& tasks); private: std::vector<Tasks> tasks_; }; } } } #endif // !ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZELOGOREQUEST_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/include/alibabacloud/imagerecog/model/RecognizeLogoRequest.h
C++
apache-2.0
1,429
/* * 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_IMAGERECOG_MODEL_RECOGNIZELOGORESULT_H_ #define ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZELOGORESULT_H_ #include <string> #include <vector> #include <utility> #include <alibabacloud/core/ServiceResult.h> #include <alibabacloud/imagerecog/ImagerecogExport.h> namespace AlibabaCloud { namespace Imagerecog { namespace Model { class ALIBABACLOUD_IMAGERECOG_EXPORT RecognizeLogoResult : public ServiceResult { public: struct Data { struct Element { struct Result { struct LogoData { std::string type; float w; float x; float h; float y; std::string name; }; std::string suggestion; std::vector<Result::LogoData> logosData; float rate; std::string label; }; std::string taskId; std::vector<Element::Result> results; std::string imageURL; }; std::vector<Element> elements; }; RecognizeLogoResult(); explicit RecognizeLogoResult(const std::string &payload); ~RecognizeLogoResult(); Data getData()const; protected: void parse(const std::string &payload); private: Data data_; }; } } } #endif // !ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZELOGORESULT_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/include/alibabacloud/imagerecog/model/RecognizeLogoResult.h
C++
apache-2.0
1,908
/* * 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_IMAGERECOG_MODEL_RECOGNIZESCENEREQUEST_H_ #define ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZESCENEREQUEST_H_ #include <string> #include <vector> #include <alibabacloud/core/RpcServiceRequest.h> #include <alibabacloud/imagerecog/ImagerecogExport.h> namespace AlibabaCloud { namespace Imagerecog { namespace Model { class ALIBABACLOUD_IMAGERECOG_EXPORT RecognizeSceneRequest : public RpcServiceRequest { public: RecognizeSceneRequest(); ~RecognizeSceneRequest(); int getImageType()const; void setImageType(int imageType); std::string getImageURL()const; void setImageURL(const std::string& imageURL); private: int imageType_; std::string imageURL_; }; } } } #endif // !ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZESCENEREQUEST_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/include/alibabacloud/imagerecog/model/RecognizeSceneRequest.h
C++
apache-2.0
1,443
/* * 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_IMAGERECOG_MODEL_RECOGNIZESCENERESULT_H_ #define ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZESCENERESULT_H_ #include <string> #include <vector> #include <utility> #include <alibabacloud/core/ServiceResult.h> #include <alibabacloud/imagerecog/ImagerecogExport.h> namespace AlibabaCloud { namespace Imagerecog { namespace Model { class ALIBABACLOUD_IMAGERECOG_EXPORT RecognizeSceneResult : public ServiceResult { public: struct Data { struct Tag { float confidence; std::string value; }; std::vector<Tag> tags; }; RecognizeSceneResult(); explicit RecognizeSceneResult(const std::string &payload); ~RecognizeSceneResult(); Data getData()const; protected: void parse(const std::string &payload); private: Data data_; }; } } } #endif // !ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZESCENERESULT_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/include/alibabacloud/imagerecog/model/RecognizeSceneResult.h
C++
apache-2.0
1,531
/* * 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_IMAGERECOG_MODEL_RECOGNIZEVEHICLETYPEREQUEST_H_ #define ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZEVEHICLETYPEREQUEST_H_ #include <string> #include <vector> #include <alibabacloud/core/RpcServiceRequest.h> #include <alibabacloud/imagerecog/ImagerecogExport.h> namespace AlibabaCloud { namespace Imagerecog { namespace Model { class ALIBABACLOUD_IMAGERECOG_EXPORT RecognizeVehicleTypeRequest : public RpcServiceRequest { public: RecognizeVehicleTypeRequest(); ~RecognizeVehicleTypeRequest(); std::string getImageURL()const; void setImageURL(const std::string& imageURL); private: std::string imageURL_; }; } } } #endif // !ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZEVEHICLETYPEREQUEST_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/include/alibabacloud/imagerecog/model/RecognizeVehicleTypeRequest.h
C++
apache-2.0
1,389
/* * 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_IMAGERECOG_MODEL_RECOGNIZEVEHICLETYPERESULT_H_ #define ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZEVEHICLETYPERESULT_H_ #include <string> #include <vector> #include <utility> #include <alibabacloud/core/ServiceResult.h> #include <alibabacloud/imagerecog/ImagerecogExport.h> namespace AlibabaCloud { namespace Imagerecog { namespace Model { class ALIBABACLOUD_IMAGERECOG_EXPORT RecognizeVehicleTypeResult : public ServiceResult { public: struct Data { struct Element { float score; std::string name; }; std::vector<Element> elements; float threshold; }; RecognizeVehicleTypeResult(); explicit RecognizeVehicleTypeResult(const std::string &payload); ~RecognizeVehicleTypeResult(); Data getData()const; protected: void parse(const std::string &payload); private: Data data_; }; } } } #endif // !ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZEVEHICLETYPERESULT_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/include/alibabacloud/imagerecog/model/RecognizeVehicleTypeResult.h
C++
apache-2.0
1,601
/* * 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_IMAGERECOG_MODEL_TAGGINGIMAGEREQUEST_H_ #define ALIBABACLOUD_IMAGERECOG_MODEL_TAGGINGIMAGEREQUEST_H_ #include <string> #include <vector> #include <alibabacloud/core/RpcServiceRequest.h> #include <alibabacloud/imagerecog/ImagerecogExport.h> namespace AlibabaCloud { namespace Imagerecog { namespace Model { class ALIBABACLOUD_IMAGERECOG_EXPORT TaggingImageRequest : public RpcServiceRequest { public: TaggingImageRequest(); ~TaggingImageRequest(); int getImageType()const; void setImageType(int imageType); std::string getImageURL()const; void setImageURL(const std::string& imageURL); private: int imageType_; std::string imageURL_; }; } } } #endif // !ALIBABACLOUD_IMAGERECOG_MODEL_TAGGINGIMAGEREQUEST_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/include/alibabacloud/imagerecog/model/TaggingImageRequest.h
C++
apache-2.0
1,431
/* * 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_IMAGERECOG_MODEL_TAGGINGIMAGERESULT_H_ #define ALIBABACLOUD_IMAGERECOG_MODEL_TAGGINGIMAGERESULT_H_ #include <string> #include <vector> #include <utility> #include <alibabacloud/core/ServiceResult.h> #include <alibabacloud/imagerecog/ImagerecogExport.h> namespace AlibabaCloud { namespace Imagerecog { namespace Model { class ALIBABACLOUD_IMAGERECOG_EXPORT TaggingImageResult : public ServiceResult { public: struct Data { struct Tag { float confidence; std::string value; }; std::vector<Tag> tags; }; TaggingImageResult(); explicit TaggingImageResult(const std::string &payload); ~TaggingImageResult(); Data getData()const; protected: void parse(const std::string &payload); private: Data data_; }; } } } #endif // !ALIBABACLOUD_IMAGERECOG_MODEL_TAGGINGIMAGERESULT_H_
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/include/alibabacloud/imagerecog/model/TaggingImageResult.h
C++
apache-2.0
1,517
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imagerecog/ImagerecogClient.h> #include <alibabacloud/core/SimpleCredentialsProvider.h> using namespace AlibabaCloud; using namespace AlibabaCloud::Location; using namespace AlibabaCloud::Imagerecog; using namespace AlibabaCloud::Imagerecog::Model; namespace { const std::string SERVICE_NAME = "imagerecog"; } ImagerecogClient::ImagerecogClient(const Credentials &credentials, const ClientConfiguration &configuration) : RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration) { auto locationClient = std::make_shared<LocationClient>(credentials, configuration); endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "imagerecog"); } ImagerecogClient::ImagerecogClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) { auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration); endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "imagerecog"); } ImagerecogClient::ImagerecogClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration) { auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration); endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "imagerecog"); } ImagerecogClient::~ImagerecogClient() {} ImagerecogClient::ClassifyingRubbishOutcome ImagerecogClient::classifyingRubbish(const ClassifyingRubbishRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return ClassifyingRubbishOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return ClassifyingRubbishOutcome(ClassifyingRubbishResult(outcome.result())); else return ClassifyingRubbishOutcome(outcome.error()); } void ImagerecogClient::classifyingRubbishAsync(const ClassifyingRubbishRequest& request, const ClassifyingRubbishAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, classifyingRubbish(request), context); }; asyncExecute(new Runnable(fn)); } ImagerecogClient::ClassifyingRubbishOutcomeCallable ImagerecogClient::classifyingRubbishCallable(const ClassifyingRubbishRequest &request) const { auto task = std::make_shared<std::packaged_task<ClassifyingRubbishOutcome()>>( [this, request]() { return this->classifyingRubbish(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImagerecogClient::DetectFruitsOutcome ImagerecogClient::detectFruits(const DetectFruitsRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return DetectFruitsOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return DetectFruitsOutcome(DetectFruitsResult(outcome.result())); else return DetectFruitsOutcome(outcome.error()); } void ImagerecogClient::detectFruitsAsync(const DetectFruitsRequest& request, const DetectFruitsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, detectFruits(request), context); }; asyncExecute(new Runnable(fn)); } ImagerecogClient::DetectFruitsOutcomeCallable ImagerecogClient::detectFruitsCallable(const DetectFruitsRequest &request) const { auto task = std::make_shared<std::packaged_task<DetectFruitsOutcome()>>( [this, request]() { return this->detectFruits(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImagerecogClient::DetectImageElementsOutcome ImagerecogClient::detectImageElements(const DetectImageElementsRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return DetectImageElementsOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return DetectImageElementsOutcome(DetectImageElementsResult(outcome.result())); else return DetectImageElementsOutcome(outcome.error()); } void ImagerecogClient::detectImageElementsAsync(const DetectImageElementsRequest& request, const DetectImageElementsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, detectImageElements(request), context); }; asyncExecute(new Runnable(fn)); } ImagerecogClient::DetectImageElementsOutcomeCallable ImagerecogClient::detectImageElementsCallable(const DetectImageElementsRequest &request) const { auto task = std::make_shared<std::packaged_task<DetectImageElementsOutcome()>>( [this, request]() { return this->detectImageElements(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImagerecogClient::RecognizeImageColorOutcome ImagerecogClient::recognizeImageColor(const RecognizeImageColorRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return RecognizeImageColorOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return RecognizeImageColorOutcome(RecognizeImageColorResult(outcome.result())); else return RecognizeImageColorOutcome(outcome.error()); } void ImagerecogClient::recognizeImageColorAsync(const RecognizeImageColorRequest& request, const RecognizeImageColorAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, recognizeImageColor(request), context); }; asyncExecute(new Runnable(fn)); } ImagerecogClient::RecognizeImageColorOutcomeCallable ImagerecogClient::recognizeImageColorCallable(const RecognizeImageColorRequest &request) const { auto task = std::make_shared<std::packaged_task<RecognizeImageColorOutcome()>>( [this, request]() { return this->recognizeImageColor(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImagerecogClient::RecognizeImageStyleOutcome ImagerecogClient::recognizeImageStyle(const RecognizeImageStyleRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return RecognizeImageStyleOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return RecognizeImageStyleOutcome(RecognizeImageStyleResult(outcome.result())); else return RecognizeImageStyleOutcome(outcome.error()); } void ImagerecogClient::recognizeImageStyleAsync(const RecognizeImageStyleRequest& request, const RecognizeImageStyleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, recognizeImageStyle(request), context); }; asyncExecute(new Runnable(fn)); } ImagerecogClient::RecognizeImageStyleOutcomeCallable ImagerecogClient::recognizeImageStyleCallable(const RecognizeImageStyleRequest &request) const { auto task = std::make_shared<std::packaged_task<RecognizeImageStyleOutcome()>>( [this, request]() { return this->recognizeImageStyle(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImagerecogClient::RecognizeLogoOutcome ImagerecogClient::recognizeLogo(const RecognizeLogoRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return RecognizeLogoOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return RecognizeLogoOutcome(RecognizeLogoResult(outcome.result())); else return RecognizeLogoOutcome(outcome.error()); } void ImagerecogClient::recognizeLogoAsync(const RecognizeLogoRequest& request, const RecognizeLogoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, recognizeLogo(request), context); }; asyncExecute(new Runnable(fn)); } ImagerecogClient::RecognizeLogoOutcomeCallable ImagerecogClient::recognizeLogoCallable(const RecognizeLogoRequest &request) const { auto task = std::make_shared<std::packaged_task<RecognizeLogoOutcome()>>( [this, request]() { return this->recognizeLogo(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImagerecogClient::RecognizeSceneOutcome ImagerecogClient::recognizeScene(const RecognizeSceneRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return RecognizeSceneOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return RecognizeSceneOutcome(RecognizeSceneResult(outcome.result())); else return RecognizeSceneOutcome(outcome.error()); } void ImagerecogClient::recognizeSceneAsync(const RecognizeSceneRequest& request, const RecognizeSceneAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, recognizeScene(request), context); }; asyncExecute(new Runnable(fn)); } ImagerecogClient::RecognizeSceneOutcomeCallable ImagerecogClient::recognizeSceneCallable(const RecognizeSceneRequest &request) const { auto task = std::make_shared<std::packaged_task<RecognizeSceneOutcome()>>( [this, request]() { return this->recognizeScene(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImagerecogClient::RecognizeVehicleTypeOutcome ImagerecogClient::recognizeVehicleType(const RecognizeVehicleTypeRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return RecognizeVehicleTypeOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return RecognizeVehicleTypeOutcome(RecognizeVehicleTypeResult(outcome.result())); else return RecognizeVehicleTypeOutcome(outcome.error()); } void ImagerecogClient::recognizeVehicleTypeAsync(const RecognizeVehicleTypeRequest& request, const RecognizeVehicleTypeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, recognizeVehicleType(request), context); }; asyncExecute(new Runnable(fn)); } ImagerecogClient::RecognizeVehicleTypeOutcomeCallable ImagerecogClient::recognizeVehicleTypeCallable(const RecognizeVehicleTypeRequest &request) const { auto task = std::make_shared<std::packaged_task<RecognizeVehicleTypeOutcome()>>( [this, request]() { return this->recognizeVehicleType(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); } ImagerecogClient::TaggingImageOutcome ImagerecogClient::taggingImage(const TaggingImageRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); if (!endpointOutcome.isSuccess()) return TaggingImageOutcome(endpointOutcome.error()); auto outcome = makeRequest(endpointOutcome.result(), request); if (outcome.isSuccess()) return TaggingImageOutcome(TaggingImageResult(outcome.result())); else return TaggingImageOutcome(outcome.error()); } void ImagerecogClient::taggingImageAsync(const TaggingImageRequest& request, const TaggingImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const { auto fn = [this, request, handler, context]() { handler(this, request, taggingImage(request), context); }; asyncExecute(new Runnable(fn)); } ImagerecogClient::TaggingImageOutcomeCallable ImagerecogClient::taggingImageCallable(const TaggingImageRequest &request) const { auto task = std::make_shared<std::packaged_task<TaggingImageOutcome()>>( [this, request]() { return this->taggingImage(request); }); asyncExecute(new Runnable([task]() { (*task)(); })); return task->get_future(); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/src/ImagerecogClient.cc
C++
apache-2.0
13,540
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imagerecog/model/ClassifyingRubbishRequest.h> using AlibabaCloud::Imagerecog::Model::ClassifyingRubbishRequest; ClassifyingRubbishRequest::ClassifyingRubbishRequest() : RpcServiceRequest("imagerecog", "2019-09-30", "ClassifyingRubbish") { setMethod(HttpRequest::Method::Post); } ClassifyingRubbishRequest::~ClassifyingRubbishRequest() {} std::string ClassifyingRubbishRequest::getImageURL()const { return imageURL_; } void ClassifyingRubbishRequest::setImageURL(const std::string& imageURL) { imageURL_ = imageURL; setBodyParameter("ImageURL", imageURL); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/src/model/ClassifyingRubbishRequest.cc
C++
apache-2.0
1,232
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imagerecog/model/ClassifyingRubbishResult.h> #include <json/json.h> using namespace AlibabaCloud::Imagerecog; using namespace AlibabaCloud::Imagerecog::Model; ClassifyingRubbishResult::ClassifyingRubbishResult() : ServiceResult() {} ClassifyingRubbishResult::ClassifyingRubbishResult(const std::string &payload) : ServiceResult() { parse(payload); } ClassifyingRubbishResult::~ClassifyingRubbishResult() {} void ClassifyingRubbishResult::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["Sensitive"].isNull()) data_.sensitive = dataNode["Sensitive"].asString() == "true"; auto allElementsNode = dataNode["Elements"]; for (auto dataNodeElementsElement : allElementsNode) { Data::Element elementObject; if(!dataNodeElementsElement["Category"].isNull()) elementObject.category = dataNodeElementsElement["Category"].asString(); if(!dataNodeElementsElement["CategoryScore"].isNull()) elementObject.categoryScore = std::stof(dataNodeElementsElement["CategoryScore"].asString()); if(!dataNodeElementsElement["Rubbish"].isNull()) elementObject.rubbish = dataNodeElementsElement["Rubbish"].asString(); if(!dataNodeElementsElement["RubbishScore"].isNull()) elementObject.rubbishScore = std::stof(dataNodeElementsElement["RubbishScore"].asString()); data_.elements.push_back(elementObject); } } ClassifyingRubbishResult::Data ClassifyingRubbishResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/src/model/ClassifyingRubbishResult.cc
C++
apache-2.0
2,219
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imagerecog/model/DetectFruitsRequest.h> using AlibabaCloud::Imagerecog::Model::DetectFruitsRequest; DetectFruitsRequest::DetectFruitsRequest() : RpcServiceRequest("imagerecog", "2019-09-30", "DetectFruits") { setMethod(HttpRequest::Method::Post); } DetectFruitsRequest::~DetectFruitsRequest() {} std::string DetectFruitsRequest::getImageURL()const { return imageURL_; } void DetectFruitsRequest::setImageURL(const std::string& imageURL) { imageURL_ = imageURL; setBodyParameter("ImageURL", imageURL); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/src/model/DetectFruitsRequest.cc
C++
apache-2.0
1,178
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imagerecog/model/DetectFruitsResult.h> #include <json/json.h> using namespace AlibabaCloud::Imagerecog; using namespace AlibabaCloud::Imagerecog::Model; DetectFruitsResult::DetectFruitsResult() : ServiceResult() {} DetectFruitsResult::DetectFruitsResult(const std::string &payload) : ServiceResult() { parse(payload); } DetectFruitsResult::~DetectFruitsResult() {} void DetectFruitsResult::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"]; for (auto dataNodeElementsElement : allElementsNode) { Data::Element elementObject; if(!dataNodeElementsElement["Name"].isNull()) elementObject.name = dataNodeElementsElement["Name"].asString(); if(!dataNodeElementsElement["Score"].isNull()) elementObject.score = std::stof(dataNodeElementsElement["Score"].asString()); auto allBox = dataNodeElementsElement["Box"]; for (auto value : allBox) elementObject.box.push_back(value.asString()); data_.elements.push_back(elementObject); } } DetectFruitsResult::Data DetectFruitsResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/src/model/DetectFruitsResult.cc
C++
apache-2.0
1,872
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imagerecog/model/DetectImageElementsRequest.h> using AlibabaCloud::Imagerecog::Model::DetectImageElementsRequest; DetectImageElementsRequest::DetectImageElementsRequest() : RpcServiceRequest("imagerecog", "2019-09-30", "DetectImageElements") { setMethod(HttpRequest::Method::Post); } DetectImageElementsRequest::~DetectImageElementsRequest() {} std::string DetectImageElementsRequest::getUrl()const { return url_; } void DetectImageElementsRequest::setUrl(const std::string& url) { url_ = url; setBodyParameter("Url", url); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/src/model/DetectImageElementsRequest.cc
C++
apache-2.0
1,201
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imagerecog/model/DetectImageElementsResult.h> #include <json/json.h> using namespace AlibabaCloud::Imagerecog; using namespace AlibabaCloud::Imagerecog::Model; DetectImageElementsResult::DetectImageElementsResult() : ServiceResult() {} DetectImageElementsResult::DetectImageElementsResult(const std::string &payload) : ServiceResult() { parse(payload); } DetectImageElementsResult::~DetectImageElementsResult() {} void DetectImageElementsResult::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["Type"].isNull()) elementObject.type = dataNodeElementsElement["Type"].asString(); if(!dataNodeElementsElement["X"].isNull()) elementObject.x = std::stoi(dataNodeElementsElement["X"].asString()); if(!dataNodeElementsElement["Y"].isNull()) elementObject.y = std::stoi(dataNodeElementsElement["Y"].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["Score"].isNull()) elementObject.score = std::stof(dataNodeElementsElement["Score"].asString()); data_.elements.push_back(elementObject); } } DetectImageElementsResult::Data DetectImageElementsResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/src/model/DetectImageElementsResult.cc
C++
apache-2.0
2,326
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imagerecog/model/RecognizeImageColorRequest.h> using AlibabaCloud::Imagerecog::Model::RecognizeImageColorRequest; RecognizeImageColorRequest::RecognizeImageColorRequest() : RpcServiceRequest("imagerecog", "2019-09-30", "RecognizeImageColor") { setMethod(HttpRequest::Method::Post); } RecognizeImageColorRequest::~RecognizeImageColorRequest() {} std::string RecognizeImageColorRequest::getUrl()const { return url_; } void RecognizeImageColorRequest::setUrl(const std::string& url) { url_ = url; setBodyParameter("Url", url); } int RecognizeImageColorRequest::getColorCount()const { return colorCount_; } void RecognizeImageColorRequest::setColorCount(int colorCount) { colorCount_ = colorCount; setBodyParameter("ColorCount", std::to_string(colorCount)); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/src/model/RecognizeImageColorRequest.cc
C++
apache-2.0
1,447
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imagerecog/model/RecognizeImageColorResult.h> #include <json/json.h> using namespace AlibabaCloud::Imagerecog; using namespace AlibabaCloud::Imagerecog::Model; RecognizeImageColorResult::RecognizeImageColorResult() : ServiceResult() {} RecognizeImageColorResult::RecognizeImageColorResult(const std::string &payload) : ServiceResult() { parse(payload); } RecognizeImageColorResult::~RecognizeImageColorResult() {} void RecognizeImageColorResult::parse(const std::string &payload) { Json::Reader reader; Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); auto dataNode = value["Data"]; auto allColorTemplateListNode = dataNode["ColorTemplateList"]["ColorTemplate"]; for (auto dataNodeColorTemplateListColorTemplate : allColorTemplateListNode) { Data::ColorTemplate colorTemplateObject; if(!dataNodeColorTemplateListColorTemplate["Color"].isNull()) colorTemplateObject.color = dataNodeColorTemplateListColorTemplate["Color"].asString(); if(!dataNodeColorTemplateListColorTemplate["Label"].isNull()) colorTemplateObject.label = dataNodeColorTemplateListColorTemplate["Label"].asString(); if(!dataNodeColorTemplateListColorTemplate["Percentage"].isNull()) colorTemplateObject.percentage = std::stof(dataNodeColorTemplateListColorTemplate["Percentage"].asString()); data_.colorTemplateList.push_back(colorTemplateObject); } } RecognizeImageColorResult::Data RecognizeImageColorResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/src/model/RecognizeImageColorResult.cc
C++
apache-2.0
2,147
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imagerecog/model/RecognizeImageStyleRequest.h> using AlibabaCloud::Imagerecog::Model::RecognizeImageStyleRequest; RecognizeImageStyleRequest::RecognizeImageStyleRequest() : RpcServiceRequest("imagerecog", "2019-09-30", "RecognizeImageStyle") { setMethod(HttpRequest::Method::Post); } RecognizeImageStyleRequest::~RecognizeImageStyleRequest() {} std::string RecognizeImageStyleRequest::getUrl()const { return url_; } void RecognizeImageStyleRequest::setUrl(const std::string& url) { url_ = url; setBodyParameter("Url", url); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/src/model/RecognizeImageStyleRequest.cc
C++
apache-2.0
1,201
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imagerecog/model/RecognizeImageStyleResult.h> #include <json/json.h> using namespace AlibabaCloud::Imagerecog; using namespace AlibabaCloud::Imagerecog::Model; RecognizeImageStyleResult::RecognizeImageStyleResult() : ServiceResult() {} RecognizeImageStyleResult::RecognizeImageStyleResult(const std::string &payload) : ServiceResult() { parse(payload); } RecognizeImageStyleResult::~RecognizeImageStyleResult() {} void RecognizeImageStyleResult::parse(const std::string &payload) { Json::Reader reader; Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); auto dataNode = value["Data"]; auto allStyles = dataNode["Styles"]["Style"]; for (auto value : allStyles) data_.styles.push_back(value.asString()); } RecognizeImageStyleResult::Data RecognizeImageStyleResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/src/model/RecognizeImageStyleResult.cc
C++
apache-2.0
1,514
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imagerecog/model/RecognizeLogoRequest.h> using AlibabaCloud::Imagerecog::Model::RecognizeLogoRequest; RecognizeLogoRequest::RecognizeLogoRequest() : RpcServiceRequest("imagerecog", "2019-09-30", "RecognizeLogo") { setMethod(HttpRequest::Method::Post); } RecognizeLogoRequest::~RecognizeLogoRequest() {} std::vector<RecognizeLogoRequest::Tasks> RecognizeLogoRequest::getTasks()const { return tasks_; } void RecognizeLogoRequest::setTasks(const std::vector<Tasks>& tasks) { tasks_ = tasks; for(int dep1 = 0; dep1!= tasks.size(); dep1++) { auto tasksObj = tasks.at(dep1); std::string tasksObjStr = "Tasks." + std::to_string(dep1 + 1); setParameter(tasksObjStr + ".ImageURL", tasksObj.imageURL); } }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/src/model/RecognizeLogoRequest.cc
C++
apache-2.0
1,381
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imagerecog/model/RecognizeLogoResult.h> #include <json/json.h> using namespace AlibabaCloud::Imagerecog; using namespace AlibabaCloud::Imagerecog::Model; RecognizeLogoResult::RecognizeLogoResult() : ServiceResult() {} RecognizeLogoResult::RecognizeLogoResult(const std::string &payload) : ServiceResult() { parse(payload); } RecognizeLogoResult::~RecognizeLogoResult() {} void RecognizeLogoResult::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["TaskId"].isNull()) elementObject.taskId = dataNodeElementsElement["TaskId"].asString(); if(!dataNodeElementsElement["ImageURL"].isNull()) elementObject.imageURL = dataNodeElementsElement["ImageURL"].asString(); auto allResultsNode = dataNodeElementsElement["Results"]["Result"]; for (auto dataNodeElementsElementResultsResult : allResultsNode) { Data::Element::Result resultsObject; if(!dataNodeElementsElementResultsResult["Label"].isNull()) resultsObject.label = dataNodeElementsElementResultsResult["Label"].asString(); if(!dataNodeElementsElementResultsResult["Suggestion"].isNull()) resultsObject.suggestion = dataNodeElementsElementResultsResult["Suggestion"].asString(); if(!dataNodeElementsElementResultsResult["Rate"].isNull()) resultsObject.rate = std::stof(dataNodeElementsElementResultsResult["Rate"].asString()); auto allLogosDataNode = dataNodeElementsElementResultsResult["LogosData"]["LogoData"]; for (auto dataNodeElementsElementResultsResultLogosDataLogoData : allLogosDataNode) { Data::Element::Result::LogoData logosDataObject; if(!dataNodeElementsElementResultsResultLogosDataLogoData["Name"].isNull()) logosDataObject.name = dataNodeElementsElementResultsResultLogosDataLogoData["Name"].asString(); if(!dataNodeElementsElementResultsResultLogosDataLogoData["Type"].isNull()) logosDataObject.type = dataNodeElementsElementResultsResultLogosDataLogoData["Type"].asString(); if(!dataNodeElementsElementResultsResultLogosDataLogoData["X"].isNull()) logosDataObject.x = std::stof(dataNodeElementsElementResultsResultLogosDataLogoData["X"].asString()); if(!dataNodeElementsElementResultsResultLogosDataLogoData["Y"].isNull()) logosDataObject.y = std::stof(dataNodeElementsElementResultsResultLogosDataLogoData["Y"].asString()); if(!dataNodeElementsElementResultsResultLogosDataLogoData["H"].isNull()) logosDataObject.h = std::stof(dataNodeElementsElementResultsResultLogosDataLogoData["H"].asString()); if(!dataNodeElementsElementResultsResultLogosDataLogoData["W"].isNull()) logosDataObject.w = std::stof(dataNodeElementsElementResultsResultLogosDataLogoData["W"].asString()); resultsObject.logosData.push_back(logosDataObject); } elementObject.results.push_back(resultsObject); } data_.elements.push_back(elementObject); } } RecognizeLogoResult::Data RecognizeLogoResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/src/model/RecognizeLogoResult.cc
C++
apache-2.0
3,867
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imagerecog/model/RecognizeSceneRequest.h> using AlibabaCloud::Imagerecog::Model::RecognizeSceneRequest; RecognizeSceneRequest::RecognizeSceneRequest() : RpcServiceRequest("imagerecog", "2019-09-30", "RecognizeScene") { setMethod(HttpRequest::Method::Post); } RecognizeSceneRequest::~RecognizeSceneRequest() {} int RecognizeSceneRequest::getImageType()const { return imageType_; } void RecognizeSceneRequest::setImageType(int imageType) { imageType_ = imageType; setBodyParameter("ImageType", std::to_string(imageType)); } std::string RecognizeSceneRequest::getImageURL()const { return imageURL_; } void RecognizeSceneRequest::setImageURL(const std::string& imageURL) { imageURL_ = imageURL; setBodyParameter("ImageURL", imageURL); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/src/model/RecognizeSceneRequest.cc
C++
apache-2.0
1,424
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imagerecog/model/RecognizeSceneResult.h> #include <json/json.h> using namespace AlibabaCloud::Imagerecog; using namespace AlibabaCloud::Imagerecog::Model; RecognizeSceneResult::RecognizeSceneResult() : ServiceResult() {} RecognizeSceneResult::RecognizeSceneResult(const std::string &payload) : ServiceResult() { parse(payload); } RecognizeSceneResult::~RecognizeSceneResult() {} void RecognizeSceneResult::parse(const std::string &payload) { Json::Reader reader; Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); auto dataNode = value["Data"]; auto allTagsNode = dataNode["Tags"]["Tag"]; for (auto dataNodeTagsTag : allTagsNode) { Data::Tag tagObject; if(!dataNodeTagsTag["Confidence"].isNull()) tagObject.confidence = std::stof(dataNodeTagsTag["Confidence"].asString()); if(!dataNodeTagsTag["Value"].isNull()) tagObject.value = dataNodeTagsTag["Value"].asString(); data_.tags.push_back(tagObject); } } RecognizeSceneResult::Data RecognizeSceneResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/src/model/RecognizeSceneResult.cc
C++
apache-2.0
1,715
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imagerecog/model/RecognizeVehicleTypeRequest.h> using AlibabaCloud::Imagerecog::Model::RecognizeVehicleTypeRequest; RecognizeVehicleTypeRequest::RecognizeVehicleTypeRequest() : RpcServiceRequest("imagerecog", "2019-09-30", "RecognizeVehicleType") { setMethod(HttpRequest::Method::Post); } RecognizeVehicleTypeRequest::~RecognizeVehicleTypeRequest() {} std::string RecognizeVehicleTypeRequest::getImageURL()const { return imageURL_; } void RecognizeVehicleTypeRequest::setImageURL(const std::string& imageURL) { imageURL_ = imageURL; setBodyParameter("ImageURL", imageURL); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/src/model/RecognizeVehicleTypeRequest.cc
C++
apache-2.0
1,250
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imagerecog/model/RecognizeVehicleTypeResult.h> #include <json/json.h> using namespace AlibabaCloud::Imagerecog; using namespace AlibabaCloud::Imagerecog::Model; RecognizeVehicleTypeResult::RecognizeVehicleTypeResult() : ServiceResult() {} RecognizeVehicleTypeResult::RecognizeVehicleTypeResult(const std::string &payload) : ServiceResult() { parse(payload); } RecognizeVehicleTypeResult::~RecognizeVehicleTypeResult() {} void RecognizeVehicleTypeResult::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["Threshold"].isNull()) data_.threshold = std::stof(dataNode["Threshold"].asString()); auto allElementsNode = dataNode["Elements"]["Element"]; for (auto dataNodeElementsElement : allElementsNode) { Data::Element elementObject; if(!dataNodeElementsElement["Name"].isNull()) elementObject.name = dataNodeElementsElement["Name"].asString(); if(!dataNodeElementsElement["Score"].isNull()) elementObject.score = std::stof(dataNodeElementsElement["Score"].asString()); data_.elements.push_back(elementObject); } } RecognizeVehicleTypeResult::Data RecognizeVehicleTypeResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/src/model/RecognizeVehicleTypeResult.cc
C++
apache-2.0
1,939
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imagerecog/model/TaggingImageRequest.h> using AlibabaCloud::Imagerecog::Model::TaggingImageRequest; TaggingImageRequest::TaggingImageRequest() : RpcServiceRequest("imagerecog", "2019-09-30", "TaggingImage") { setMethod(HttpRequest::Method::Post); } TaggingImageRequest::~TaggingImageRequest() {} int TaggingImageRequest::getImageType()const { return imageType_; } void TaggingImageRequest::setImageType(int imageType) { imageType_ = imageType; setBodyParameter("ImageType", std::to_string(imageType)); } std::string TaggingImageRequest::getImageURL()const { return imageURL_; } void TaggingImageRequest::setImageURL(const std::string& imageURL) { imageURL_ = imageURL; setBodyParameter("ImageURL", imageURL); }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/src/model/TaggingImageRequest.cc
C++
apache-2.0
1,402
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <alibabacloud/imagerecog/model/TaggingImageResult.h> #include <json/json.h> using namespace AlibabaCloud::Imagerecog; using namespace AlibabaCloud::Imagerecog::Model; TaggingImageResult::TaggingImageResult() : ServiceResult() {} TaggingImageResult::TaggingImageResult(const std::string &payload) : ServiceResult() { parse(payload); } TaggingImageResult::~TaggingImageResult() {} void TaggingImageResult::parse(const std::string &payload) { Json::Reader reader; Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); auto dataNode = value["Data"]; auto allTagsNode = dataNode["Tags"]["Tag"]; for (auto dataNodeTagsTag : allTagsNode) { Data::Tag tagObject; if(!dataNodeTagsTag["Confidence"].isNull()) tagObject.confidence = std::stof(dataNodeTagsTag["Confidence"].asString()); if(!dataNodeTagsTag["Value"].isNull()) tagObject.value = dataNodeTagsTag["Value"].asString(); data_.tags.push_back(tagObject); } } TaggingImageResult::Data TaggingImageResult::getData()const { return data_; }
YifuLiu/AliOS-Things
components/ucloud_ai/src/model/aliyun-openapi/imagerecog/src/model/TaggingImageResult.cc
C++
apache-2.0
1,695