From ad02a0003670f8e9417c4e5c6e4291ab196e86f9 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 21 Apr 2020 10:51:59 +0800 Subject: [PATCH] Supported PackageDesign Apis. --- CHANGELOG | 7 + VERSION | 2 +- ivpd/CMakeLists.txt | 16 ++ ivpd/include/alibabacloud/ivpd/IvpdClient.h | 32 ++++ .../ivpd/model/GetRenderResultRequest.h | 48 ++++++ .../ivpd/model/GetRenderResultResult.h | 67 ++++++++ .../ListPackageDesignModelTypesRequest.h | 45 ++++++ .../model/ListPackageDesignModelTypesResult.h | 68 +++++++++ .../PreviewModelForPackageDesignRequest.h | 69 +++++++++ .../PreviewModelForPackageDesignResult.h | 59 +++++++ .../RenderImageForPackageDesignRequest.h | 78 ++++++++++ .../model/RenderImageForPackageDesignResult.h | 59 +++++++ ivpd/src/IvpdClient.cc | 144 ++++++++++++++++++ ivpd/src/model/GetRenderResultRequest.cc | 40 +++++ ivpd/src/model/GetRenderResultResult.cc | 75 +++++++++ .../ListPackageDesignModelTypesRequest.cc | 29 ++++ .../ListPackageDesignModelTypesResult.cc | 80 ++++++++++ .../PreviewModelForPackageDesignRequest.cc | 100 ++++++++++++ .../PreviewModelForPackageDesignResult.cc | 66 ++++++++ .../RenderImageForPackageDesignRequest.cc | 133 ++++++++++++++++ .../RenderImageForPackageDesignResult.cc | 66 ++++++++ 21 files changed, 1282 insertions(+), 1 deletion(-) create mode 100644 ivpd/include/alibabacloud/ivpd/model/GetRenderResultRequest.h create mode 100644 ivpd/include/alibabacloud/ivpd/model/GetRenderResultResult.h create mode 100644 ivpd/include/alibabacloud/ivpd/model/ListPackageDesignModelTypesRequest.h create mode 100644 ivpd/include/alibabacloud/ivpd/model/ListPackageDesignModelTypesResult.h create mode 100644 ivpd/include/alibabacloud/ivpd/model/PreviewModelForPackageDesignRequest.h create mode 100644 ivpd/include/alibabacloud/ivpd/model/PreviewModelForPackageDesignResult.h create mode 100644 ivpd/include/alibabacloud/ivpd/model/RenderImageForPackageDesignRequest.h create mode 100644 ivpd/include/alibabacloud/ivpd/model/RenderImageForPackageDesignResult.h create mode 100644 ivpd/src/model/GetRenderResultRequest.cc create mode 100644 ivpd/src/model/GetRenderResultResult.cc create mode 100644 ivpd/src/model/ListPackageDesignModelTypesRequest.cc create mode 100644 ivpd/src/model/ListPackageDesignModelTypesResult.cc create mode 100644 ivpd/src/model/PreviewModelForPackageDesignRequest.cc create mode 100644 ivpd/src/model/PreviewModelForPackageDesignResult.cc create mode 100644 ivpd/src/model/RenderImageForPackageDesignRequest.cc create mode 100644 ivpd/src/model/RenderImageForPackageDesignResult.cc diff --git a/CHANGELOG b/CHANGELOG index 996dd004e..402d658e4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,10 @@ +2020-04-21 Version: 1.36.369 +- Supported PackageDesign Apis. +- Supported Api ListPackageDesignModelTypes. +- Supported Api PreviewModelForPackageDesign. +- Supported Api RenderImageForPackageDesign. +- Supported Api GetRenderResult. + 2020-04-21 Version: 1.36.368 - Add Statistics API. diff --git a/VERSION b/VERSION index 763768e29..5661bb465 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.368 \ No newline at end of file +1.36.369 \ No newline at end of file diff --git a/ivpd/CMakeLists.txt b/ivpd/CMakeLists.txt index 76cd686c6..1a617ba05 100644 --- a/ivpd/CMakeLists.txt +++ b/ivpd/CMakeLists.txt @@ -33,14 +33,22 @@ set(ivpd_public_header_model include/alibabacloud/ivpd/model/GetJobResultResult.h include/alibabacloud/ivpd/model/GetJobStatusRequest.h include/alibabacloud/ivpd/model/GetJobStatusResult.h + include/alibabacloud/ivpd/model/GetRenderResultRequest.h + include/alibabacloud/ivpd/model/GetRenderResultResult.h + include/alibabacloud/ivpd/model/ListPackageDesignModelTypesRequest.h + include/alibabacloud/ivpd/model/ListPackageDesignModelTypesResult.h include/alibabacloud/ivpd/model/MakeSuperResolutionImageRequest.h include/alibabacloud/ivpd/model/MakeSuperResolutionImageResult.h + include/alibabacloud/ivpd/model/PreviewModelForPackageDesignRequest.h + include/alibabacloud/ivpd/model/PreviewModelForPackageDesignResult.h include/alibabacloud/ivpd/model/RecognizeImageColorRequest.h include/alibabacloud/ivpd/model/RecognizeImageColorResult.h include/alibabacloud/ivpd/model/RecognizeImageStyleRequest.h include/alibabacloud/ivpd/model/RecognizeImageStyleResult.h include/alibabacloud/ivpd/model/RecolorImageRequest.h include/alibabacloud/ivpd/model/RecolorImageResult.h + include/alibabacloud/ivpd/model/RenderImageForPackageDesignRequest.h + include/alibabacloud/ivpd/model/RenderImageForPackageDesignResult.h include/alibabacloud/ivpd/model/SegmentBodyRequest.h include/alibabacloud/ivpd/model/SegmentBodyResult.h include/alibabacloud/ivpd/model/SegmentImageRequest.h @@ -60,14 +68,22 @@ set(ivpd_src src/model/GetJobResultResult.cc src/model/GetJobStatusRequest.cc src/model/GetJobStatusResult.cc + src/model/GetRenderResultRequest.cc + src/model/GetRenderResultResult.cc + src/model/ListPackageDesignModelTypesRequest.cc + src/model/ListPackageDesignModelTypesResult.cc src/model/MakeSuperResolutionImageRequest.cc src/model/MakeSuperResolutionImageResult.cc + src/model/PreviewModelForPackageDesignRequest.cc + src/model/PreviewModelForPackageDesignResult.cc src/model/RecognizeImageColorRequest.cc src/model/RecognizeImageColorResult.cc src/model/RecognizeImageStyleRequest.cc src/model/RecognizeImageStyleResult.cc src/model/RecolorImageRequest.cc src/model/RecolorImageResult.cc + src/model/RenderImageForPackageDesignRequest.cc + src/model/RenderImageForPackageDesignResult.cc src/model/SegmentBodyRequest.cc src/model/SegmentBodyResult.cc src/model/SegmentImageRequest.cc diff --git a/ivpd/include/alibabacloud/ivpd/IvpdClient.h b/ivpd/include/alibabacloud/ivpd/IvpdClient.h index c4122fc20..7c3bded0f 100644 --- a/ivpd/include/alibabacloud/ivpd/IvpdClient.h +++ b/ivpd/include/alibabacloud/ivpd/IvpdClient.h @@ -34,14 +34,22 @@ #include "model/GetJobResultResult.h" #include "model/GetJobStatusRequest.h" #include "model/GetJobStatusResult.h" +#include "model/GetRenderResultRequest.h" +#include "model/GetRenderResultResult.h" +#include "model/ListPackageDesignModelTypesRequest.h" +#include "model/ListPackageDesignModelTypesResult.h" #include "model/MakeSuperResolutionImageRequest.h" #include "model/MakeSuperResolutionImageResult.h" +#include "model/PreviewModelForPackageDesignRequest.h" +#include "model/PreviewModelForPackageDesignResult.h" #include "model/RecognizeImageColorRequest.h" #include "model/RecognizeImageColorResult.h" #include "model/RecognizeImageStyleRequest.h" #include "model/RecognizeImageStyleResult.h" #include "model/RecolorImageRequest.h" #include "model/RecolorImageResult.h" +#include "model/RenderImageForPackageDesignRequest.h" +#include "model/RenderImageForPackageDesignResult.h" #include "model/SegmentBodyRequest.h" #include "model/SegmentBodyResult.h" #include "model/SegmentImageRequest.h" @@ -73,9 +81,18 @@ namespace AlibabaCloud typedef Outcome GetJobStatusOutcome; typedef std::future GetJobStatusOutcomeCallable; typedef std::function&)> GetJobStatusAsyncHandler; + typedef Outcome GetRenderResultOutcome; + typedef std::future GetRenderResultOutcomeCallable; + typedef std::function&)> GetRenderResultAsyncHandler; + typedef Outcome ListPackageDesignModelTypesOutcome; + typedef std::future ListPackageDesignModelTypesOutcomeCallable; + typedef std::function&)> ListPackageDesignModelTypesAsyncHandler; typedef Outcome MakeSuperResolutionImageOutcome; typedef std::future MakeSuperResolutionImageOutcomeCallable; typedef std::function&)> MakeSuperResolutionImageAsyncHandler; + typedef Outcome PreviewModelForPackageDesignOutcome; + typedef std::future PreviewModelForPackageDesignOutcomeCallable; + typedef std::function&)> PreviewModelForPackageDesignAsyncHandler; typedef Outcome RecognizeImageColorOutcome; typedef std::future RecognizeImageColorOutcomeCallable; typedef std::function&)> RecognizeImageColorAsyncHandler; @@ -85,6 +102,9 @@ namespace AlibabaCloud typedef Outcome RecolorImageOutcome; typedef std::future RecolorImageOutcomeCallable; typedef std::function&)> RecolorImageAsyncHandler; + typedef Outcome RenderImageForPackageDesignOutcome; + typedef std::future RenderImageForPackageDesignOutcomeCallable; + typedef std::function&)> RenderImageForPackageDesignAsyncHandler; typedef Outcome SegmentBodyOutcome; typedef std::future SegmentBodyOutcomeCallable; typedef std::function&)> SegmentBodyAsyncHandler; @@ -114,9 +134,18 @@ namespace AlibabaCloud GetJobStatusOutcome getJobStatus(const Model::GetJobStatusRequest &request)const; void getJobStatusAsync(const Model::GetJobStatusRequest& request, const GetJobStatusAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetJobStatusOutcomeCallable getJobStatusCallable(const Model::GetJobStatusRequest& request) const; + GetRenderResultOutcome getRenderResult(const Model::GetRenderResultRequest &request)const; + void getRenderResultAsync(const Model::GetRenderResultRequest& request, const GetRenderResultAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetRenderResultOutcomeCallable getRenderResultCallable(const Model::GetRenderResultRequest& request) const; + ListPackageDesignModelTypesOutcome listPackageDesignModelTypes(const Model::ListPackageDesignModelTypesRequest &request)const; + void listPackageDesignModelTypesAsync(const Model::ListPackageDesignModelTypesRequest& request, const ListPackageDesignModelTypesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListPackageDesignModelTypesOutcomeCallable listPackageDesignModelTypesCallable(const Model::ListPackageDesignModelTypesRequest& request) const; MakeSuperResolutionImageOutcome makeSuperResolutionImage(const Model::MakeSuperResolutionImageRequest &request)const; void makeSuperResolutionImageAsync(const Model::MakeSuperResolutionImageRequest& request, const MakeSuperResolutionImageAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; MakeSuperResolutionImageOutcomeCallable makeSuperResolutionImageCallable(const Model::MakeSuperResolutionImageRequest& request) const; + PreviewModelForPackageDesignOutcome previewModelForPackageDesign(const Model::PreviewModelForPackageDesignRequest &request)const; + void previewModelForPackageDesignAsync(const Model::PreviewModelForPackageDesignRequest& request, const PreviewModelForPackageDesignAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + PreviewModelForPackageDesignOutcomeCallable previewModelForPackageDesignCallable(const Model::PreviewModelForPackageDesignRequest& request) const; RecognizeImageColorOutcome recognizeImageColor(const Model::RecognizeImageColorRequest &request)const; void recognizeImageColorAsync(const Model::RecognizeImageColorRequest& request, const RecognizeImageColorAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; RecognizeImageColorOutcomeCallable recognizeImageColorCallable(const Model::RecognizeImageColorRequest& request) const; @@ -126,6 +155,9 @@ namespace AlibabaCloud RecolorImageOutcome recolorImage(const Model::RecolorImageRequest &request)const; void recolorImageAsync(const Model::RecolorImageRequest& request, const RecolorImageAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; RecolorImageOutcomeCallable recolorImageCallable(const Model::RecolorImageRequest& request) const; + RenderImageForPackageDesignOutcome renderImageForPackageDesign(const Model::RenderImageForPackageDesignRequest &request)const; + void renderImageForPackageDesignAsync(const Model::RenderImageForPackageDesignRequest& request, const RenderImageForPackageDesignAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + RenderImageForPackageDesignOutcomeCallable renderImageForPackageDesignCallable(const Model::RenderImageForPackageDesignRequest& request) const; SegmentBodyOutcome segmentBody(const Model::SegmentBodyRequest &request)const; void segmentBodyAsync(const Model::SegmentBodyRequest& request, const SegmentBodyAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; SegmentBodyOutcomeCallable segmentBodyCallable(const Model::SegmentBodyRequest& request) const; diff --git a/ivpd/include/alibabacloud/ivpd/model/GetRenderResultRequest.h b/ivpd/include/alibabacloud/ivpd/model/GetRenderResultRequest.h new file mode 100644 index 000000000..9d9f17849 --- /dev/null +++ b/ivpd/include/alibabacloud/ivpd/model/GetRenderResultRequest.h @@ -0,0 +1,48 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_IVPD_MODEL_GETRENDERRESULTREQUEST_H_ +#define ALIBABACLOUD_IVPD_MODEL_GETRENDERRESULTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ivpd + { + namespace Model + { + class ALIBABACLOUD_IVPD_EXPORT GetRenderResultRequest : public RpcServiceRequest + { + + public: + GetRenderResultRequest(); + ~GetRenderResultRequest(); + + std::string getJobId()const; + void setJobId(const std::string& jobId); + + private: + std::string jobId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IVPD_MODEL_GETRENDERRESULTREQUEST_H_ \ No newline at end of file diff --git a/ivpd/include/alibabacloud/ivpd/model/GetRenderResultResult.h b/ivpd/include/alibabacloud/ivpd/model/GetRenderResultResult.h new file mode 100644 index 000000000..e0958c1b6 --- /dev/null +++ b/ivpd/include/alibabacloud/ivpd/model/GetRenderResultResult.h @@ -0,0 +1,67 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_IVPD_MODEL_GETRENDERRESULTRESULT_H_ +#define ALIBABACLOUD_IVPD_MODEL_GETRENDERRESULTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ivpd + { + namespace Model + { + class ALIBABACLOUD_IVPD_EXPORT GetRenderResultResult : public ServiceResult + { + public: + struct Data + { + struct ResultData + { + std::string imageUrl; + }; + float progress; + ResultData resultData; + std::string message; + bool completed; + std::string code; + }; + + + GetRenderResultResult(); + explicit GetRenderResultResult(const std::string &payload); + ~GetRenderResultResult(); + std::string getMessage()const; + Data getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + Data data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IVPD_MODEL_GETRENDERRESULTRESULT_H_ \ No newline at end of file diff --git a/ivpd/include/alibabacloud/ivpd/model/ListPackageDesignModelTypesRequest.h b/ivpd/include/alibabacloud/ivpd/model/ListPackageDesignModelTypesRequest.h new file mode 100644 index 000000000..9a0db1911 --- /dev/null +++ b/ivpd/include/alibabacloud/ivpd/model/ListPackageDesignModelTypesRequest.h @@ -0,0 +1,45 @@ +/* + * 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_IVPD_MODEL_LISTPACKAGEDESIGNMODELTYPESREQUEST_H_ +#define ALIBABACLOUD_IVPD_MODEL_LISTPACKAGEDESIGNMODELTYPESREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ivpd + { + namespace Model + { + class ALIBABACLOUD_IVPD_EXPORT ListPackageDesignModelTypesRequest : public RpcServiceRequest + { + + public: + ListPackageDesignModelTypesRequest(); + ~ListPackageDesignModelTypesRequest(); + + + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_IVPD_MODEL_LISTPACKAGEDESIGNMODELTYPESREQUEST_H_ \ No newline at end of file diff --git a/ivpd/include/alibabacloud/ivpd/model/ListPackageDesignModelTypesResult.h b/ivpd/include/alibabacloud/ivpd/model/ListPackageDesignModelTypesResult.h new file mode 100644 index 000000000..d928171c7 --- /dev/null +++ b/ivpd/include/alibabacloud/ivpd/model/ListPackageDesignModelTypesResult.h @@ -0,0 +1,68 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_IVPD_MODEL_LISTPACKAGEDESIGNMODELTYPESRESULT_H_ +#define ALIBABACLOUD_IVPD_MODEL_LISTPACKAGEDESIGNMODELTYPESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ivpd + { + namespace Model + { + class ALIBABACLOUD_IVPD_EXPORT ListPackageDesignModelTypesResult : public ServiceResult + { + public: + struct Data + { + struct ModelType + { + struct Element + { + std::string sideName; + }; + std::string modelType; + std::vector elements; + }; + std::vector modelTypeList; + }; + + + ListPackageDesignModelTypesResult(); + explicit ListPackageDesignModelTypesResult(const std::string &payload); + ~ListPackageDesignModelTypesResult(); + std::string getMessage()const; + Data getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + Data data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IVPD_MODEL_LISTPACKAGEDESIGNMODELTYPESRESULT_H_ \ No newline at end of file diff --git a/ivpd/include/alibabacloud/ivpd/model/PreviewModelForPackageDesignRequest.h b/ivpd/include/alibabacloud/ivpd/model/PreviewModelForPackageDesignRequest.h new file mode 100644 index 000000000..b8791e6c7 --- /dev/null +++ b/ivpd/include/alibabacloud/ivpd/model/PreviewModelForPackageDesignRequest.h @@ -0,0 +1,69 @@ +/* + * 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_IVPD_MODEL_PREVIEWMODELFORPACKAGEDESIGNREQUEST_H_ +#define ALIBABACLOUD_IVPD_MODEL_PREVIEWMODELFORPACKAGEDESIGNREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ivpd + { + namespace Model + { + class ALIBABACLOUD_IVPD_EXPORT PreviewModelForPackageDesignRequest : public RpcServiceRequest + { + public: + struct ElementList + { + std::string imageUrl; + std::string sideName; + }; + + public: + PreviewModelForPackageDesignRequest(); + ~PreviewModelForPackageDesignRequest(); + + std::string getMaterialName()const; + void setMaterialName(const std::string& materialName); + std::vector getElementList()const; + void setElementList(const std::vector& elementList); + std::string getDataId()const; + void setDataId(const std::string& dataId); + std::string getMaterialType()const; + void setMaterialType(const std::string& materialType); + std::string getModelType()const; + void setModelType(const std::string& modelType); + std::string getCategory()const; + void setCategory(const std::string& category); + + private: + std::string materialName_; + std::vector elementList_; + std::string dataId_; + std::string materialType_; + std::string modelType_; + std::string category_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IVPD_MODEL_PREVIEWMODELFORPACKAGEDESIGNREQUEST_H_ \ No newline at end of file diff --git a/ivpd/include/alibabacloud/ivpd/model/PreviewModelForPackageDesignResult.h b/ivpd/include/alibabacloud/ivpd/model/PreviewModelForPackageDesignResult.h new file mode 100644 index 000000000..dc6d50194 --- /dev/null +++ b/ivpd/include/alibabacloud/ivpd/model/PreviewModelForPackageDesignResult.h @@ -0,0 +1,59 @@ +/* + * 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_IVPD_MODEL_PREVIEWMODELFORPACKAGEDESIGNRESULT_H_ +#define ALIBABACLOUD_IVPD_MODEL_PREVIEWMODELFORPACKAGEDESIGNRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ivpd + { + namespace Model + { + class ALIBABACLOUD_IVPD_EXPORT PreviewModelForPackageDesignResult : public ServiceResult + { + public: + struct Data + { + std::string previewUrl; + }; + + + PreviewModelForPackageDesignResult(); + explicit PreviewModelForPackageDesignResult(const std::string &payload); + ~PreviewModelForPackageDesignResult(); + std::string getMessage()const; + Data getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + Data data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IVPD_MODEL_PREVIEWMODELFORPACKAGEDESIGNRESULT_H_ \ No newline at end of file diff --git a/ivpd/include/alibabacloud/ivpd/model/RenderImageForPackageDesignRequest.h b/ivpd/include/alibabacloud/ivpd/model/RenderImageForPackageDesignRequest.h new file mode 100644 index 000000000..e58f69f4d --- /dev/null +++ b/ivpd/include/alibabacloud/ivpd/model/RenderImageForPackageDesignRequest.h @@ -0,0 +1,78 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_IVPD_MODEL_RENDERIMAGEFORPACKAGEDESIGNREQUEST_H_ +#define ALIBABACLOUD_IVPD_MODEL_RENDERIMAGEFORPACKAGEDESIGNREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ivpd + { + namespace Model + { + class ALIBABACLOUD_IVPD_EXPORT RenderImageForPackageDesignRequest : public RpcServiceRequest + { + public: + struct ElementList + { + std::string imageUrl; + std::string sideName; + }; + + public: + RenderImageForPackageDesignRequest(); + ~RenderImageForPackageDesignRequest(); + + std::string getDisplayType()const; + void setDisplayType(const std::string& displayType); + std::string getMaterialName()const; + void setMaterialName(const std::string& materialName); + std::string getJobId()const; + void setJobId(const std::string& jobId); + std::string getMaterialType()const; + void setMaterialType(const std::string& materialType); + std::string getModelType()const; + void setModelType(const std::string& modelType); + int getTargetWidth()const; + void setTargetWidth(int targetWidth); + std::vector getElementList()const; + void setElementList(const std::vector& elementList); + std::string getCategory()const; + void setCategory(const std::string& category); + int getTargetHeight()const; + void setTargetHeight(int targetHeight); + + private: + std::string displayType_; + std::string materialName_; + std::string jobId_; + std::string materialType_; + std::string modelType_; + int targetWidth_; + std::vector elementList_; + std::string category_; + int targetHeight_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IVPD_MODEL_RENDERIMAGEFORPACKAGEDESIGNREQUEST_H_ \ No newline at end of file diff --git a/ivpd/include/alibabacloud/ivpd/model/RenderImageForPackageDesignResult.h b/ivpd/include/alibabacloud/ivpd/model/RenderImageForPackageDesignResult.h new file mode 100644 index 000000000..f2955ca7a --- /dev/null +++ b/ivpd/include/alibabacloud/ivpd/model/RenderImageForPackageDesignResult.h @@ -0,0 +1,59 @@ +/* + * 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_IVPD_MODEL_RENDERIMAGEFORPACKAGEDESIGNRESULT_H_ +#define ALIBABACLOUD_IVPD_MODEL_RENDERIMAGEFORPACKAGEDESIGNRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ivpd + { + namespace Model + { + class ALIBABACLOUD_IVPD_EXPORT RenderImageForPackageDesignResult : public ServiceResult + { + public: + struct Data + { + std::string jobId; + }; + + + RenderImageForPackageDesignResult(); + explicit RenderImageForPackageDesignResult(const std::string &payload); + ~RenderImageForPackageDesignResult(); + std::string getMessage()const; + Data getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + Data data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_IVPD_MODEL_RENDERIMAGEFORPACKAGEDESIGNRESULT_H_ \ No newline at end of file diff --git a/ivpd/src/IvpdClient.cc b/ivpd/src/IvpdClient.cc index 184c62364..8bbcb69b4 100644 --- a/ivpd/src/IvpdClient.cc +++ b/ivpd/src/IvpdClient.cc @@ -267,6 +267,78 @@ IvpdClient::GetJobStatusOutcomeCallable IvpdClient::getJobStatusCallable(const G return task->get_future(); } +IvpdClient::GetRenderResultOutcome IvpdClient::getRenderResult(const GetRenderResultRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetRenderResultOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetRenderResultOutcome(GetRenderResultResult(outcome.result())); + else + return GetRenderResultOutcome(outcome.error()); +} + +void IvpdClient::getRenderResultAsync(const GetRenderResultRequest& request, const GetRenderResultAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getRenderResult(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +IvpdClient::GetRenderResultOutcomeCallable IvpdClient::getRenderResultCallable(const GetRenderResultRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getRenderResult(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +IvpdClient::ListPackageDesignModelTypesOutcome IvpdClient::listPackageDesignModelTypes(const ListPackageDesignModelTypesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListPackageDesignModelTypesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListPackageDesignModelTypesOutcome(ListPackageDesignModelTypesResult(outcome.result())); + else + return ListPackageDesignModelTypesOutcome(outcome.error()); +} + +void IvpdClient::listPackageDesignModelTypesAsync(const ListPackageDesignModelTypesRequest& request, const ListPackageDesignModelTypesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listPackageDesignModelTypes(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +IvpdClient::ListPackageDesignModelTypesOutcomeCallable IvpdClient::listPackageDesignModelTypesCallable(const ListPackageDesignModelTypesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listPackageDesignModelTypes(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + IvpdClient::MakeSuperResolutionImageOutcome IvpdClient::makeSuperResolutionImage(const MakeSuperResolutionImageRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -303,6 +375,42 @@ IvpdClient::MakeSuperResolutionImageOutcomeCallable IvpdClient::makeSuperResolut return task->get_future(); } +IvpdClient::PreviewModelForPackageDesignOutcome IvpdClient::previewModelForPackageDesign(const PreviewModelForPackageDesignRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return PreviewModelForPackageDesignOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return PreviewModelForPackageDesignOutcome(PreviewModelForPackageDesignResult(outcome.result())); + else + return PreviewModelForPackageDesignOutcome(outcome.error()); +} + +void IvpdClient::previewModelForPackageDesignAsync(const PreviewModelForPackageDesignRequest& request, const PreviewModelForPackageDesignAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, previewModelForPackageDesign(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +IvpdClient::PreviewModelForPackageDesignOutcomeCallable IvpdClient::previewModelForPackageDesignCallable(const PreviewModelForPackageDesignRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->previewModelForPackageDesign(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + IvpdClient::RecognizeImageColorOutcome IvpdClient::recognizeImageColor(const RecognizeImageColorRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -411,6 +519,42 @@ IvpdClient::RecolorImageOutcomeCallable IvpdClient::recolorImageCallable(const R return task->get_future(); } +IvpdClient::RenderImageForPackageDesignOutcome IvpdClient::renderImageForPackageDesign(const RenderImageForPackageDesignRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return RenderImageForPackageDesignOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return RenderImageForPackageDesignOutcome(RenderImageForPackageDesignResult(outcome.result())); + else + return RenderImageForPackageDesignOutcome(outcome.error()); +} + +void IvpdClient::renderImageForPackageDesignAsync(const RenderImageForPackageDesignRequest& request, const RenderImageForPackageDesignAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, renderImageForPackageDesign(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +IvpdClient::RenderImageForPackageDesignOutcomeCallable IvpdClient::renderImageForPackageDesignCallable(const RenderImageForPackageDesignRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->renderImageForPackageDesign(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + IvpdClient::SegmentBodyOutcome IvpdClient::segmentBody(const SegmentBodyRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/ivpd/src/model/GetRenderResultRequest.cc b/ivpd/src/model/GetRenderResultRequest.cc new file mode 100644 index 000000000..86e97eb9f --- /dev/null +++ b/ivpd/src/model/GetRenderResultRequest.cc @@ -0,0 +1,40 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ivpd::Model::GetRenderResultRequest; + +GetRenderResultRequest::GetRenderResultRequest() : + RpcServiceRequest("ivpd", "2019-06-25", "GetRenderResult") +{ + setMethod(HttpRequest::Method::Post); +} + +GetRenderResultRequest::~GetRenderResultRequest() +{} + +std::string GetRenderResultRequest::getJobId()const +{ + return jobId_; +} + +void GetRenderResultRequest::setJobId(const std::string& jobId) +{ + jobId_ = jobId; + setBodyParameter("JobId", jobId); +} + diff --git a/ivpd/src/model/GetRenderResultResult.cc b/ivpd/src/model/GetRenderResultResult.cc new file mode 100644 index 000000000..c1acef96e --- /dev/null +++ b/ivpd/src/model/GetRenderResultResult.cc @@ -0,0 +1,75 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ivpd; +using namespace AlibabaCloud::Ivpd::Model; + +GetRenderResultResult::GetRenderResultResult() : + ServiceResult() +{} + +GetRenderResultResult::GetRenderResultResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetRenderResultResult::~GetRenderResultResult() +{} + +void GetRenderResultResult::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["Completed"].isNull()) + data_.completed = dataNode["Completed"].asString() == "true"; + if(!dataNode["Progress"].isNull()) + data_.progress = std::stof(dataNode["Progress"].asString()); + if(!dataNode["Code"].isNull()) + data_.code = dataNode["Code"].asString(); + if(!dataNode["Message"].isNull()) + data_.message = dataNode["Message"].asString(); + auto resultDataNode = dataNode["ResultData"]; + if(!resultDataNode["ImageUrl"].isNull()) + data_.resultData.imageUrl = resultDataNode["ImageUrl"].asString(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string GetRenderResultResult::getMessage()const +{ + return message_; +} + +GetRenderResultResult::Data GetRenderResultResult::getData()const +{ + return data_; +} + +std::string GetRenderResultResult::getCode()const +{ + return code_; +} + diff --git a/ivpd/src/model/ListPackageDesignModelTypesRequest.cc b/ivpd/src/model/ListPackageDesignModelTypesRequest.cc new file mode 100644 index 000000000..e0eb1c0bf --- /dev/null +++ b/ivpd/src/model/ListPackageDesignModelTypesRequest.cc @@ -0,0 +1,29 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ivpd::Model::ListPackageDesignModelTypesRequest; + +ListPackageDesignModelTypesRequest::ListPackageDesignModelTypesRequest() : + RpcServiceRequest("ivpd", "2019-06-25", "ListPackageDesignModelTypes") +{ + setMethod(HttpRequest::Method::Post); +} + +ListPackageDesignModelTypesRequest::~ListPackageDesignModelTypesRequest() +{} + diff --git a/ivpd/src/model/ListPackageDesignModelTypesResult.cc b/ivpd/src/model/ListPackageDesignModelTypesResult.cc new file mode 100644 index 000000000..3dc5db1ce --- /dev/null +++ b/ivpd/src/model/ListPackageDesignModelTypesResult.cc @@ -0,0 +1,80 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ivpd; +using namespace AlibabaCloud::Ivpd::Model; + +ListPackageDesignModelTypesResult::ListPackageDesignModelTypesResult() : + ServiceResult() +{} + +ListPackageDesignModelTypesResult::ListPackageDesignModelTypesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListPackageDesignModelTypesResult::~ListPackageDesignModelTypesResult() +{} + +void ListPackageDesignModelTypesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + auto allModelTypeListNode = dataNode["ModelTypeList"]["ModelType"]; + for (auto dataNodeModelTypeListModelType : allModelTypeListNode) + { + Data::ModelType modelTypeObject; + if(!dataNodeModelTypeListModelType["ModelType"].isNull()) + modelTypeObject.modelType = dataNodeModelTypeListModelType["ModelType"].asString(); + auto allElementsNode = allModelTypeListNode["Elements"]["Element"]; + for (auto allModelTypeListNodeElementsElement : allElementsNode) + { + Data::ModelType::Element elementsObject; + if(!allModelTypeListNodeElementsElement["SideName"].isNull()) + elementsObject.sideName = allModelTypeListNodeElementsElement["SideName"].asString(); + modelTypeObject.elements.push_back(elementsObject); + } + data_.modelTypeList.push_back(modelTypeObject); + } + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string ListPackageDesignModelTypesResult::getMessage()const +{ + return message_; +} + +ListPackageDesignModelTypesResult::Data ListPackageDesignModelTypesResult::getData()const +{ + return data_; +} + +std::string ListPackageDesignModelTypesResult::getCode()const +{ + return code_; +} + diff --git a/ivpd/src/model/PreviewModelForPackageDesignRequest.cc b/ivpd/src/model/PreviewModelForPackageDesignRequest.cc new file mode 100644 index 000000000..753183595 --- /dev/null +++ b/ivpd/src/model/PreviewModelForPackageDesignRequest.cc @@ -0,0 +1,100 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ivpd::Model::PreviewModelForPackageDesignRequest; + +PreviewModelForPackageDesignRequest::PreviewModelForPackageDesignRequest() : + RpcServiceRequest("ivpd", "2019-06-25", "PreviewModelForPackageDesign") +{ + setMethod(HttpRequest::Method::Post); +} + +PreviewModelForPackageDesignRequest::~PreviewModelForPackageDesignRequest() +{} + +std::string PreviewModelForPackageDesignRequest::getMaterialName()const +{ + return materialName_; +} + +void PreviewModelForPackageDesignRequest::setMaterialName(const std::string& materialName) +{ + materialName_ = materialName; + setBodyParameter("MaterialName", materialName); +} + +std::vector PreviewModelForPackageDesignRequest::getElementList()const +{ + return elementList_; +} + +void PreviewModelForPackageDesignRequest::setElementList(const std::vector& elementList) +{ + elementList_ = elementList; + for(int dep1 = 0; dep1!= elementList.size(); dep1++) { + auto elementListObj = elementList.at(dep1); + std::string elementListObjStr = "ElementList." + std::to_string(dep1 + 1); + setParameter(elementListObjStr + ".ImageUrl", elementListObj.imageUrl); + setParameter(elementListObjStr + ".SideName", elementListObj.sideName); + } +} + +std::string PreviewModelForPackageDesignRequest::getDataId()const +{ + return dataId_; +} + +void PreviewModelForPackageDesignRequest::setDataId(const std::string& dataId) +{ + dataId_ = dataId; + setBodyParameter("DataId", dataId); +} + +std::string PreviewModelForPackageDesignRequest::getMaterialType()const +{ + return materialType_; +} + +void PreviewModelForPackageDesignRequest::setMaterialType(const std::string& materialType) +{ + materialType_ = materialType; + setBodyParameter("MaterialType", materialType); +} + +std::string PreviewModelForPackageDesignRequest::getModelType()const +{ + return modelType_; +} + +void PreviewModelForPackageDesignRequest::setModelType(const std::string& modelType) +{ + modelType_ = modelType; + setBodyParameter("ModelType", modelType); +} + +std::string PreviewModelForPackageDesignRequest::getCategory()const +{ + return category_; +} + +void PreviewModelForPackageDesignRequest::setCategory(const std::string& category) +{ + category_ = category; + setBodyParameter("Category", category); +} + diff --git a/ivpd/src/model/PreviewModelForPackageDesignResult.cc b/ivpd/src/model/PreviewModelForPackageDesignResult.cc new file mode 100644 index 000000000..7620accd1 --- /dev/null +++ b/ivpd/src/model/PreviewModelForPackageDesignResult.cc @@ -0,0 +1,66 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ivpd; +using namespace AlibabaCloud::Ivpd::Model; + +PreviewModelForPackageDesignResult::PreviewModelForPackageDesignResult() : + ServiceResult() +{} + +PreviewModelForPackageDesignResult::PreviewModelForPackageDesignResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +PreviewModelForPackageDesignResult::~PreviewModelForPackageDesignResult() +{} + +void PreviewModelForPackageDesignResult::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["PreviewUrl"].isNull()) + data_.previewUrl = dataNode["PreviewUrl"].asString(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string PreviewModelForPackageDesignResult::getMessage()const +{ + return message_; +} + +PreviewModelForPackageDesignResult::Data PreviewModelForPackageDesignResult::getData()const +{ + return data_; +} + +std::string PreviewModelForPackageDesignResult::getCode()const +{ + return code_; +} + diff --git a/ivpd/src/model/RenderImageForPackageDesignRequest.cc b/ivpd/src/model/RenderImageForPackageDesignRequest.cc new file mode 100644 index 000000000..05cbef793 --- /dev/null +++ b/ivpd/src/model/RenderImageForPackageDesignRequest.cc @@ -0,0 +1,133 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Ivpd::Model::RenderImageForPackageDesignRequest; + +RenderImageForPackageDesignRequest::RenderImageForPackageDesignRequest() : + RpcServiceRequest("ivpd", "2019-06-25", "RenderImageForPackageDesign") +{ + setMethod(HttpRequest::Method::Post); +} + +RenderImageForPackageDesignRequest::~RenderImageForPackageDesignRequest() +{} + +std::string RenderImageForPackageDesignRequest::getDisplayType()const +{ + return displayType_; +} + +void RenderImageForPackageDesignRequest::setDisplayType(const std::string& displayType) +{ + displayType_ = displayType; + setBodyParameter("DisplayType", displayType); +} + +std::string RenderImageForPackageDesignRequest::getMaterialName()const +{ + return materialName_; +} + +void RenderImageForPackageDesignRequest::setMaterialName(const std::string& materialName) +{ + materialName_ = materialName; + setBodyParameter("MaterialName", materialName); +} + +std::string RenderImageForPackageDesignRequest::getJobId()const +{ + return jobId_; +} + +void RenderImageForPackageDesignRequest::setJobId(const std::string& jobId) +{ + jobId_ = jobId; + setBodyParameter("JobId", jobId); +} + +std::string RenderImageForPackageDesignRequest::getMaterialType()const +{ + return materialType_; +} + +void RenderImageForPackageDesignRequest::setMaterialType(const std::string& materialType) +{ + materialType_ = materialType; + setBodyParameter("MaterialType", materialType); +} + +std::string RenderImageForPackageDesignRequest::getModelType()const +{ + return modelType_; +} + +void RenderImageForPackageDesignRequest::setModelType(const std::string& modelType) +{ + modelType_ = modelType; + setBodyParameter("ModelType", modelType); +} + +int RenderImageForPackageDesignRequest::getTargetWidth()const +{ + return targetWidth_; +} + +void RenderImageForPackageDesignRequest::setTargetWidth(int targetWidth) +{ + targetWidth_ = targetWidth; + setBodyParameter("TargetWidth", std::to_string(targetWidth)); +} + +std::vector RenderImageForPackageDesignRequest::getElementList()const +{ + return elementList_; +} + +void RenderImageForPackageDesignRequest::setElementList(const std::vector& elementList) +{ + elementList_ = elementList; + for(int dep1 = 0; dep1!= elementList.size(); dep1++) { + auto elementListObj = elementList.at(dep1); + std::string elementListObjStr = "ElementList." + std::to_string(dep1 + 1); + setParameter(elementListObjStr + ".ImageUrl", elementListObj.imageUrl); + setParameter(elementListObjStr + ".SideName", elementListObj.sideName); + } +} + +std::string RenderImageForPackageDesignRequest::getCategory()const +{ + return category_; +} + +void RenderImageForPackageDesignRequest::setCategory(const std::string& category) +{ + category_ = category; + setBodyParameter("Category", category); +} + +int RenderImageForPackageDesignRequest::getTargetHeight()const +{ + return targetHeight_; +} + +void RenderImageForPackageDesignRequest::setTargetHeight(int targetHeight) +{ + targetHeight_ = targetHeight; + setBodyParameter("TargetHeight", std::to_string(targetHeight)); +} + diff --git a/ivpd/src/model/RenderImageForPackageDesignResult.cc b/ivpd/src/model/RenderImageForPackageDesignResult.cc new file mode 100644 index 000000000..a555a48a1 --- /dev/null +++ b/ivpd/src/model/RenderImageForPackageDesignResult.cc @@ -0,0 +1,66 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Ivpd; +using namespace AlibabaCloud::Ivpd::Model; + +RenderImageForPackageDesignResult::RenderImageForPackageDesignResult() : + ServiceResult() +{} + +RenderImageForPackageDesignResult::RenderImageForPackageDesignResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +RenderImageForPackageDesignResult::~RenderImageForPackageDesignResult() +{} + +void RenderImageForPackageDesignResult::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(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string RenderImageForPackageDesignResult::getMessage()const +{ + return message_; +} + +RenderImageForPackageDesignResult::Data RenderImageForPackageDesignResult::getData()const +{ + return data_; +} + +std::string RenderImageForPackageDesignResult::getCode()const +{ + return code_; +} +