Compare commits

...

8 Commits

95 changed files with 4863 additions and 143 deletions

View File

@@ -1,3 +1,27 @@
2021-02-01 Version: patch
- Support device credential for mqtt.
2021-02-01 Version: patch
- Release GenerateHumanSketchStyle MergeImageFace AddFaceImageTemplate QueryFaceImageTemplate DeleteFaceImageTemplate.
2021-02-01 Version: patch
- Add.
2021-02-01 Version: patch
- Release GenerateHumanSketchStyle MergeImageFace AddFaceImageTemplate QueryFaceImageTemplate DeleteFaceImageTemplate.
2021-02-01 Version: patch
- Release RecognizeFood.
2021-02-01 Version: patch
- Release UnderstandVideoContent.
2021-02-01 Version: patch
- Release SegmentGreenScreenVideo.
2021-02-01 Version: patch
- Release DetectVehicleIllegalParking DetectVehicleICongestion.
2021-01-31 Version: patch
- ConvertInstance.

View File

@@ -27,6 +27,8 @@ set(facebody_public_header_model
include/alibabacloud/facebody/model/AddFaceResult.h
include/alibabacloud/facebody/model/AddFaceEntityRequest.h
include/alibabacloud/facebody/model/AddFaceEntityResult.h
include/alibabacloud/facebody/model/AddFaceImageTemplateRequest.h
include/alibabacloud/facebody/model/AddFaceImageTemplateResult.h
include/alibabacloud/facebody/model/BlurFaceRequest.h
include/alibabacloud/facebody/model/BlurFaceResult.h
include/alibabacloud/facebody/model/BodyPostureRequest.h
@@ -51,6 +53,8 @@ set(facebody_public_header_model
include/alibabacloud/facebody/model/DeleteFaceDbResult.h
include/alibabacloud/facebody/model/DeleteFaceEntityRequest.h
include/alibabacloud/facebody/model/DeleteFaceEntityResult.h
include/alibabacloud/facebody/model/DeleteFaceImageTemplateRequest.h
include/alibabacloud/facebody/model/DeleteFaceImageTemplateResult.h
include/alibabacloud/facebody/model/DetectBodyCountRequest.h
include/alibabacloud/facebody/model/DetectBodyCountResult.h
include/alibabacloud/facebody/model/DetectCelebrityRequest.h
@@ -61,6 +65,8 @@ set(facebody_public_header_model
include/alibabacloud/facebody/model/DetectFaceResult.h
include/alibabacloud/facebody/model/DetectIPCPedestrianRequest.h
include/alibabacloud/facebody/model/DetectIPCPedestrianResult.h
include/alibabacloud/facebody/model/DetectIPCPedestrianOptimizedRequest.h
include/alibabacloud/facebody/model/DetectIPCPedestrianOptimizedResult.h
include/alibabacloud/facebody/model/DetectLivingFaceRequest.h
include/alibabacloud/facebody/model/DetectLivingFaceResult.h
include/alibabacloud/facebody/model/DetectMaskRequest.h
@@ -73,6 +79,8 @@ set(facebody_public_header_model
include/alibabacloud/facebody/model/DetectVideoLivingFaceResult.h
include/alibabacloud/facebody/model/EnhanceFaceRequest.h
include/alibabacloud/facebody/model/EnhanceFaceResult.h
include/alibabacloud/facebody/model/ExecuteServerSideVerificationRequest.h
include/alibabacloud/facebody/model/ExecuteServerSideVerificationResult.h
include/alibabacloud/facebody/model/ExtractPedestrianFeatureAttrRequest.h
include/alibabacloud/facebody/model/ExtractPedestrianFeatureAttrResult.h
include/alibabacloud/facebody/model/ExtractPedestrianFeatureAttributeRequest.h
@@ -89,6 +97,8 @@ set(facebody_public_header_model
include/alibabacloud/facebody/model/GenRealPersonVerificationTokenResult.h
include/alibabacloud/facebody/model/GenerateHumanAnimeStyleRequest.h
include/alibabacloud/facebody/model/GenerateHumanAnimeStyleResult.h
include/alibabacloud/facebody/model/GenerateHumanSketchStyleRequest.h
include/alibabacloud/facebody/model/GenerateHumanSketchStyleResult.h
include/alibabacloud/facebody/model/GetBodyPersonRequest.h
include/alibabacloud/facebody/model/GetBodyPersonResult.h
include/alibabacloud/facebody/model/GetFaceEntityRequest.h
@@ -105,8 +115,12 @@ set(facebody_public_header_model
include/alibabacloud/facebody/model/ListFaceDbsResult.h
include/alibabacloud/facebody/model/ListFaceEntitiesRequest.h
include/alibabacloud/facebody/model/ListFaceEntitiesResult.h
include/alibabacloud/facebody/model/MergeImageFaceRequest.h
include/alibabacloud/facebody/model/MergeImageFaceResult.h
include/alibabacloud/facebody/model/PedestrianDetectAttributeRequest.h
include/alibabacloud/facebody/model/PedestrianDetectAttributeResult.h
include/alibabacloud/facebody/model/QueryFaceImageTemplateRequest.h
include/alibabacloud/facebody/model/QueryFaceImageTemplateResult.h
include/alibabacloud/facebody/model/RecognizeActionRequest.h
include/alibabacloud/facebody/model/RecognizeActionResult.h
include/alibabacloud/facebody/model/RecognizeExpressionRequest.h
@@ -134,6 +148,8 @@ set(facebody_src
src/model/AddFaceResult.cc
src/model/AddFaceEntityRequest.cc
src/model/AddFaceEntityResult.cc
src/model/AddFaceImageTemplateRequest.cc
src/model/AddFaceImageTemplateResult.cc
src/model/BlurFaceRequest.cc
src/model/BlurFaceResult.cc
src/model/BodyPostureRequest.cc
@@ -158,6 +174,8 @@ set(facebody_src
src/model/DeleteFaceDbResult.cc
src/model/DeleteFaceEntityRequest.cc
src/model/DeleteFaceEntityResult.cc
src/model/DeleteFaceImageTemplateRequest.cc
src/model/DeleteFaceImageTemplateResult.cc
src/model/DetectBodyCountRequest.cc
src/model/DetectBodyCountResult.cc
src/model/DetectCelebrityRequest.cc
@@ -168,6 +186,8 @@ set(facebody_src
src/model/DetectFaceResult.cc
src/model/DetectIPCPedestrianRequest.cc
src/model/DetectIPCPedestrianResult.cc
src/model/DetectIPCPedestrianOptimizedRequest.cc
src/model/DetectIPCPedestrianOptimizedResult.cc
src/model/DetectLivingFaceRequest.cc
src/model/DetectLivingFaceResult.cc
src/model/DetectMaskRequest.cc
@@ -180,6 +200,8 @@ set(facebody_src
src/model/DetectVideoLivingFaceResult.cc
src/model/EnhanceFaceRequest.cc
src/model/EnhanceFaceResult.cc
src/model/ExecuteServerSideVerificationRequest.cc
src/model/ExecuteServerSideVerificationResult.cc
src/model/ExtractPedestrianFeatureAttrRequest.cc
src/model/ExtractPedestrianFeatureAttrResult.cc
src/model/ExtractPedestrianFeatureAttributeRequest.cc
@@ -196,6 +218,8 @@ set(facebody_src
src/model/GenRealPersonVerificationTokenResult.cc
src/model/GenerateHumanAnimeStyleRequest.cc
src/model/GenerateHumanAnimeStyleResult.cc
src/model/GenerateHumanSketchStyleRequest.cc
src/model/GenerateHumanSketchStyleResult.cc
src/model/GetBodyPersonRequest.cc
src/model/GetBodyPersonResult.cc
src/model/GetFaceEntityRequest.cc
@@ -212,8 +236,12 @@ set(facebody_src
src/model/ListFaceDbsResult.cc
src/model/ListFaceEntitiesRequest.cc
src/model/ListFaceEntitiesResult.cc
src/model/MergeImageFaceRequest.cc
src/model/MergeImageFaceResult.cc
src/model/PedestrianDetectAttributeRequest.cc
src/model/PedestrianDetectAttributeResult.cc
src/model/QueryFaceImageTemplateRequest.cc
src/model/QueryFaceImageTemplateResult.cc
src/model/RecognizeActionRequest.cc
src/model/RecognizeActionResult.cc
src/model/RecognizeExpressionRequest.cc

View File

@@ -20,7 +20,7 @@
#include <future>
#include <alibabacloud/core/AsyncCallerContext.h>
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RpcServiceClient.h>
#include <alibabacloud/core/RoaServiceClient.h>
#include "FacebodyExport.h"
#include "model/AddBodyTraceRequest.h"
#include "model/AddBodyTraceResult.h"
@@ -28,6 +28,8 @@
#include "model/AddFaceResult.h"
#include "model/AddFaceEntityRequest.h"
#include "model/AddFaceEntityResult.h"
#include "model/AddFaceImageTemplateRequest.h"
#include "model/AddFaceImageTemplateResult.h"
#include "model/BlurFaceRequest.h"
#include "model/BlurFaceResult.h"
#include "model/BodyPostureRequest.h"
@@ -52,6 +54,8 @@
#include "model/DeleteFaceDbResult.h"
#include "model/DeleteFaceEntityRequest.h"
#include "model/DeleteFaceEntityResult.h"
#include "model/DeleteFaceImageTemplateRequest.h"
#include "model/DeleteFaceImageTemplateResult.h"
#include "model/DetectBodyCountRequest.h"
#include "model/DetectBodyCountResult.h"
#include "model/DetectCelebrityRequest.h"
@@ -62,6 +66,8 @@
#include "model/DetectFaceResult.h"
#include "model/DetectIPCPedestrianRequest.h"
#include "model/DetectIPCPedestrianResult.h"
#include "model/DetectIPCPedestrianOptimizedRequest.h"
#include "model/DetectIPCPedestrianOptimizedResult.h"
#include "model/DetectLivingFaceRequest.h"
#include "model/DetectLivingFaceResult.h"
#include "model/DetectMaskRequest.h"
@@ -74,6 +80,8 @@
#include "model/DetectVideoLivingFaceResult.h"
#include "model/EnhanceFaceRequest.h"
#include "model/EnhanceFaceResult.h"
#include "model/ExecuteServerSideVerificationRequest.h"
#include "model/ExecuteServerSideVerificationResult.h"
#include "model/ExtractPedestrianFeatureAttrRequest.h"
#include "model/ExtractPedestrianFeatureAttrResult.h"
#include "model/ExtractPedestrianFeatureAttributeRequest.h"
@@ -90,6 +98,8 @@
#include "model/GenRealPersonVerificationTokenResult.h"
#include "model/GenerateHumanAnimeStyleRequest.h"
#include "model/GenerateHumanAnimeStyleResult.h"
#include "model/GenerateHumanSketchStyleRequest.h"
#include "model/GenerateHumanSketchStyleResult.h"
#include "model/GetBodyPersonRequest.h"
#include "model/GetBodyPersonResult.h"
#include "model/GetFaceEntityRequest.h"
@@ -106,8 +116,12 @@
#include "model/ListFaceDbsResult.h"
#include "model/ListFaceEntitiesRequest.h"
#include "model/ListFaceEntitiesResult.h"
#include "model/MergeImageFaceRequest.h"
#include "model/MergeImageFaceResult.h"
#include "model/PedestrianDetectAttributeRequest.h"
#include "model/PedestrianDetectAttributeResult.h"
#include "model/QueryFaceImageTemplateRequest.h"
#include "model/QueryFaceImageTemplateResult.h"
#include "model/RecognizeActionRequest.h"
#include "model/RecognizeActionResult.h"
#include "model/RecognizeExpressionRequest.h"
@@ -132,7 +146,7 @@ namespace AlibabaCloud
{
namespace Facebody
{
class ALIBABACLOUD_FACEBODY_EXPORT FacebodyClient : public RpcServiceClient
class ALIBABACLOUD_FACEBODY_EXPORT FacebodyClient : public RoaServiceClient
{
public:
typedef Outcome<Error, Model::AddBodyTraceResult> AddBodyTraceOutcome;
@@ -144,6 +158,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::AddFaceEntityResult> AddFaceEntityOutcome;
typedef std::future<AddFaceEntityOutcome> AddFaceEntityOutcomeCallable;
typedef std::function<void(const FacebodyClient*, const Model::AddFaceEntityRequest&, const AddFaceEntityOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddFaceEntityAsyncHandler;
typedef Outcome<Error, Model::AddFaceImageTemplateResult> AddFaceImageTemplateOutcome;
typedef std::future<AddFaceImageTemplateOutcome> AddFaceImageTemplateOutcomeCallable;
typedef std::function<void(const FacebodyClient*, const Model::AddFaceImageTemplateRequest&, const AddFaceImageTemplateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddFaceImageTemplateAsyncHandler;
typedef Outcome<Error, Model::BlurFaceResult> BlurFaceOutcome;
typedef std::future<BlurFaceOutcome> BlurFaceOutcomeCallable;
typedef std::function<void(const FacebodyClient*, const Model::BlurFaceRequest&, const BlurFaceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BlurFaceAsyncHandler;
@@ -180,6 +197,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::DeleteFaceEntityResult> DeleteFaceEntityOutcome;
typedef std::future<DeleteFaceEntityOutcome> DeleteFaceEntityOutcomeCallable;
typedef std::function<void(const FacebodyClient*, const Model::DeleteFaceEntityRequest&, const DeleteFaceEntityOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteFaceEntityAsyncHandler;
typedef Outcome<Error, Model::DeleteFaceImageTemplateResult> DeleteFaceImageTemplateOutcome;
typedef std::future<DeleteFaceImageTemplateOutcome> DeleteFaceImageTemplateOutcomeCallable;
typedef std::function<void(const FacebodyClient*, const Model::DeleteFaceImageTemplateRequest&, const DeleteFaceImageTemplateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteFaceImageTemplateAsyncHandler;
typedef Outcome<Error, Model::DetectBodyCountResult> DetectBodyCountOutcome;
typedef std::future<DetectBodyCountOutcome> DetectBodyCountOutcomeCallable;
typedef std::function<void(const FacebodyClient*, const Model::DetectBodyCountRequest&, const DetectBodyCountOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectBodyCountAsyncHandler;
@@ -195,6 +215,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::DetectIPCPedestrianResult> DetectIPCPedestrianOutcome;
typedef std::future<DetectIPCPedestrianOutcome> DetectIPCPedestrianOutcomeCallable;
typedef std::function<void(const FacebodyClient*, const Model::DetectIPCPedestrianRequest&, const DetectIPCPedestrianOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectIPCPedestrianAsyncHandler;
typedef Outcome<Error, Model::DetectIPCPedestrianOptimizedResult> DetectIPCPedestrianOptimizedOutcome;
typedef std::future<DetectIPCPedestrianOptimizedOutcome> DetectIPCPedestrianOptimizedOutcomeCallable;
typedef std::function<void(const FacebodyClient*, const Model::DetectIPCPedestrianOptimizedRequest&, const DetectIPCPedestrianOptimizedOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectIPCPedestrianOptimizedAsyncHandler;
typedef Outcome<Error, Model::DetectLivingFaceResult> DetectLivingFaceOutcome;
typedef std::future<DetectLivingFaceOutcome> DetectLivingFaceOutcomeCallable;
typedef std::function<void(const FacebodyClient*, const Model::DetectLivingFaceRequest&, const DetectLivingFaceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectLivingFaceAsyncHandler;
@@ -213,6 +236,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::EnhanceFaceResult> EnhanceFaceOutcome;
typedef std::future<EnhanceFaceOutcome> EnhanceFaceOutcomeCallable;
typedef std::function<void(const FacebodyClient*, const Model::EnhanceFaceRequest&, const EnhanceFaceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> EnhanceFaceAsyncHandler;
typedef Outcome<Error, Model::ExecuteServerSideVerificationResult> ExecuteServerSideVerificationOutcome;
typedef std::future<ExecuteServerSideVerificationOutcome> ExecuteServerSideVerificationOutcomeCallable;
typedef std::function<void(const FacebodyClient*, const Model::ExecuteServerSideVerificationRequest&, const ExecuteServerSideVerificationOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ExecuteServerSideVerificationAsyncHandler;
typedef Outcome<Error, Model::ExtractPedestrianFeatureAttrResult> ExtractPedestrianFeatureAttrOutcome;
typedef std::future<ExtractPedestrianFeatureAttrOutcome> ExtractPedestrianFeatureAttrOutcomeCallable;
typedef std::function<void(const FacebodyClient*, const Model::ExtractPedestrianFeatureAttrRequest&, const ExtractPedestrianFeatureAttrOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ExtractPedestrianFeatureAttrAsyncHandler;
@@ -237,6 +263,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::GenerateHumanAnimeStyleResult> GenerateHumanAnimeStyleOutcome;
typedef std::future<GenerateHumanAnimeStyleOutcome> GenerateHumanAnimeStyleOutcomeCallable;
typedef std::function<void(const FacebodyClient*, const Model::GenerateHumanAnimeStyleRequest&, const GenerateHumanAnimeStyleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GenerateHumanAnimeStyleAsyncHandler;
typedef Outcome<Error, Model::GenerateHumanSketchStyleResult> GenerateHumanSketchStyleOutcome;
typedef std::future<GenerateHumanSketchStyleOutcome> GenerateHumanSketchStyleOutcomeCallable;
typedef std::function<void(const FacebodyClient*, const Model::GenerateHumanSketchStyleRequest&, const GenerateHumanSketchStyleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GenerateHumanSketchStyleAsyncHandler;
typedef Outcome<Error, Model::GetBodyPersonResult> GetBodyPersonOutcome;
typedef std::future<GetBodyPersonOutcome> GetBodyPersonOutcomeCallable;
typedef std::function<void(const FacebodyClient*, const Model::GetBodyPersonRequest&, const GetBodyPersonOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetBodyPersonAsyncHandler;
@@ -261,9 +290,15 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ListFaceEntitiesResult> ListFaceEntitiesOutcome;
typedef std::future<ListFaceEntitiesOutcome> ListFaceEntitiesOutcomeCallable;
typedef std::function<void(const FacebodyClient*, const Model::ListFaceEntitiesRequest&, const ListFaceEntitiesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListFaceEntitiesAsyncHandler;
typedef Outcome<Error, Model::MergeImageFaceResult> MergeImageFaceOutcome;
typedef std::future<MergeImageFaceOutcome> MergeImageFaceOutcomeCallable;
typedef std::function<void(const FacebodyClient*, const Model::MergeImageFaceRequest&, const MergeImageFaceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MergeImageFaceAsyncHandler;
typedef Outcome<Error, Model::PedestrianDetectAttributeResult> PedestrianDetectAttributeOutcome;
typedef std::future<PedestrianDetectAttributeOutcome> PedestrianDetectAttributeOutcomeCallable;
typedef std::function<void(const FacebodyClient*, const Model::PedestrianDetectAttributeRequest&, const PedestrianDetectAttributeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> PedestrianDetectAttributeAsyncHandler;
typedef Outcome<Error, Model::QueryFaceImageTemplateResult> QueryFaceImageTemplateOutcome;
typedef std::future<QueryFaceImageTemplateOutcome> QueryFaceImageTemplateOutcomeCallable;
typedef std::function<void(const FacebodyClient*, const Model::QueryFaceImageTemplateRequest&, const QueryFaceImageTemplateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryFaceImageTemplateAsyncHandler;
typedef Outcome<Error, Model::RecognizeActionResult> RecognizeActionOutcome;
typedef std::future<RecognizeActionOutcome> RecognizeActionOutcomeCallable;
typedef std::function<void(const FacebodyClient*, const Model::RecognizeActionRequest&, const RecognizeActionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeActionAsyncHandler;
@@ -305,6 +340,9 @@ namespace AlibabaCloud
AddFaceEntityOutcome addFaceEntity(const Model::AddFaceEntityRequest &request)const;
void addFaceEntityAsync(const Model::AddFaceEntityRequest& request, const AddFaceEntityAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
AddFaceEntityOutcomeCallable addFaceEntityCallable(const Model::AddFaceEntityRequest& request) const;
AddFaceImageTemplateOutcome addFaceImageTemplate(const Model::AddFaceImageTemplateRequest &request)const;
void addFaceImageTemplateAsync(const Model::AddFaceImageTemplateRequest& request, const AddFaceImageTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
AddFaceImageTemplateOutcomeCallable addFaceImageTemplateCallable(const Model::AddFaceImageTemplateRequest& request) const;
BlurFaceOutcome blurFace(const Model::BlurFaceRequest &request)const;
void blurFaceAsync(const Model::BlurFaceRequest& request, const BlurFaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
BlurFaceOutcomeCallable blurFaceCallable(const Model::BlurFaceRequest& request) const;
@@ -341,6 +379,9 @@ namespace AlibabaCloud
DeleteFaceEntityOutcome deleteFaceEntity(const Model::DeleteFaceEntityRequest &request)const;
void deleteFaceEntityAsync(const Model::DeleteFaceEntityRequest& request, const DeleteFaceEntityAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DeleteFaceEntityOutcomeCallable deleteFaceEntityCallable(const Model::DeleteFaceEntityRequest& request) const;
DeleteFaceImageTemplateOutcome deleteFaceImageTemplate(const Model::DeleteFaceImageTemplateRequest &request)const;
void deleteFaceImageTemplateAsync(const Model::DeleteFaceImageTemplateRequest& request, const DeleteFaceImageTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DeleteFaceImageTemplateOutcomeCallable deleteFaceImageTemplateCallable(const Model::DeleteFaceImageTemplateRequest& request) const;
DetectBodyCountOutcome detectBodyCount(const Model::DetectBodyCountRequest &request)const;
void detectBodyCountAsync(const Model::DetectBodyCountRequest& request, const DetectBodyCountAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetectBodyCountOutcomeCallable detectBodyCountCallable(const Model::DetectBodyCountRequest& request) const;
@@ -356,6 +397,9 @@ namespace AlibabaCloud
DetectIPCPedestrianOutcome detectIPCPedestrian(const Model::DetectIPCPedestrianRequest &request)const;
void detectIPCPedestrianAsync(const Model::DetectIPCPedestrianRequest& request, const DetectIPCPedestrianAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetectIPCPedestrianOutcomeCallable detectIPCPedestrianCallable(const Model::DetectIPCPedestrianRequest& request) const;
DetectIPCPedestrianOptimizedOutcome detectIPCPedestrianOptimized(const Model::DetectIPCPedestrianOptimizedRequest &request)const;
void detectIPCPedestrianOptimizedAsync(const Model::DetectIPCPedestrianOptimizedRequest& request, const DetectIPCPedestrianOptimizedAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetectIPCPedestrianOptimizedOutcomeCallable detectIPCPedestrianOptimizedCallable(const Model::DetectIPCPedestrianOptimizedRequest& request) const;
DetectLivingFaceOutcome detectLivingFace(const Model::DetectLivingFaceRequest &request)const;
void detectLivingFaceAsync(const Model::DetectLivingFaceRequest& request, const DetectLivingFaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetectLivingFaceOutcomeCallable detectLivingFaceCallable(const Model::DetectLivingFaceRequest& request) const;
@@ -374,6 +418,9 @@ namespace AlibabaCloud
EnhanceFaceOutcome enhanceFace(const Model::EnhanceFaceRequest &request)const;
void enhanceFaceAsync(const Model::EnhanceFaceRequest& request, const EnhanceFaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
EnhanceFaceOutcomeCallable enhanceFaceCallable(const Model::EnhanceFaceRequest& request) const;
ExecuteServerSideVerificationOutcome executeServerSideVerification(const Model::ExecuteServerSideVerificationRequest &request)const;
void executeServerSideVerificationAsync(const Model::ExecuteServerSideVerificationRequest& request, const ExecuteServerSideVerificationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ExecuteServerSideVerificationOutcomeCallable executeServerSideVerificationCallable(const Model::ExecuteServerSideVerificationRequest& request) const;
ExtractPedestrianFeatureAttrOutcome extractPedestrianFeatureAttr(const Model::ExtractPedestrianFeatureAttrRequest &request)const;
void extractPedestrianFeatureAttrAsync(const Model::ExtractPedestrianFeatureAttrRequest& request, const ExtractPedestrianFeatureAttrAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ExtractPedestrianFeatureAttrOutcomeCallable extractPedestrianFeatureAttrCallable(const Model::ExtractPedestrianFeatureAttrRequest& request) const;
@@ -398,6 +445,9 @@ namespace AlibabaCloud
GenerateHumanAnimeStyleOutcome generateHumanAnimeStyle(const Model::GenerateHumanAnimeStyleRequest &request)const;
void generateHumanAnimeStyleAsync(const Model::GenerateHumanAnimeStyleRequest& request, const GenerateHumanAnimeStyleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GenerateHumanAnimeStyleOutcomeCallable generateHumanAnimeStyleCallable(const Model::GenerateHumanAnimeStyleRequest& request) const;
GenerateHumanSketchStyleOutcome generateHumanSketchStyle(const Model::GenerateHumanSketchStyleRequest &request)const;
void generateHumanSketchStyleAsync(const Model::GenerateHumanSketchStyleRequest& request, const GenerateHumanSketchStyleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GenerateHumanSketchStyleOutcomeCallable generateHumanSketchStyleCallable(const Model::GenerateHumanSketchStyleRequest& request) const;
GetBodyPersonOutcome getBodyPerson(const Model::GetBodyPersonRequest &request)const;
void getBodyPersonAsync(const Model::GetBodyPersonRequest& request, const GetBodyPersonAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetBodyPersonOutcomeCallable getBodyPersonCallable(const Model::GetBodyPersonRequest& request) const;
@@ -422,9 +472,15 @@ namespace AlibabaCloud
ListFaceEntitiesOutcome listFaceEntities(const Model::ListFaceEntitiesRequest &request)const;
void listFaceEntitiesAsync(const Model::ListFaceEntitiesRequest& request, const ListFaceEntitiesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListFaceEntitiesOutcomeCallable listFaceEntitiesCallable(const Model::ListFaceEntitiesRequest& request) const;
MergeImageFaceOutcome mergeImageFace(const Model::MergeImageFaceRequest &request)const;
void mergeImageFaceAsync(const Model::MergeImageFaceRequest& request, const MergeImageFaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MergeImageFaceOutcomeCallable mergeImageFaceCallable(const Model::MergeImageFaceRequest& request) const;
PedestrianDetectAttributeOutcome pedestrianDetectAttribute(const Model::PedestrianDetectAttributeRequest &request)const;
void pedestrianDetectAttributeAsync(const Model::PedestrianDetectAttributeRequest& request, const PedestrianDetectAttributeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
PedestrianDetectAttributeOutcomeCallable pedestrianDetectAttributeCallable(const Model::PedestrianDetectAttributeRequest& request) const;
QueryFaceImageTemplateOutcome queryFaceImageTemplate(const Model::QueryFaceImageTemplateRequest &request)const;
void queryFaceImageTemplateAsync(const Model::QueryFaceImageTemplateRequest& request, const QueryFaceImageTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
QueryFaceImageTemplateOutcomeCallable queryFaceImageTemplateCallable(const Model::QueryFaceImageTemplateRequest& request) const;
RecognizeActionOutcome recognizeAction(const Model::RecognizeActionRequest &request)const;
void recognizeActionAsync(const Model::RecognizeActionRequest& request, const RecognizeActionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecognizeActionOutcomeCallable recognizeActionCallable(const Model::RecognizeActionRequest& request) const;

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_FACEBODY_MODEL_ADDFACEIMAGETEMPLATEREQUEST_H_
#define ALIBABACLOUD_FACEBODY_MODEL_ADDFACEIMAGETEMPLATEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/facebody/FacebodyExport.h>
namespace AlibabaCloud
{
namespace Facebody
{
namespace Model
{
class ALIBABACLOUD_FACEBODY_EXPORT AddFaceImageTemplateRequest : public RpcServiceRequest
{
public:
AddFaceImageTemplateRequest();
~AddFaceImageTemplateRequest();
std::string getUserId()const;
void setUserId(const std::string& userId);
std::string getImageURL()const;
void setImageURL(const std::string& imageURL);
private:
std::string userId_;
std::string imageURL_;
};
}
}
}
#endif // !ALIBABACLOUD_FACEBODY_MODEL_ADDFACEIMAGETEMPLATEREQUEST_H_

View File

@@ -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_FACEBODY_MODEL_ADDFACEIMAGETEMPLATERESULT_H_
#define ALIBABACLOUD_FACEBODY_MODEL_ADDFACEIMAGETEMPLATERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/facebody/FacebodyExport.h>
namespace AlibabaCloud
{
namespace Facebody
{
namespace Model
{
class ALIBABACLOUD_FACEBODY_EXPORT AddFaceImageTemplateResult : public ServiceResult
{
public:
struct Data
{
std::string templateId;
};
AddFaceImageTemplateResult();
explicit AddFaceImageTemplateResult(const std::string &payload);
~AddFaceImageTemplateResult();
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_FACEBODY_MODEL_ADDFACEIMAGETEMPLATERESULT_H_

View File

@@ -35,17 +35,17 @@ namespace AlibabaCloud
CompareFaceRequest();
~CompareFaceRequest();
int getImageType()const;
void setImageType(int imageType);
std::string getImageURLB()const;
void setImageURLB(const std::string& imageURLB);
std::string getImageURLA()const;
void setImageURLA(const std::string& imageURLA);
int getImageType()const;
void setImageType(int imageType);
private:
int imageType_;
std::string imageURLB_;
std::string imageURLA_;
int imageType_;
};
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_FACEBODY_MODEL_DELETEFACEIMAGETEMPLATEREQUEST_H_
#define ALIBABACLOUD_FACEBODY_MODEL_DELETEFACEIMAGETEMPLATEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/facebody/FacebodyExport.h>
namespace AlibabaCloud
{
namespace Facebody
{
namespace Model
{
class ALIBABACLOUD_FACEBODY_EXPORT DeleteFaceImageTemplateRequest : public RpcServiceRequest
{
public:
DeleteFaceImageTemplateRequest();
~DeleteFaceImageTemplateRequest();
std::string getUserId()const;
void setUserId(const std::string& userId);
std::string getTemplateId()const;
void setTemplateId(const std::string& templateId);
private:
std::string userId_;
std::string templateId_;
};
}
}
}
#endif // !ALIBABACLOUD_FACEBODY_MODEL_DELETEFACEIMAGETEMPLATEREQUEST_H_

View File

@@ -0,0 +1,53 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_FACEBODY_MODEL_DELETEFACEIMAGETEMPLATERESULT_H_
#define ALIBABACLOUD_FACEBODY_MODEL_DELETEFACEIMAGETEMPLATERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/facebody/FacebodyExport.h>
namespace AlibabaCloud
{
namespace Facebody
{
namespace Model
{
class ALIBABACLOUD_FACEBODY_EXPORT DeleteFaceImageTemplateResult : public ServiceResult
{
public:
DeleteFaceImageTemplateResult();
explicit DeleteFaceImageTemplateResult(const std::string &payload);
~DeleteFaceImageTemplateResult();
std::string getMessage()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_FACEBODY_MODEL_DELETEFACEIMAGETEMPLATERESULT_H_

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_FACEBODY_MODEL_DETECTIPCPEDESTRIANOPTIMIZEDREQUEST_H_
#define ALIBABACLOUD_FACEBODY_MODEL_DETECTIPCPEDESTRIANOPTIMIZEDREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RoaServiceRequest.h>
#include <alibabacloud/facebody/FacebodyExport.h>
namespace AlibabaCloud
{
namespace Facebody
{
namespace Model
{
class ALIBABACLOUD_FACEBODY_EXPORT DetectIPCPedestrianOptimizedRequest : public RoaServiceRequest
{
public:
DetectIPCPedestrianOptimizedRequest();
~DetectIPCPedestrianOptimizedRequest();
std::string getImageData()const;
void setImageData(const std::string& imageData);
long getWidth()const;
void setWidth(long width);
long getHeight()const;
void setHeight(long height);
private:
std::string imageData_;
long width_;
long height_;
};
}
}
}
#endif // !ALIBABACLOUD_FACEBODY_MODEL_DETECTIPCPEDESTRIANOPTIMIZEDREQUEST_H_

View File

@@ -0,0 +1,64 @@
/*
* 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_FACEBODY_MODEL_DETECTIPCPEDESTRIANOPTIMIZEDRESULT_H_
#define ALIBABACLOUD_FACEBODY_MODEL_DETECTIPCPEDESTRIANOPTIMIZEDRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/facebody/FacebodyExport.h>
namespace AlibabaCloud
{
namespace Facebody
{
namespace Model
{
class ALIBABACLOUD_FACEBODY_EXPORT DetectIPCPedestrianOptimizedResult : public ServiceResult
{
public:
struct Data
{
struct ImageInfoListItem
{
struct Element
{
float score;
std::vector<std::string> boxes;
};
std::vector<ImageInfoListItem::Element> elements;
};
std::vector<ImageInfoListItem> imageInfoList;
};
DetectIPCPedestrianOptimizedResult();
explicit DetectIPCPedestrianOptimizedResult(const std::string &payload);
~DetectIPCPedestrianOptimizedResult();
Data getData()const;
protected:
void parse(const std::string &payload);
private:
Data data_;
};
}
}
}
#endif // !ALIBABACLOUD_FACEBODY_MODEL_DETECTIPCPEDESTRIANOPTIMIZEDRESULT_H_

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_FACEBODY_MODEL_EXECUTESERVERSIDEVERIFICATIONREQUEST_H_
#define ALIBABACLOUD_FACEBODY_MODEL_EXECUTESERVERSIDEVERIFICATIONREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RoaServiceRequest.h>
#include <alibabacloud/facebody/FacebodyExport.h>
namespace AlibabaCloud
{
namespace Facebody
{
namespace Model
{
class ALIBABACLOUD_FACEBODY_EXPORT ExecuteServerSideVerificationRequest : public RoaServiceRequest
{
public:
ExecuteServerSideVerificationRequest();
~ExecuteServerSideVerificationRequest();
std::string getFacialPictureData()const;
void setFacialPictureData(const std::string& facialPictureData);
std::string getSceneType()const;
void setSceneType(const std::string& sceneType);
std::string getCertificateNumber()const;
void setCertificateNumber(const std::string& certificateNumber);
std::string getCertificateName()const;
void setCertificateName(const std::string& certificateName);
std::string getFacialPictureUrl()const;
void setFacialPictureUrl(const std::string& facialPictureUrl);
private:
std::string facialPictureData_;
std::string sceneType_;
std::string certificateNumber_;
std::string certificateName_;
std::string facialPictureUrl_;
};
}
}
}
#endif // !ALIBABACLOUD_FACEBODY_MODEL_EXECUTESERVERSIDEVERIFICATIONREQUEST_H_

View File

@@ -0,0 +1,61 @@
/*
* 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_FACEBODY_MODEL_EXECUTESERVERSIDEVERIFICATIONRESULT_H_
#define ALIBABACLOUD_FACEBODY_MODEL_EXECUTESERVERSIDEVERIFICATIONRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/facebody/FacebodyExport.h>
namespace AlibabaCloud
{
namespace Facebody
{
namespace Model
{
class ALIBABACLOUD_FACEBODY_EXPORT ExecuteServerSideVerificationResult : public ServiceResult
{
public:
struct Data
{
std::string verificationToken;
bool pass;
std::string reason;
};
ExecuteServerSideVerificationResult();
explicit ExecuteServerSideVerificationResult(const std::string &payload);
~ExecuteServerSideVerificationResult();
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_FACEBODY_MODEL_EXECUTESERVERSIDEVERIFICATIONRESULT_H_

View File

@@ -39,10 +39,13 @@ namespace AlibabaCloud
void setMode(const std::string& mode);
std::string getImageURL()const;
void setImageURL(const std::string& imageURL);
std::string getServiceVersion()const;
void setServiceVersion(const std::string& serviceVersion);
private:
std::string mode_;
std::string imageURL_;
std::string serviceVersion_;
};
}

View File

@@ -37,13 +37,13 @@ namespace AlibabaCloud
std::string hair;
std::string upperType;
float upperTypeScore;
float qualityScore;
std::string lowerColor;
float qualityScore;
std::string gender;
std::string feature;
float upperColorScore;
float lowerColorScore;
float genderScore;
float lowerColorScore;
std::string objType;
float lowerTypeScore;
float hairScore;

View File

@@ -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_FACEBODY_MODEL_GENERATEHUMANSKETCHSTYLEREQUEST_H_
#define ALIBABACLOUD_FACEBODY_MODEL_GENERATEHUMANSKETCHSTYLEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/facebody/FacebodyExport.h>
namespace AlibabaCloud
{
namespace Facebody
{
namespace Model
{
class ALIBABACLOUD_FACEBODY_EXPORT GenerateHumanSketchStyleRequest : public RpcServiceRequest
{
public:
GenerateHumanSketchStyleRequest();
~GenerateHumanSketchStyleRequest();
std::string getImageURL()const;
void setImageURL(const std::string& imageURL);
private:
std::string imageURL_;
};
}
}
}
#endif // !ALIBABACLOUD_FACEBODY_MODEL_GENERATEHUMANSKETCHSTYLEREQUEST_H_

View File

@@ -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_FACEBODY_MODEL_GENERATEHUMANSKETCHSTYLERESULT_H_
#define ALIBABACLOUD_FACEBODY_MODEL_GENERATEHUMANSKETCHSTYLERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/facebody/FacebodyExport.h>
namespace AlibabaCloud
{
namespace Facebody
{
namespace Model
{
class ALIBABACLOUD_FACEBODY_EXPORT GenerateHumanSketchStyleResult : public ServiceResult
{
public:
struct Data
{
std::string imageURL;
};
GenerateHumanSketchStyleResult();
explicit GenerateHumanSketchStyleResult(const std::string &payload);
~GenerateHumanSketchStyleResult();
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_FACEBODY_MODEL_GENERATEHUMANSKETCHSTYLERESULT_H_

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_FACEBODY_MODEL_MERGEIMAGEFACEREQUEST_H_
#define ALIBABACLOUD_FACEBODY_MODEL_MERGEIMAGEFACEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/facebody/FacebodyExport.h>
namespace AlibabaCloud
{
namespace Facebody
{
namespace Model
{
class ALIBABACLOUD_FACEBODY_EXPORT MergeImageFaceRequest : public RpcServiceRequest
{
public:
MergeImageFaceRequest();
~MergeImageFaceRequest();
std::string getUserId()const;
void setUserId(const std::string& userId);
std::string getTemplateId()const;
void setTemplateId(const std::string& templateId);
std::string getImageURL()const;
void setImageURL(const std::string& imageURL);
private:
std::string userId_;
std::string templateId_;
std::string imageURL_;
};
}
}
}
#endif // !ALIBABACLOUD_FACEBODY_MODEL_MERGEIMAGEFACEREQUEST_H_

View File

@@ -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_FACEBODY_MODEL_MERGEIMAGEFACERESULT_H_
#define ALIBABACLOUD_FACEBODY_MODEL_MERGEIMAGEFACERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/facebody/FacebodyExport.h>
namespace AlibabaCloud
{
namespace Facebody
{
namespace Model
{
class ALIBABACLOUD_FACEBODY_EXPORT MergeImageFaceResult : public ServiceResult
{
public:
struct Data
{
std::string imageURL;
};
MergeImageFaceResult();
explicit MergeImageFaceResult(const std::string &payload);
~MergeImageFaceResult();
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_FACEBODY_MODEL_MERGEIMAGEFACERESULT_H_

View File

@@ -36,17 +36,27 @@ namespace AlibabaCloud
{
struct AttributesItem
{
struct Age
{
float score;
std::string name;
};
struct Backpack
{
float score;
std::string name;
};
struct Gender
struct LowerWear
{
float score;
std::string name;
};
struct ShoulderBag
{
float score;
std::string name;
};
struct Orient
{
float score;
std::string name;
};
struct LowerColor
{
float score;
std::string name;
@@ -56,6 +66,11 @@ namespace AlibabaCloud
float score;
std::string name;
};
struct UpperColor
{
float score;
std::string name;
};
struct Handbag
{
float score;
@@ -66,27 +81,7 @@ namespace AlibabaCloud
float score;
std::string name;
};
struct LowerColor
{
float score;
std::string name;
};
struct LowerWear
{
float score;
std::string name;
};
struct Orient
{
float score;
std::string name;
};
struct ShoulderBag
{
float score;
std::string name;
};
struct UpperColor
struct Gender
{
float score;
std::string name;
@@ -96,18 +91,23 @@ namespace AlibabaCloud
float score;
std::string name;
};
struct Age
{
float score;
std::string name;
};
Backpack backpack;
LowerWear lowerWear;
Orient orient;
ShoulderBag shoulderBag;
Orient orient;
LowerColor lowerColor;
Glasses glasses;
UpperColor upperColor;
Handbag handbag;
Hat hat;
Gender gender;
Age age;
UpperWear upperWear;
Age age;
};
struct BoxesItem
{

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_FACEBODY_MODEL_QUERYFACEIMAGETEMPLATEREQUEST_H_
#define ALIBABACLOUD_FACEBODY_MODEL_QUERYFACEIMAGETEMPLATEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/facebody/FacebodyExport.h>
namespace AlibabaCloud
{
namespace Facebody
{
namespace Model
{
class ALIBABACLOUD_FACEBODY_EXPORT QueryFaceImageTemplateRequest : public RpcServiceRequest
{
public:
QueryFaceImageTemplateRequest();
~QueryFaceImageTemplateRequest();
std::string getUserId()const;
void setUserId(const std::string& userId);
std::string getTemplateId()const;
void setTemplateId(const std::string& templateId);
private:
std::string userId_;
std::string templateId_;
};
}
}
}
#endif // !ALIBABACLOUD_FACEBODY_MODEL_QUERYFACEIMAGETEMPLATEREQUEST_H_

View File

@@ -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_FACEBODY_MODEL_QUERYFACEIMAGETEMPLATERESULT_H_
#define ALIBABACLOUD_FACEBODY_MODEL_QUERYFACEIMAGETEMPLATERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/facebody/FacebodyExport.h>
namespace AlibabaCloud
{
namespace Facebody
{
namespace Model
{
class ALIBABACLOUD_FACEBODY_EXPORT QueryFaceImageTemplateResult : public ServiceResult
{
public:
struct Data
{
struct ElementsItem
{
std::string templateURL;
std::string userId;
std::string createTime;
std::string updateTime;
std::string templateId;
};
std::vector<ElementsItem> elements;
};
QueryFaceImageTemplateResult();
explicit QueryFaceImageTemplateResult(const std::string &payload);
~QueryFaceImageTemplateResult();
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_FACEBODY_MODEL_QUERYFACEIMAGETEMPLATERESULT_H_

View File

@@ -28,21 +28,21 @@ namespace
}
FacebodyClient::FacebodyClient(const Credentials &credentials, const ClientConfiguration &configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
RoaServiceClient(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, "facebody");
}
FacebodyClient::FacebodyClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
RoaServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "facebody");
}
FacebodyClient::FacebodyClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
RoaServiceClient(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, "facebody");
@@ -159,6 +159,42 @@ FacebodyClient::AddFaceEntityOutcomeCallable FacebodyClient::addFaceEntityCallab
return task->get_future();
}
FacebodyClient::AddFaceImageTemplateOutcome FacebodyClient::addFaceImageTemplate(const AddFaceImageTemplateRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return AddFaceImageTemplateOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AddFaceImageTemplateOutcome(AddFaceImageTemplateResult(outcome.result()));
else
return AddFaceImageTemplateOutcome(outcome.error());
}
void FacebodyClient::addFaceImageTemplateAsync(const AddFaceImageTemplateRequest& request, const AddFaceImageTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, addFaceImageTemplate(request), context);
};
asyncExecute(new Runnable(fn));
}
FacebodyClient::AddFaceImageTemplateOutcomeCallable FacebodyClient::addFaceImageTemplateCallable(const AddFaceImageTemplateRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AddFaceImageTemplateOutcome()>>(
[this, request]()
{
return this->addFaceImageTemplate(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
FacebodyClient::BlurFaceOutcome FacebodyClient::blurFace(const BlurFaceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -591,6 +627,42 @@ FacebodyClient::DeleteFaceEntityOutcomeCallable FacebodyClient::deleteFaceEntity
return task->get_future();
}
FacebodyClient::DeleteFaceImageTemplateOutcome FacebodyClient::deleteFaceImageTemplate(const DeleteFaceImageTemplateRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteFaceImageTemplateOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteFaceImageTemplateOutcome(DeleteFaceImageTemplateResult(outcome.result()));
else
return DeleteFaceImageTemplateOutcome(outcome.error());
}
void FacebodyClient::deleteFaceImageTemplateAsync(const DeleteFaceImageTemplateRequest& request, const DeleteFaceImageTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteFaceImageTemplate(request), context);
};
asyncExecute(new Runnable(fn));
}
FacebodyClient::DeleteFaceImageTemplateOutcomeCallable FacebodyClient::deleteFaceImageTemplateCallable(const DeleteFaceImageTemplateRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteFaceImageTemplateOutcome()>>(
[this, request]()
{
return this->deleteFaceImageTemplate(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
FacebodyClient::DetectBodyCountOutcome FacebodyClient::detectBodyCount(const DetectBodyCountRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -771,6 +843,42 @@ FacebodyClient::DetectIPCPedestrianOutcomeCallable FacebodyClient::detectIPCPede
return task->get_future();
}
FacebodyClient::DetectIPCPedestrianOptimizedOutcome FacebodyClient::detectIPCPedestrianOptimized(const DetectIPCPedestrianOptimizedRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DetectIPCPedestrianOptimizedOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DetectIPCPedestrianOptimizedOutcome(DetectIPCPedestrianOptimizedResult(outcome.result()));
else
return DetectIPCPedestrianOptimizedOutcome(outcome.error());
}
void FacebodyClient::detectIPCPedestrianOptimizedAsync(const DetectIPCPedestrianOptimizedRequest& request, const DetectIPCPedestrianOptimizedAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, detectIPCPedestrianOptimized(request), context);
};
asyncExecute(new Runnable(fn));
}
FacebodyClient::DetectIPCPedestrianOptimizedOutcomeCallable FacebodyClient::detectIPCPedestrianOptimizedCallable(const DetectIPCPedestrianOptimizedRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DetectIPCPedestrianOptimizedOutcome()>>(
[this, request]()
{
return this->detectIPCPedestrianOptimized(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
FacebodyClient::DetectLivingFaceOutcome FacebodyClient::detectLivingFace(const DetectLivingFaceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -987,6 +1095,42 @@ FacebodyClient::EnhanceFaceOutcomeCallable FacebodyClient::enhanceFaceCallable(c
return task->get_future();
}
FacebodyClient::ExecuteServerSideVerificationOutcome FacebodyClient::executeServerSideVerification(const ExecuteServerSideVerificationRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ExecuteServerSideVerificationOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ExecuteServerSideVerificationOutcome(ExecuteServerSideVerificationResult(outcome.result()));
else
return ExecuteServerSideVerificationOutcome(outcome.error());
}
void FacebodyClient::executeServerSideVerificationAsync(const ExecuteServerSideVerificationRequest& request, const ExecuteServerSideVerificationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, executeServerSideVerification(request), context);
};
asyncExecute(new Runnable(fn));
}
FacebodyClient::ExecuteServerSideVerificationOutcomeCallable FacebodyClient::executeServerSideVerificationCallable(const ExecuteServerSideVerificationRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ExecuteServerSideVerificationOutcome()>>(
[this, request]()
{
return this->executeServerSideVerification(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
FacebodyClient::ExtractPedestrianFeatureAttrOutcome FacebodyClient::extractPedestrianFeatureAttr(const ExtractPedestrianFeatureAttrRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1275,6 +1419,42 @@ FacebodyClient::GenerateHumanAnimeStyleOutcomeCallable FacebodyClient::generateH
return task->get_future();
}
FacebodyClient::GenerateHumanSketchStyleOutcome FacebodyClient::generateHumanSketchStyle(const GenerateHumanSketchStyleRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GenerateHumanSketchStyleOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GenerateHumanSketchStyleOutcome(GenerateHumanSketchStyleResult(outcome.result()));
else
return GenerateHumanSketchStyleOutcome(outcome.error());
}
void FacebodyClient::generateHumanSketchStyleAsync(const GenerateHumanSketchStyleRequest& request, const GenerateHumanSketchStyleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, generateHumanSketchStyle(request), context);
};
asyncExecute(new Runnable(fn));
}
FacebodyClient::GenerateHumanSketchStyleOutcomeCallable FacebodyClient::generateHumanSketchStyleCallable(const GenerateHumanSketchStyleRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GenerateHumanSketchStyleOutcome()>>(
[this, request]()
{
return this->generateHumanSketchStyle(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
FacebodyClient::GetBodyPersonOutcome FacebodyClient::getBodyPerson(const GetBodyPersonRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1563,6 +1743,42 @@ FacebodyClient::ListFaceEntitiesOutcomeCallable FacebodyClient::listFaceEntities
return task->get_future();
}
FacebodyClient::MergeImageFaceOutcome FacebodyClient::mergeImageFace(const MergeImageFaceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MergeImageFaceOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MergeImageFaceOutcome(MergeImageFaceResult(outcome.result()));
else
return MergeImageFaceOutcome(outcome.error());
}
void FacebodyClient::mergeImageFaceAsync(const MergeImageFaceRequest& request, const MergeImageFaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, mergeImageFace(request), context);
};
asyncExecute(new Runnable(fn));
}
FacebodyClient::MergeImageFaceOutcomeCallable FacebodyClient::mergeImageFaceCallable(const MergeImageFaceRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MergeImageFaceOutcome()>>(
[this, request]()
{
return this->mergeImageFace(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
FacebodyClient::PedestrianDetectAttributeOutcome FacebodyClient::pedestrianDetectAttribute(const PedestrianDetectAttributeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1599,6 +1815,42 @@ FacebodyClient::PedestrianDetectAttributeOutcomeCallable FacebodyClient::pedestr
return task->get_future();
}
FacebodyClient::QueryFaceImageTemplateOutcome FacebodyClient::queryFaceImageTemplate(const QueryFaceImageTemplateRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return QueryFaceImageTemplateOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return QueryFaceImageTemplateOutcome(QueryFaceImageTemplateResult(outcome.result()));
else
return QueryFaceImageTemplateOutcome(outcome.error());
}
void FacebodyClient::queryFaceImageTemplateAsync(const QueryFaceImageTemplateRequest& request, const QueryFaceImageTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, queryFaceImageTemplate(request), context);
};
asyncExecute(new Runnable(fn));
}
FacebodyClient::QueryFaceImageTemplateOutcomeCallable FacebodyClient::queryFaceImageTemplateCallable(const QueryFaceImageTemplateRequest &request) const
{
auto task = std::make_shared<std::packaged_task<QueryFaceImageTemplateOutcome()>>(
[this, request]()
{
return this->queryFaceImageTemplate(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
FacebodyClient::RecognizeActionOutcome FacebodyClient::recognizeAction(const RecognizeActionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/facebody/model/AddFaceImageTemplateRequest.h>
using AlibabaCloud::Facebody::Model::AddFaceImageTemplateRequest;
AddFaceImageTemplateRequest::AddFaceImageTemplateRequest() :
RpcServiceRequest("facebody", "2019-12-30", "AddFaceImageTemplate")
{
setMethod(HttpRequest::Method::Post);
}
AddFaceImageTemplateRequest::~AddFaceImageTemplateRequest()
{}
std::string AddFaceImageTemplateRequest::getUserId()const
{
return userId_;
}
void AddFaceImageTemplateRequest::setUserId(const std::string& userId)
{
userId_ = userId;
setBodyParameter("UserId", userId);
}
std::string AddFaceImageTemplateRequest::getImageURL()const
{
return imageURL_;
}
void AddFaceImageTemplateRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -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 <alibabacloud/facebody/model/AddFaceImageTemplateResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
AddFaceImageTemplateResult::AddFaceImageTemplateResult() :
ServiceResult()
{}
AddFaceImageTemplateResult::AddFaceImageTemplateResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AddFaceImageTemplateResult::~AddFaceImageTemplateResult()
{}
void AddFaceImageTemplateResult::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["TemplateId"].isNull())
data_.templateId = dataNode["TemplateId"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
}
std::string AddFaceImageTemplateResult::getMessage()const
{
return message_;
}
AddFaceImageTemplateResult::Data AddFaceImageTemplateResult::getData()const
{
return data_;
}
std::string AddFaceImageTemplateResult::getCode()const
{
return code_;
}

View File

@@ -27,17 +27,6 @@ CompareFaceRequest::CompareFaceRequest() :
CompareFaceRequest::~CompareFaceRequest()
{}
int CompareFaceRequest::getImageType()const
{
return imageType_;
}
void CompareFaceRequest::setImageType(int imageType)
{
imageType_ = imageType;
setBodyParameter("ImageType", std::to_string(imageType));
}
std::string CompareFaceRequest::getImageURLB()const
{
return imageURLB_;
@@ -60,3 +49,14 @@ void CompareFaceRequest::setImageURLA(const std::string& imageURLA)
setBodyParameter("ImageURLA", imageURLA);
}
int CompareFaceRequest::getImageType()const
{
return imageType_;
}
void CompareFaceRequest::setImageType(int imageType)
{
imageType_ = imageType;
setBodyParameter("ImageType", std::to_string(imageType));
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/facebody/model/DeleteFaceImageTemplateRequest.h>
using AlibabaCloud::Facebody::Model::DeleteFaceImageTemplateRequest;
DeleteFaceImageTemplateRequest::DeleteFaceImageTemplateRequest() :
RpcServiceRequest("facebody", "2019-12-30", "DeleteFaceImageTemplate")
{
setMethod(HttpRequest::Method::Post);
}
DeleteFaceImageTemplateRequest::~DeleteFaceImageTemplateRequest()
{}
std::string DeleteFaceImageTemplateRequest::getUserId()const
{
return userId_;
}
void DeleteFaceImageTemplateRequest::setUserId(const std::string& userId)
{
userId_ = userId;
setBodyParameter("UserId", userId);
}
std::string DeleteFaceImageTemplateRequest::getTemplateId()const
{
return templateId_;
}
void DeleteFaceImageTemplateRequest::setTemplateId(const std::string& templateId)
{
templateId_ = templateId;
setBodyParameter("TemplateId", templateId);
}

View File

@@ -0,0 +1,58 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/facebody/model/DeleteFaceImageTemplateResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
DeleteFaceImageTemplateResult::DeleteFaceImageTemplateResult() :
ServiceResult()
{}
DeleteFaceImageTemplateResult::DeleteFaceImageTemplateResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteFaceImageTemplateResult::~DeleteFaceImageTemplateResult()
{}
void DeleteFaceImageTemplateResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
}
std::string DeleteFaceImageTemplateResult::getMessage()const
{
return message_;
}
std::string DeleteFaceImageTemplateResult::getCode()const
{
return code_;
}

View File

@@ -0,0 +1,63 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/facebody/model/DetectIPCPedestrianOptimizedRequest.h>
using AlibabaCloud::Facebody::Model::DetectIPCPedestrianOptimizedRequest;
DetectIPCPedestrianOptimizedRequest::DetectIPCPedestrianOptimizedRequest() :
RoaServiceRequest("facebody", "2020-09-10")
{
setResourcePath("/viapi/k8s/facebody/detect-ipc-pedestrian-optimized");
setMethod(HttpRequest::Method::Post);
}
DetectIPCPedestrianOptimizedRequest::~DetectIPCPedestrianOptimizedRequest()
{}
std::string DetectIPCPedestrianOptimizedRequest::getImageData()const
{
return imageData_;
}
void DetectIPCPedestrianOptimizedRequest::setImageData(const std::string& imageData)
{
imageData_ = imageData;
setBodyParameter("ImageData", imageData);
}
long DetectIPCPedestrianOptimizedRequest::getWidth()const
{
return width_;
}
void DetectIPCPedestrianOptimizedRequest::setWidth(long width)
{
width_ = width;
setBodyParameter("Width", std::to_string(width));
}
long DetectIPCPedestrianOptimizedRequest::getHeight()const
{
return height_;
}
void DetectIPCPedestrianOptimizedRequest::setHeight(long height)
{
height_ = height;
setBodyParameter("Height", std::to_string(height));
}

View File

@@ -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.
*/
#include <alibabacloud/facebody/model/DetectIPCPedestrianOptimizedResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
DetectIPCPedestrianOptimizedResult::DetectIPCPedestrianOptimizedResult() :
ServiceResult()
{}
DetectIPCPedestrianOptimizedResult::DetectIPCPedestrianOptimizedResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DetectIPCPedestrianOptimizedResult::~DetectIPCPedestrianOptimizedResult()
{}
void DetectIPCPedestrianOptimizedResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allImageInfoListNode = dataNode["ImageInfoList"]["imageInfoListItem"];
for (auto dataNodeImageInfoListimageInfoListItem : allImageInfoListNode)
{
Data::ImageInfoListItem imageInfoListItemObject;
auto allElementsNode = dataNodeImageInfoListimageInfoListItem["Elements"]["Element"];
for (auto dataNodeImageInfoListimageInfoListItemElementsElement : allElementsNode)
{
Data::ImageInfoListItem::Element elementsObject;
if(!dataNodeImageInfoListimageInfoListItemElementsElement["Score"].isNull())
elementsObject.score = std::stof(dataNodeImageInfoListimageInfoListItemElementsElement["Score"].asString());
auto allBoxes = value["Boxes"]["Box"];
for (auto value : allBoxes)
elementsObject.boxes.push_back(value.asString());
imageInfoListItemObject.elements.push_back(elementsObject);
}
data_.imageInfoList.push_back(imageInfoListItemObject);
}
}
DetectIPCPedestrianOptimizedResult::Data DetectIPCPedestrianOptimizedResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,85 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/facebody/model/ExecuteServerSideVerificationRequest.h>
using AlibabaCloud::Facebody::Model::ExecuteServerSideVerificationRequest;
ExecuteServerSideVerificationRequest::ExecuteServerSideVerificationRequest() :
RoaServiceRequest("facebody", "2020-09-10")
{
setResourcePath("/viapi/thirdparty/realperson/execServerSideVerification");
setMethod(HttpRequest::Method::Post);
}
ExecuteServerSideVerificationRequest::~ExecuteServerSideVerificationRequest()
{}
std::string ExecuteServerSideVerificationRequest::getFacialPictureData()const
{
return facialPictureData_;
}
void ExecuteServerSideVerificationRequest::setFacialPictureData(const std::string& facialPictureData)
{
facialPictureData_ = facialPictureData;
setBodyParameter("FacialPictureData", facialPictureData);
}
std::string ExecuteServerSideVerificationRequest::getSceneType()const
{
return sceneType_;
}
void ExecuteServerSideVerificationRequest::setSceneType(const std::string& sceneType)
{
sceneType_ = sceneType;
setBodyParameter("SceneType", sceneType);
}
std::string ExecuteServerSideVerificationRequest::getCertificateNumber()const
{
return certificateNumber_;
}
void ExecuteServerSideVerificationRequest::setCertificateNumber(const std::string& certificateNumber)
{
certificateNumber_ = certificateNumber;
setBodyParameter("CertificateNumber", certificateNumber);
}
std::string ExecuteServerSideVerificationRequest::getCertificateName()const
{
return certificateName_;
}
void ExecuteServerSideVerificationRequest::setCertificateName(const std::string& certificateName)
{
certificateName_ = certificateName;
setBodyParameter("CertificateName", certificateName);
}
std::string ExecuteServerSideVerificationRequest::getFacialPictureUrl()const
{
return facialPictureUrl_;
}
void ExecuteServerSideVerificationRequest::setFacialPictureUrl(const std::string& facialPictureUrl)
{
facialPictureUrl_ = facialPictureUrl;
setBodyParameter("FacialPictureUrl", facialPictureUrl);
}

View File

@@ -0,0 +1,70 @@
/*
* 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/facebody/model/ExecuteServerSideVerificationResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
ExecuteServerSideVerificationResult::ExecuteServerSideVerificationResult() :
ServiceResult()
{}
ExecuteServerSideVerificationResult::ExecuteServerSideVerificationResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ExecuteServerSideVerificationResult::~ExecuteServerSideVerificationResult()
{}
void ExecuteServerSideVerificationResult::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["VerificationToken"].isNull())
data_.verificationToken = dataNode["VerificationToken"].asString();
if(!dataNode["Pass"].isNull())
data_.pass = dataNode["Pass"].asString() == "true";
if(!dataNode["Reason"].isNull())
data_.reason = dataNode["Reason"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
}
std::string ExecuteServerSideVerificationResult::getMessage()const
{
return message_;
}
ExecuteServerSideVerificationResult::Data ExecuteServerSideVerificationResult::getData()const
{
return data_;
}
std::string ExecuteServerSideVerificationResult::getCode()const
{
return code_;
}

View File

@@ -49,3 +49,14 @@ void ExtractPedestrianFeatureAttrRequest::setImageURL(const std::string& imageUR
setBodyParameter("ImageURL", imageURL);
}
std::string ExtractPedestrianFeatureAttrRequest::getServiceVersion()const
{
return serviceVersion_;
}
void ExtractPedestrianFeatureAttrRequest::setServiceVersion(const std::string& serviceVersion)
{
serviceVersion_ = serviceVersion;
setBodyParameter("ServiceVersion", serviceVersion);
}

View File

@@ -40,42 +40,42 @@ void ExtractPedestrianFeatureAttrResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["ObjType"].isNull())
data_.objType = dataNode["ObjType"].asString();
if(!dataNode["ObjTypeScore"].isNull())
data_.objTypeScore = std::stof(dataNode["ObjTypeScore"].asString());
if(!dataNode["Feature"].isNull())
data_.feature = dataNode["Feature"].asString();
if(!dataNode["QualityScore"].isNull())
data_.qualityScore = std::stof(dataNode["QualityScore"].asString());
if(!dataNode["UpperColor"].isNull())
data_.upperColor = dataNode["UpperColor"].asString();
if(!dataNode["UpperColorScore"].isNull())
data_.upperColorScore = std::stof(dataNode["UpperColorScore"].asString());
if(!dataNode["Hair"].isNull())
data_.hair = dataNode["Hair"].asString();
if(!dataNode["UpperType"].isNull())
data_.upperType = dataNode["UpperType"].asString();
if(!dataNode["UpperTypeScore"].isNull())
data_.upperTypeScore = std::stof(dataNode["UpperTypeScore"].asString());
if(!dataNode["LowerColor"].isNull())
data_.lowerColor = dataNode["LowerColor"].asString();
if(!dataNode["LowerColorScore"].isNull())
data_.lowerColorScore = std::stof(dataNode["LowerColorScore"].asString());
if(!dataNode["LowerType"].isNull())
data_.lowerType = dataNode["LowerType"].asString();
if(!dataNode["LowerTypeScore"].isNull())
data_.lowerTypeScore = std::stof(dataNode["LowerTypeScore"].asString());
if(!dataNode["QualityScore"].isNull())
data_.qualityScore = std::stof(dataNode["QualityScore"].asString());
if(!dataNode["Gender"].isNull())
data_.gender = dataNode["Gender"].asString();
if(!dataNode["Feature"].isNull())
data_.feature = dataNode["Feature"].asString();
if(!dataNode["UpperColorScore"].isNull())
data_.upperColorScore = std::stof(dataNode["UpperColorScore"].asString());
if(!dataNode["GenderScore"].isNull())
data_.genderScore = std::stof(dataNode["GenderScore"].asString());
if(!dataNode["Hair"].isNull())
data_.hair = dataNode["Hair"].asString();
if(!dataNode["LowerColorScore"].isNull())
data_.lowerColorScore = std::stof(dataNode["LowerColorScore"].asString());
if(!dataNode["ObjType"].isNull())
data_.objType = dataNode["ObjType"].asString();
if(!dataNode["LowerTypeScore"].isNull())
data_.lowerTypeScore = std::stof(dataNode["LowerTypeScore"].asString());
if(!dataNode["HairScore"].isNull())
data_.hairScore = std::stof(dataNode["HairScore"].asString());
if(!dataNode["Age"].isNull())
data_.age = dataNode["Age"].asString();
if(!dataNode["UpperColor"].isNull())
data_.upperColor = dataNode["UpperColor"].asString();
if(!dataNode["LowerType"].isNull())
data_.lowerType = dataNode["LowerType"].asString();
if(!dataNode["AgeScore"].isNull())
data_.ageScore = std::stof(dataNode["AgeScore"].asString());
if(!dataNode["ObjTypeScore"].isNull())
data_.objTypeScore = std::stof(dataNode["ObjTypeScore"].asString());
if(!dataNode["Age"].isNull())
data_.age = dataNode["Age"].asString();
}

View File

@@ -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 <alibabacloud/facebody/model/GenerateHumanSketchStyleRequest.h>
using AlibabaCloud::Facebody::Model::GenerateHumanSketchStyleRequest;
GenerateHumanSketchStyleRequest::GenerateHumanSketchStyleRequest() :
RpcServiceRequest("facebody", "2019-12-30", "GenerateHumanSketchStyle")
{
setMethod(HttpRequest::Method::Post);
}
GenerateHumanSketchStyleRequest::~GenerateHumanSketchStyleRequest()
{}
std::string GenerateHumanSketchStyleRequest::getImageURL()const
{
return imageURL_;
}
void GenerateHumanSketchStyleRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -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 <alibabacloud/facebody/model/GenerateHumanSketchStyleResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
GenerateHumanSketchStyleResult::GenerateHumanSketchStyleResult() :
ServiceResult()
{}
GenerateHumanSketchStyleResult::GenerateHumanSketchStyleResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GenerateHumanSketchStyleResult::~GenerateHumanSketchStyleResult()
{}
void GenerateHumanSketchStyleResult::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();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
}
std::string GenerateHumanSketchStyleResult::getMessage()const
{
return message_;
}
GenerateHumanSketchStyleResult::Data GenerateHumanSketchStyleResult::getData()const
{
return data_;
}
std::string GenerateHumanSketchStyleResult::getCode()const
{
return code_;
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/facebody/model/MergeImageFaceRequest.h>
using AlibabaCloud::Facebody::Model::MergeImageFaceRequest;
MergeImageFaceRequest::MergeImageFaceRequest() :
RpcServiceRequest("facebody", "2019-12-30", "MergeImageFace")
{
setMethod(HttpRequest::Method::Post);
}
MergeImageFaceRequest::~MergeImageFaceRequest()
{}
std::string MergeImageFaceRequest::getUserId()const
{
return userId_;
}
void MergeImageFaceRequest::setUserId(const std::string& userId)
{
userId_ = userId;
setBodyParameter("UserId", userId);
}
std::string MergeImageFaceRequest::getTemplateId()const
{
return templateId_;
}
void MergeImageFaceRequest::setTemplateId(const std::string& templateId)
{
templateId_ = templateId;
setBodyParameter("TemplateId", templateId);
}
std::string MergeImageFaceRequest::getImageURL()const
{
return imageURL_;
}
void MergeImageFaceRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -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 <alibabacloud/facebody/model/MergeImageFaceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
MergeImageFaceResult::MergeImageFaceResult() :
ServiceResult()
{}
MergeImageFaceResult::MergeImageFaceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MergeImageFaceResult::~MergeImageFaceResult()
{}
void MergeImageFaceResult::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();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
}
std::string MergeImageFaceResult::getMessage()const
{
return message_;
}
MergeImageFaceResult::Data MergeImageFaceResult::getData()const
{
return data_;
}
std::string MergeImageFaceResult::getCode()const
{
return code_;
}

View File

@@ -46,66 +46,66 @@ void PedestrianDetectAttributeResult::parse(const std::string &payload)
for (auto dataNodeAttributesAttributesItem : allAttributesNode)
{
Data::AttributesItem attributesItemObject;
auto ageNode = value["Age"];
if(!ageNode["Name"].isNull())
attributesItemObject.age.name = ageNode["Name"].asString();
if(!ageNode["Score"].isNull())
attributesItemObject.age.score = std::stof(ageNode["Score"].asString());
auto backpackNode = value["Backpack"];
if(!backpackNode["Name"].isNull())
attributesItemObject.backpack.name = backpackNode["Name"].asString();
if(!backpackNode["Score"].isNull())
attributesItemObject.backpack.score = std::stof(backpackNode["Score"].asString());
auto genderNode = value["Gender"];
if(!genderNode["Name"].isNull())
attributesItemObject.gender.name = genderNode["Name"].asString();
if(!genderNode["Score"].isNull())
attributesItemObject.gender.score = std::stof(genderNode["Score"].asString());
auto glassesNode = value["Glasses"];
if(!glassesNode["Name"].isNull())
attributesItemObject.glasses.name = glassesNode["Name"].asString();
if(!glassesNode["Score"].isNull())
attributesItemObject.glasses.score = std::stof(glassesNode["Score"].asString());
auto handbagNode = value["Handbag"];
if(!handbagNode["Name"].isNull())
attributesItemObject.handbag.name = handbagNode["Name"].asString();
if(!handbagNode["Score"].isNull())
attributesItemObject.handbag.score = std::stof(handbagNode["Score"].asString());
auto hatNode = value["Hat"];
if(!hatNode["Name"].isNull())
attributesItemObject.hat.name = hatNode["Name"].asString();
if(!hatNode["Score"].isNull())
attributesItemObject.hat.score = std::stof(hatNode["Score"].asString());
auto lowerColorNode = value["LowerColor"];
if(!lowerColorNode["Name"].isNull())
attributesItemObject.lowerColor.name = lowerColorNode["Name"].asString();
if(!lowerColorNode["Score"].isNull())
attributesItemObject.lowerColor.score = std::stof(lowerColorNode["Score"].asString());
if(!backpackNode["Name"].isNull())
attributesItemObject.backpack.name = backpackNode["Name"].asString();
auto lowerWearNode = value["LowerWear"];
if(!lowerWearNode["Name"].isNull())
attributesItemObject.lowerWear.name = lowerWearNode["Name"].asString();
if(!lowerWearNode["Score"].isNull())
attributesItemObject.lowerWear.score = std::stof(lowerWearNode["Score"].asString());
auto orientNode = value["Orient"];
if(!orientNode["Name"].isNull())
attributesItemObject.orient.name = orientNode["Name"].asString();
if(!orientNode["Score"].isNull())
attributesItemObject.orient.score = std::stof(orientNode["Score"].asString());
if(!lowerWearNode["Name"].isNull())
attributesItemObject.lowerWear.name = lowerWearNode["Name"].asString();
auto shoulderBagNode = value["ShoulderBag"];
if(!shoulderBagNode["Name"].isNull())
attributesItemObject.shoulderBag.name = shoulderBagNode["Name"].asString();
if(!shoulderBagNode["Score"].isNull())
attributesItemObject.shoulderBag.score = std::stof(shoulderBagNode["Score"].asString());
if(!shoulderBagNode["Name"].isNull())
attributesItemObject.shoulderBag.name = shoulderBagNode["Name"].asString();
auto orientNode = value["Orient"];
if(!orientNode["Score"].isNull())
attributesItemObject.orient.score = std::stof(orientNode["Score"].asString());
if(!orientNode["Name"].isNull())
attributesItemObject.orient.name = orientNode["Name"].asString();
auto lowerColorNode = value["LowerColor"];
if(!lowerColorNode["Score"].isNull())
attributesItemObject.lowerColor.score = std::stof(lowerColorNode["Score"].asString());
if(!lowerColorNode["Name"].isNull())
attributesItemObject.lowerColor.name = lowerColorNode["Name"].asString();
auto glassesNode = value["Glasses"];
if(!glassesNode["Score"].isNull())
attributesItemObject.glasses.score = std::stof(glassesNode["Score"].asString());
if(!glassesNode["Name"].isNull())
attributesItemObject.glasses.name = glassesNode["Name"].asString();
auto upperColorNode = value["UpperColor"];
if(!upperColorNode["Name"].isNull())
attributesItemObject.upperColor.name = upperColorNode["Name"].asString();
if(!upperColorNode["Score"].isNull())
attributesItemObject.upperColor.score = std::stof(upperColorNode["Score"].asString());
if(!upperColorNode["Name"].isNull())
attributesItemObject.upperColor.name = upperColorNode["Name"].asString();
auto handbagNode = value["Handbag"];
if(!handbagNode["Score"].isNull())
attributesItemObject.handbag.score = std::stof(handbagNode["Score"].asString());
if(!handbagNode["Name"].isNull())
attributesItemObject.handbag.name = handbagNode["Name"].asString();
auto hatNode = value["Hat"];
if(!hatNode["Score"].isNull())
attributesItemObject.hat.score = std::stof(hatNode["Score"].asString());
if(!hatNode["Name"].isNull())
attributesItemObject.hat.name = hatNode["Name"].asString();
auto genderNode = value["Gender"];
if(!genderNode["Score"].isNull())
attributesItemObject.gender.score = std::stof(genderNode["Score"].asString());
if(!genderNode["Name"].isNull())
attributesItemObject.gender.name = genderNode["Name"].asString();
auto upperWearNode = value["UpperWear"];
if(!upperWearNode["Name"].isNull())
attributesItemObject.upperWear.name = upperWearNode["Name"].asString();
if(!upperWearNode["Score"].isNull())
attributesItemObject.upperWear.score = std::stof(upperWearNode["Score"].asString());
if(!upperWearNode["Name"].isNull())
attributesItemObject.upperWear.name = upperWearNode["Name"].asString();
auto ageNode = value["Age"];
if(!ageNode["Score"].isNull())
attributesItemObject.age.score = std::stof(ageNode["Score"].asString());
if(!ageNode["Name"].isNull())
attributesItemObject.age.name = ageNode["Name"].asString();
data_.attributes.push_back(attributesItemObject);
}
auto allBoxesNode = dataNode["Boxes"]["BoxesItem"];
@@ -114,14 +114,14 @@ void PedestrianDetectAttributeResult::parse(const std::string &payload)
Data::BoxesItem boxesItemObject;
if(!dataNodeBoxesBoxesItem["Score"].isNull())
boxesItemObject.score = std::stof(dataNodeBoxesBoxesItem["Score"].asString());
if(!dataNodeBoxesBoxesItem["TopLeftX"].isNull())
boxesItemObject.topLeftX = std::stof(dataNodeBoxesBoxesItem["TopLeftX"].asString());
if(!dataNodeBoxesBoxesItem["TopLeftY"].isNull())
boxesItemObject.topLeftY = std::stof(dataNodeBoxesBoxesItem["TopLeftY"].asString());
if(!dataNodeBoxesBoxesItem["BottomRightX"].isNull())
boxesItemObject.bottomRightX = std::stof(dataNodeBoxesBoxesItem["BottomRightX"].asString());
if(!dataNodeBoxesBoxesItem["BottomRightY"].isNull())
boxesItemObject.bottomRightY = std::stof(dataNodeBoxesBoxesItem["BottomRightY"].asString());
if(!dataNodeBoxesBoxesItem["BottomRightX"].isNull())
boxesItemObject.bottomRightX = std::stof(dataNodeBoxesBoxesItem["BottomRightX"].asString());
if(!dataNodeBoxesBoxesItem["TopLeftY"].isNull())
boxesItemObject.topLeftY = std::stof(dataNodeBoxesBoxesItem["TopLeftY"].asString());
if(!dataNodeBoxesBoxesItem["TopLeftX"].isNull())
boxesItemObject.topLeftX = std::stof(dataNodeBoxesBoxesItem["TopLeftX"].asString());
data_.boxes.push_back(boxesItemObject);
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/facebody/model/QueryFaceImageTemplateRequest.h>
using AlibabaCloud::Facebody::Model::QueryFaceImageTemplateRequest;
QueryFaceImageTemplateRequest::QueryFaceImageTemplateRequest() :
RpcServiceRequest("facebody", "2019-12-30", "QueryFaceImageTemplate")
{
setMethod(HttpRequest::Method::Get);
}
QueryFaceImageTemplateRequest::~QueryFaceImageTemplateRequest()
{}
std::string QueryFaceImageTemplateRequest::getUserId()const
{
return userId_;
}
void QueryFaceImageTemplateRequest::setUserId(const std::string& userId)
{
userId_ = userId;
setParameter("UserId", userId);
}
std::string QueryFaceImageTemplateRequest::getTemplateId()const
{
return templateId_;
}
void QueryFaceImageTemplateRequest::setTemplateId(const std::string& templateId)
{
templateId_ = templateId;
setParameter("TemplateId", templateId);
}

View File

@@ -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 <alibabacloud/facebody/model/QueryFaceImageTemplateResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Facebody;
using namespace AlibabaCloud::Facebody::Model;
QueryFaceImageTemplateResult::QueryFaceImageTemplateResult() :
ServiceResult()
{}
QueryFaceImageTemplateResult::QueryFaceImageTemplateResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryFaceImageTemplateResult::~QueryFaceImageTemplateResult()
{}
void QueryFaceImageTemplateResult::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"]["ElementsItem"];
for (auto dataNodeElementsElementsItem : allElementsNode)
{
Data::ElementsItem elementsItemObject;
if(!dataNodeElementsElementsItem["TemplateURL"].isNull())
elementsItemObject.templateURL = dataNodeElementsElementsItem["TemplateURL"].asString();
if(!dataNodeElementsElementsItem["UserId"].isNull())
elementsItemObject.userId = dataNodeElementsElementsItem["UserId"].asString();
if(!dataNodeElementsElementsItem["CreateTime"].isNull())
elementsItemObject.createTime = dataNodeElementsElementsItem["CreateTime"].asString();
if(!dataNodeElementsElementsItem["UpdateTime"].isNull())
elementsItemObject.updateTime = dataNodeElementsElementsItem["UpdateTime"].asString();
if(!dataNodeElementsElementsItem["TemplateId"].isNull())
elementsItemObject.templateId = dataNodeElementsElementsItem["TemplateId"].asString();
data_.elements.push_back(elementsItemObject);
}
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
}
std::string QueryFaceImageTemplateResult::getMessage()const
{
return message_;
}
QueryFaceImageTemplateResult::Data QueryFaceImageTemplateResult::getData()const
{
return data_;
}
std::string QueryFaceImageTemplateResult::getCode()const
{
return code_;
}

View File

@@ -29,6 +29,8 @@ set(imagerecog_public_header_model
include/alibabacloud/imagerecog/model/DetectImageElementsResult.h
include/alibabacloud/imagerecog/model/EvaluateCertificateQualityRequest.h
include/alibabacloud/imagerecog/model/EvaluateCertificateQualityResult.h
include/alibabacloud/imagerecog/model/RecognizeFoodRequest.h
include/alibabacloud/imagerecog/model/RecognizeFoodResult.h
include/alibabacloud/imagerecog/model/RecognizeImageColorRequest.h
include/alibabacloud/imagerecog/model/RecognizeImageColorResult.h
include/alibabacloud/imagerecog/model/RecognizeImageStyleRequest.h
@@ -52,6 +54,8 @@ set(imagerecog_src
src/model/DetectImageElementsResult.cc
src/model/EvaluateCertificateQualityRequest.cc
src/model/EvaluateCertificateQualityResult.cc
src/model/RecognizeFoodRequest.cc
src/model/RecognizeFoodResult.cc
src/model/RecognizeImageColorRequest.cc
src/model/RecognizeImageColorResult.cc
src/model/RecognizeImageStyleRequest.cc

View File

@@ -30,6 +30,8 @@
#include "model/DetectImageElementsResult.h"
#include "model/EvaluateCertificateQualityRequest.h"
#include "model/EvaluateCertificateQualityResult.h"
#include "model/RecognizeFoodRequest.h"
#include "model/RecognizeFoodResult.h"
#include "model/RecognizeImageColorRequest.h"
#include "model/RecognizeImageColorResult.h"
#include "model/RecognizeImageStyleRequest.h"
@@ -63,6 +65,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::EvaluateCertificateQualityResult> EvaluateCertificateQualityOutcome;
typedef std::future<EvaluateCertificateQualityOutcome> EvaluateCertificateQualityOutcomeCallable;
typedef std::function<void(const ImagerecogClient*, const Model::EvaluateCertificateQualityRequest&, const EvaluateCertificateQualityOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> EvaluateCertificateQualityAsyncHandler;
typedef Outcome<Error, Model::RecognizeFoodResult> RecognizeFoodOutcome;
typedef std::future<RecognizeFoodOutcome> RecognizeFoodOutcomeCallable;
typedef std::function<void(const ImagerecogClient*, const Model::RecognizeFoodRequest&, const RecognizeFoodOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeFoodAsyncHandler;
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;
@@ -98,6 +103,9 @@ namespace AlibabaCloud
EvaluateCertificateQualityOutcome evaluateCertificateQuality(const Model::EvaluateCertificateQualityRequest &request)const;
void evaluateCertificateQualityAsync(const Model::EvaluateCertificateQualityRequest& request, const EvaluateCertificateQualityAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
EvaluateCertificateQualityOutcomeCallable evaluateCertificateQualityCallable(const Model::EvaluateCertificateQualityRequest& request) const;
RecognizeFoodOutcome recognizeFood(const Model::RecognizeFoodRequest &request)const;
void recognizeFoodAsync(const Model::RecognizeFoodRequest& request, const RecognizeFoodAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RecognizeFoodOutcomeCallable recognizeFoodCallable(const Model::RecognizeFoodRequest& 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;

View File

@@ -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_IMAGERECOG_MODEL_RECOGNIZEFOODREQUEST_H_
#define ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZEFOODREQUEST_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 RecognizeFoodRequest : public RpcServiceRequest
{
public:
RecognizeFoodRequest();
~RecognizeFoodRequest();
std::string getImageURL()const;
void setImageURL(const std::string& imageURL);
private:
std::string imageURL_;
};
}
}
}
#endif // !ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZEFOODREQUEST_H_

View File

@@ -0,0 +1,65 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZEFOODRESULT_H_
#define ALIBABACLOUD_IMAGERECOG_MODEL_RECOGNIZEFOODRESULT_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 RecognizeFoodResult : public ServiceResult
{
public:
struct Data
{
struct TopFivesItem
{
std::string calorie;
float score;
std::string category;
};
std::vector<TopFivesItem> topFives;
};
RecognizeFoodResult();
explicit RecognizeFoodResult(const std::string &payload);
~RecognizeFoodResult();
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_IMAGERECOG_MODEL_RECOGNIZEFOODRESULT_H_

View File

@@ -195,6 +195,42 @@ ImagerecogClient::EvaluateCertificateQualityOutcomeCallable ImagerecogClient::ev
return task->get_future();
}
ImagerecogClient::RecognizeFoodOutcome ImagerecogClient::recognizeFood(const RecognizeFoodRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return RecognizeFoodOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return RecognizeFoodOutcome(RecognizeFoodResult(outcome.result()));
else
return RecognizeFoodOutcome(outcome.error());
}
void ImagerecogClient::recognizeFoodAsync(const RecognizeFoodRequest& request, const RecognizeFoodAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, recognizeFood(request), context);
};
asyncExecute(new Runnable(fn));
}
ImagerecogClient::RecognizeFoodOutcomeCallable ImagerecogClient::recognizeFoodCallable(const RecognizeFoodRequest &request) const
{
auto task = std::make_shared<std::packaged_task<RecognizeFoodOutcome()>>(
[this, request]()
{
return this->recognizeFood(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ImagerecogClient::RecognizeImageColorOutcome ImagerecogClient::recognizeImageColor(const RecognizeImageColorRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -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 <alibabacloud/imagerecog/model/RecognizeFoodRequest.h>
using AlibabaCloud::Imagerecog::Model::RecognizeFoodRequest;
RecognizeFoodRequest::RecognizeFoodRequest() :
RpcServiceRequest("imagerecog", "2019-09-30", "RecognizeFood")
{
setMethod(HttpRequest::Method::Post);
}
RecognizeFoodRequest::~RecognizeFoodRequest()
{}
std::string RecognizeFoodRequest::getImageURL()const
{
return imageURL_;
}
void RecognizeFoodRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,76 @@
/*
* 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/RecognizeFoodResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imagerecog;
using namespace AlibabaCloud::Imagerecog::Model;
RecognizeFoodResult::RecognizeFoodResult() :
ServiceResult()
{}
RecognizeFoodResult::RecognizeFoodResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RecognizeFoodResult::~RecognizeFoodResult()
{}
void RecognizeFoodResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allTopFivesNode = dataNode["TopFives"]["TopFivesItem"];
for (auto dataNodeTopFivesTopFivesItem : allTopFivesNode)
{
Data::TopFivesItem topFivesItemObject;
if(!dataNodeTopFivesTopFivesItem["Calorie"].isNull())
topFivesItemObject.calorie = dataNodeTopFivesTopFivesItem["Calorie"].asString();
if(!dataNodeTopFivesTopFivesItem["Score"].isNull())
topFivesItemObject.score = std::stof(dataNodeTopFivesTopFivesItem["Score"].asString());
if(!dataNodeTopFivesTopFivesItem["Category"].isNull())
topFivesItemObject.category = dataNodeTopFivesTopFivesItem["Category"].asString();
data_.topFives.push_back(topFivesItemObject);
}
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
}
std::string RecognizeFoodResult::getMessage()const
{
return message_;
}
RecognizeFoodResult::Data RecognizeFoodResult::getData()const
{
return data_;
}
std::string RecognizeFoodResult::getCode()const
{
return code_;
}

View File

@@ -23,6 +23,8 @@ set(objectdet_public_header
set(objectdet_public_header_model
include/alibabacloud/objectdet/model/ClassifyVehicleInsuranceRequest.h
include/alibabacloud/objectdet/model/ClassifyVehicleInsuranceResult.h
include/alibabacloud/objectdet/model/DetectIPCObjectRequest.h
include/alibabacloud/objectdet/model/DetectIPCObjectResult.h
include/alibabacloud/objectdet/model/DetectMainBodyRequest.h
include/alibabacloud/objectdet/model/DetectMainBodyResult.h
include/alibabacloud/objectdet/model/DetectObjectRequest.h
@@ -31,6 +33,10 @@ set(objectdet_public_header_model
include/alibabacloud/objectdet/model/DetectTransparentImageResult.h
include/alibabacloud/objectdet/model/DetectVehicleRequest.h
include/alibabacloud/objectdet/model/DetectVehicleResult.h
include/alibabacloud/objectdet/model/DetectVehicleICongestionRequest.h
include/alibabacloud/objectdet/model/DetectVehicleICongestionResult.h
include/alibabacloud/objectdet/model/DetectVehicleIllegalParkingRequest.h
include/alibabacloud/objectdet/model/DetectVehicleIllegalParkingResult.h
include/alibabacloud/objectdet/model/DetectWhiteBaseImageRequest.h
include/alibabacloud/objectdet/model/DetectWhiteBaseImageResult.h
include/alibabacloud/objectdet/model/GenerateVehicleRepairPlanRequest.h
@@ -48,6 +54,8 @@ set(objectdet_src
src/ObjectdetClient.cc
src/model/ClassifyVehicleInsuranceRequest.cc
src/model/ClassifyVehicleInsuranceResult.cc
src/model/DetectIPCObjectRequest.cc
src/model/DetectIPCObjectResult.cc
src/model/DetectMainBodyRequest.cc
src/model/DetectMainBodyResult.cc
src/model/DetectObjectRequest.cc
@@ -56,6 +64,10 @@ set(objectdet_src
src/model/DetectTransparentImageResult.cc
src/model/DetectVehicleRequest.cc
src/model/DetectVehicleResult.cc
src/model/DetectVehicleICongestionRequest.cc
src/model/DetectVehicleICongestionResult.cc
src/model/DetectVehicleIllegalParkingRequest.cc
src/model/DetectVehicleIllegalParkingResult.cc
src/model/DetectWhiteBaseImageRequest.cc
src/model/DetectWhiteBaseImageResult.cc
src/model/GenerateVehicleRepairPlanRequest.cc

View File

@@ -24,6 +24,8 @@
#include "ObjectdetExport.h"
#include "model/ClassifyVehicleInsuranceRequest.h"
#include "model/ClassifyVehicleInsuranceResult.h"
#include "model/DetectIPCObjectRequest.h"
#include "model/DetectIPCObjectResult.h"
#include "model/DetectMainBodyRequest.h"
#include "model/DetectMainBodyResult.h"
#include "model/DetectObjectRequest.h"
@@ -32,6 +34,10 @@
#include "model/DetectTransparentImageResult.h"
#include "model/DetectVehicleRequest.h"
#include "model/DetectVehicleResult.h"
#include "model/DetectVehicleICongestionRequest.h"
#include "model/DetectVehicleICongestionResult.h"
#include "model/DetectVehicleIllegalParkingRequest.h"
#include "model/DetectVehicleIllegalParkingResult.h"
#include "model/DetectWhiteBaseImageRequest.h"
#include "model/DetectWhiteBaseImageResult.h"
#include "model/GenerateVehicleRepairPlanRequest.h"
@@ -56,6 +62,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ClassifyVehicleInsuranceResult> ClassifyVehicleInsuranceOutcome;
typedef std::future<ClassifyVehicleInsuranceOutcome> ClassifyVehicleInsuranceOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::ClassifyVehicleInsuranceRequest&, const ClassifyVehicleInsuranceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ClassifyVehicleInsuranceAsyncHandler;
typedef Outcome<Error, Model::DetectIPCObjectResult> DetectIPCObjectOutcome;
typedef std::future<DetectIPCObjectOutcome> DetectIPCObjectOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::DetectIPCObjectRequest&, const DetectIPCObjectOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectIPCObjectAsyncHandler;
typedef Outcome<Error, Model::DetectMainBodyResult> DetectMainBodyOutcome;
typedef std::future<DetectMainBodyOutcome> DetectMainBodyOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::DetectMainBodyRequest&, const DetectMainBodyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectMainBodyAsyncHandler;
@@ -68,6 +77,12 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::DetectVehicleResult> DetectVehicleOutcome;
typedef std::future<DetectVehicleOutcome> DetectVehicleOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::DetectVehicleRequest&, const DetectVehicleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectVehicleAsyncHandler;
typedef Outcome<Error, Model::DetectVehicleICongestionResult> DetectVehicleICongestionOutcome;
typedef std::future<DetectVehicleICongestionOutcome> DetectVehicleICongestionOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::DetectVehicleICongestionRequest&, const DetectVehicleICongestionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectVehicleICongestionAsyncHandler;
typedef Outcome<Error, Model::DetectVehicleIllegalParkingResult> DetectVehicleIllegalParkingOutcome;
typedef std::future<DetectVehicleIllegalParkingOutcome> DetectVehicleIllegalParkingOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::DetectVehicleIllegalParkingRequest&, const DetectVehicleIllegalParkingOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectVehicleIllegalParkingAsyncHandler;
typedef Outcome<Error, Model::DetectWhiteBaseImageResult> DetectWhiteBaseImageOutcome;
typedef std::future<DetectWhiteBaseImageOutcome> DetectWhiteBaseImageOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::DetectWhiteBaseImageRequest&, const DetectWhiteBaseImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectWhiteBaseImageAsyncHandler;
@@ -94,6 +109,9 @@ namespace AlibabaCloud
ClassifyVehicleInsuranceOutcome classifyVehicleInsurance(const Model::ClassifyVehicleInsuranceRequest &request)const;
void classifyVehicleInsuranceAsync(const Model::ClassifyVehicleInsuranceRequest& request, const ClassifyVehicleInsuranceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ClassifyVehicleInsuranceOutcomeCallable classifyVehicleInsuranceCallable(const Model::ClassifyVehicleInsuranceRequest& request) const;
DetectIPCObjectOutcome detectIPCObject(const Model::DetectIPCObjectRequest &request)const;
void detectIPCObjectAsync(const Model::DetectIPCObjectRequest& request, const DetectIPCObjectAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetectIPCObjectOutcomeCallable detectIPCObjectCallable(const Model::DetectIPCObjectRequest& request) const;
DetectMainBodyOutcome detectMainBody(const Model::DetectMainBodyRequest &request)const;
void detectMainBodyAsync(const Model::DetectMainBodyRequest& request, const DetectMainBodyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetectMainBodyOutcomeCallable detectMainBodyCallable(const Model::DetectMainBodyRequest& request) const;
@@ -106,6 +124,12 @@ namespace AlibabaCloud
DetectVehicleOutcome detectVehicle(const Model::DetectVehicleRequest &request)const;
void detectVehicleAsync(const Model::DetectVehicleRequest& request, const DetectVehicleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetectVehicleOutcomeCallable detectVehicleCallable(const Model::DetectVehicleRequest& request) const;
DetectVehicleICongestionOutcome detectVehicleICongestion(const Model::DetectVehicleICongestionRequest &request)const;
void detectVehicleICongestionAsync(const Model::DetectVehicleICongestionRequest& request, const DetectVehicleICongestionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetectVehicleICongestionOutcomeCallable detectVehicleICongestionCallable(const Model::DetectVehicleICongestionRequest& request) const;
DetectVehicleIllegalParkingOutcome detectVehicleIllegalParking(const Model::DetectVehicleIllegalParkingRequest &request)const;
void detectVehicleIllegalParkingAsync(const Model::DetectVehicleIllegalParkingRequest& request, const DetectVehicleIllegalParkingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetectVehicleIllegalParkingOutcomeCallable detectVehicleIllegalParkingCallable(const Model::DetectVehicleIllegalParkingRequest& request) const;
DetectWhiteBaseImageOutcome detectWhiteBaseImage(const Model::DetectWhiteBaseImageRequest &request)const;
void detectWhiteBaseImageAsync(const Model::DetectWhiteBaseImageRequest& request, const DetectWhiteBaseImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetectWhiteBaseImageOutcomeCallable detectWhiteBaseImageCallable(const Model::DetectWhiteBaseImageRequest& request) const;

View File

@@ -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_OBJECTDET_MODEL_DETECTIPCOBJECTREQUEST_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTIPCOBJECTREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT DetectIPCObjectRequest : public RpcServiceRequest
{
public:
DetectIPCObjectRequest();
~DetectIPCObjectRequest();
std::string getImageURL()const;
void setImageURL(const std::string& imageURL);
private:
std::string imageURL_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTIPCOBJECTREQUEST_H_

View File

@@ -0,0 +1,65 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_DETECTIPCOBJECTRESULT_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTIPCOBJECTRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT DetectIPCObjectResult : public ServiceResult
{
public:
struct Data
{
struct Element
{
float score;
std::string type;
std::vector<std::string> box;
};
std::vector<Element> elements;
};
DetectIPCObjectResult();
explicit DetectIPCObjectResult(const std::string &payload);
~DetectIPCObjectResult();
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_OBJECTDET_MODEL_DETECTIPCOBJECTRESULT_H_

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLEICONGESTIONREQUEST_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLEICONGESTIONREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT DetectVehicleICongestionRequest : public RpcServiceRequest
{
public:
DetectVehicleICongestionRequest();
~DetectVehicleICongestionRequest();
Array getRoadRegions()const;
void setRoadRegions(const Array& roadRegions);
Array getPreRegionIntersectFeatures()const;
void setPreRegionIntersectFeatures(const Array& preRegionIntersectFeatures);
std::string getImageURL()const;
void setImageURL(const std::string& imageURL);
private:
Array roadRegions_;
Array preRegionIntersectFeatures_;
std::string imageURL_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLEICONGESTIONREQUEST_H_

View File

@@ -0,0 +1,87 @@
/*
* 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_OBJECTDET_MODEL_DETECTVEHICLEICONGESTIONRESULT_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLEICONGESTIONRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT DetectVehicleICongestionResult : public ServiceResult
{
public:
struct Data
{
struct RegionIntersectFeaturesItem
{
std::vector<std::string> features;
};
struct RegionIntersectsItem
{
std::vector<std::string> ids;
};
struct RegionIntersectMatchedItem
{
std::vector<std::string> ids1;
};
struct Element
{
struct BoxesItem
{
long left;
long top;
long right;
long bottom;
};
std::string typeName;
float score;
std::vector<Element::BoxesItem> boxes;
};
std::vector<RegionIntersectFeaturesItem> regionIntersectFeatures;
std::vector<RegionIntersectsItem> regionIntersects;
std::vector<RegionIntersectMatchedItem> regionIntersectMatched;
std::vector<Element> elements;
};
DetectVehicleICongestionResult();
explicit DetectVehicleICongestionResult(const std::string &payload);
~DetectVehicleICongestionResult();
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_OBJECTDET_MODEL_DETECTVEHICLEICONGESTIONRESULT_H_

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLEILLEGALPARKINGREQUEST_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLEILLEGALPARKINGREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT DetectVehicleIllegalParkingRequest : public RpcServiceRequest
{
public:
DetectVehicleIllegalParkingRequest();
~DetectVehicleIllegalParkingRequest();
Array getRoadRegions()const;
void setRoadRegions(const Array& roadRegions);
std::string getImageURL()const;
void setImageURL(const std::string& imageURL);
private:
Array roadRegions_;
std::string imageURL_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLEILLEGALPARKINGREQUEST_H_

View File

@@ -0,0 +1,77 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLEILLEGALPARKINGRESULT_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLEILLEGALPARKINGRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT DetectVehicleIllegalParkingResult : public ServiceResult
{
public:
struct Data
{
struct RegionIntersect
{
std::vector<std::string> ids;
};
struct Element
{
struct BoxesItem
{
long left;
long top;
long right;
long bottom;
};
std::string typeName;
float score;
std::vector<Element::BoxesItem> boxes;
};
std::vector<RegionIntersect> regionIntersects;
std::vector<Element> elements;
};
DetectVehicleIllegalParkingResult();
explicit DetectVehicleIllegalParkingResult(const std::string &payload);
~DetectVehicleIllegalParkingResult();
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_OBJECTDET_MODEL_DETECTVEHICLEILLEGALPARKINGRESULT_H_

View File

@@ -87,6 +87,42 @@ ObjectdetClient::ClassifyVehicleInsuranceOutcomeCallable ObjectdetClient::classi
return task->get_future();
}
ObjectdetClient::DetectIPCObjectOutcome ObjectdetClient::detectIPCObject(const DetectIPCObjectRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DetectIPCObjectOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DetectIPCObjectOutcome(DetectIPCObjectResult(outcome.result()));
else
return DetectIPCObjectOutcome(outcome.error());
}
void ObjectdetClient::detectIPCObjectAsync(const DetectIPCObjectRequest& request, const DetectIPCObjectAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, detectIPCObject(request), context);
};
asyncExecute(new Runnable(fn));
}
ObjectdetClient::DetectIPCObjectOutcomeCallable ObjectdetClient::detectIPCObjectCallable(const DetectIPCObjectRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DetectIPCObjectOutcome()>>(
[this, request]()
{
return this->detectIPCObject(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ObjectdetClient::DetectMainBodyOutcome ObjectdetClient::detectMainBody(const DetectMainBodyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -231,6 +267,78 @@ ObjectdetClient::DetectVehicleOutcomeCallable ObjectdetClient::detectVehicleCall
return task->get_future();
}
ObjectdetClient::DetectVehicleICongestionOutcome ObjectdetClient::detectVehicleICongestion(const DetectVehicleICongestionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DetectVehicleICongestionOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DetectVehicleICongestionOutcome(DetectVehicleICongestionResult(outcome.result()));
else
return DetectVehicleICongestionOutcome(outcome.error());
}
void ObjectdetClient::detectVehicleICongestionAsync(const DetectVehicleICongestionRequest& request, const DetectVehicleICongestionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, detectVehicleICongestion(request), context);
};
asyncExecute(new Runnable(fn));
}
ObjectdetClient::DetectVehicleICongestionOutcomeCallable ObjectdetClient::detectVehicleICongestionCallable(const DetectVehicleICongestionRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DetectVehicleICongestionOutcome()>>(
[this, request]()
{
return this->detectVehicleICongestion(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ObjectdetClient::DetectVehicleIllegalParkingOutcome ObjectdetClient::detectVehicleIllegalParking(const DetectVehicleIllegalParkingRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DetectVehicleIllegalParkingOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DetectVehicleIllegalParkingOutcome(DetectVehicleIllegalParkingResult(outcome.result()));
else
return DetectVehicleIllegalParkingOutcome(outcome.error());
}
void ObjectdetClient::detectVehicleIllegalParkingAsync(const DetectVehicleIllegalParkingRequest& request, const DetectVehicleIllegalParkingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, detectVehicleIllegalParking(request), context);
};
asyncExecute(new Runnable(fn));
}
ObjectdetClient::DetectVehicleIllegalParkingOutcomeCallable ObjectdetClient::detectVehicleIllegalParkingCallable(const DetectVehicleIllegalParkingRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DetectVehicleIllegalParkingOutcome()>>(
[this, request]()
{
return this->detectVehicleIllegalParking(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ObjectdetClient::DetectWhiteBaseImageOutcome ObjectdetClient::detectWhiteBaseImage(const DetectWhiteBaseImageRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -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 <alibabacloud/objectdet/model/DetectIPCObjectRequest.h>
using AlibabaCloud::Objectdet::Model::DetectIPCObjectRequest;
DetectIPCObjectRequest::DetectIPCObjectRequest() :
RpcServiceRequest("objectdet", "2019-12-30", "DetectIPCObject")
{
setMethod(HttpRequest::Method::Post);
}
DetectIPCObjectRequest::~DetectIPCObjectRequest()
{}
std::string DetectIPCObjectRequest::getImageURL()const
{
return imageURL_;
}
void DetectIPCObjectRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,77 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/objectdet/model/DetectIPCObjectResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Objectdet;
using namespace AlibabaCloud::Objectdet::Model;
DetectIPCObjectResult::DetectIPCObjectResult() :
ServiceResult()
{}
DetectIPCObjectResult::DetectIPCObjectResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DetectIPCObjectResult::~DetectIPCObjectResult()
{}
void DetectIPCObjectResult::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["Score"].isNull())
elementObject.score = std::stof(dataNodeElementsElement["Score"].asString());
if(!dataNodeElementsElement["Type"].isNull())
elementObject.type = dataNodeElementsElement["Type"].asString();
auto allBox = value["Box"]["Box"];
for (auto value : allBox)
elementObject.box.push_back(value.asString());
data_.elements.push_back(elementObject);
}
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
}
std::string DetectIPCObjectResult::getMessage()const
{
return message_;
}
DetectIPCObjectResult::Data DetectIPCObjectResult::getData()const
{
return data_;
}
std::string DetectIPCObjectResult::getCode()const
{
return code_;
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/objectdet/model/DetectVehicleICongestionRequest.h>
using AlibabaCloud::Objectdet::Model::DetectVehicleICongestionRequest;
DetectVehicleICongestionRequest::DetectVehicleICongestionRequest() :
RpcServiceRequest("objectdet", "2019-12-30", "DetectVehicleICongestion")
{
setMethod(HttpRequest::Method::Post);
}
DetectVehicleICongestionRequest::~DetectVehicleICongestionRequest()
{}
Array DetectVehicleICongestionRequest::getRoadRegions()const
{
return roadRegions_;
}
void DetectVehicleICongestionRequest::setRoadRegions(const Array& roadRegions)
{
roadRegions_ = roadRegions;
setBodyParameter("RoadRegions", std::to_string(roadRegions));
}
Array DetectVehicleICongestionRequest::getPreRegionIntersectFeatures()const
{
return preRegionIntersectFeatures_;
}
void DetectVehicleICongestionRequest::setPreRegionIntersectFeatures(const Array& preRegionIntersectFeatures)
{
preRegionIntersectFeatures_ = preRegionIntersectFeatures;
setBodyParameter("PreRegionIntersectFeatures", std::to_string(preRegionIntersectFeatures));
}
std::string DetectVehicleICongestionRequest::getImageURL()const
{
return imageURL_;
}
void DetectVehicleICongestionRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,115 @@
/*
* 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/objectdet/model/DetectVehicleICongestionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Objectdet;
using namespace AlibabaCloud::Objectdet::Model;
DetectVehicleICongestionResult::DetectVehicleICongestionResult() :
ServiceResult()
{}
DetectVehicleICongestionResult::DetectVehicleICongestionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DetectVehicleICongestionResult::~DetectVehicleICongestionResult()
{}
void DetectVehicleICongestionResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allRegionIntersectFeaturesNode = dataNode["RegionIntersectFeatures"]["RegionIntersectFeaturesItem"];
for (auto dataNodeRegionIntersectFeaturesRegionIntersectFeaturesItem : allRegionIntersectFeaturesNode)
{
Data::RegionIntersectFeaturesItem regionIntersectFeaturesItemObject;
auto allFeatures = value["Features"]["Features"];
for (auto value : allFeatures)
regionIntersectFeaturesItemObject.features.push_back(value.asString());
data_.regionIntersectFeatures.push_back(regionIntersectFeaturesItemObject);
}
auto allRegionIntersectsNode = dataNode["RegionIntersects"]["RegionIntersectsItem"];
for (auto dataNodeRegionIntersectsRegionIntersectsItem : allRegionIntersectsNode)
{
Data::RegionIntersectsItem regionIntersectsItemObject;
auto allIds = value["Ids"]["Ids"];
for (auto value : allIds)
regionIntersectsItemObject.ids.push_back(value.asString());
data_.regionIntersects.push_back(regionIntersectsItemObject);
}
auto allRegionIntersectMatchedNode = dataNode["RegionIntersectMatched"]["RegionIntersectMatchedItem"];
for (auto dataNodeRegionIntersectMatchedRegionIntersectMatchedItem : allRegionIntersectMatchedNode)
{
Data::RegionIntersectMatchedItem regionIntersectMatchedItemObject;
auto allIds1 = value["Ids"]["Ids"];
for (auto value : allIds1)
regionIntersectMatchedItemObject.ids1.push_back(value.asString());
data_.regionIntersectMatched.push_back(regionIntersectMatchedItemObject);
}
auto allElementsNode = dataNode["Elements"]["Element"];
for (auto dataNodeElementsElement : allElementsNode)
{
Data::Element elementObject;
if(!dataNodeElementsElement["TypeName"].isNull())
elementObject.typeName = dataNodeElementsElement["TypeName"].asString();
if(!dataNodeElementsElement["Score"].isNull())
elementObject.score = std::stof(dataNodeElementsElement["Score"].asString());
auto allBoxesNode = dataNodeElementsElement["Boxes"]["BoxesItem"];
for (auto dataNodeElementsElementBoxesBoxesItem : allBoxesNode)
{
Data::Element::BoxesItem boxesObject;
if(!dataNodeElementsElementBoxesBoxesItem["Left"].isNull())
boxesObject.left = std::stol(dataNodeElementsElementBoxesBoxesItem["Left"].asString());
if(!dataNodeElementsElementBoxesBoxesItem["Top"].isNull())
boxesObject.top = std::stol(dataNodeElementsElementBoxesBoxesItem["Top"].asString());
if(!dataNodeElementsElementBoxesBoxesItem["Right"].isNull())
boxesObject.right = std::stol(dataNodeElementsElementBoxesBoxesItem["Right"].asString());
if(!dataNodeElementsElementBoxesBoxesItem["Bottom"].isNull())
boxesObject.bottom = std::stol(dataNodeElementsElementBoxesBoxesItem["Bottom"].asString());
elementObject.boxes.push_back(boxesObject);
}
data_.elements.push_back(elementObject);
}
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
}
std::string DetectVehicleICongestionResult::getMessage()const
{
return message_;
}
DetectVehicleICongestionResult::Data DetectVehicleICongestionResult::getData()const
{
return data_;
}
std::string DetectVehicleICongestionResult::getCode()const
{
return code_;
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/objectdet/model/DetectVehicleIllegalParkingRequest.h>
using AlibabaCloud::Objectdet::Model::DetectVehicleIllegalParkingRequest;
DetectVehicleIllegalParkingRequest::DetectVehicleIllegalParkingRequest() :
RpcServiceRequest("objectdet", "2019-12-30", "DetectVehicleIllegalParking")
{
setMethod(HttpRequest::Method::Post);
}
DetectVehicleIllegalParkingRequest::~DetectVehicleIllegalParkingRequest()
{}
Array DetectVehicleIllegalParkingRequest::getRoadRegions()const
{
return roadRegions_;
}
void DetectVehicleIllegalParkingRequest::setRoadRegions(const Array& roadRegions)
{
roadRegions_ = roadRegions;
setBodyParameter("RoadRegions", std::to_string(roadRegions));
}
std::string DetectVehicleIllegalParkingRequest::getImageURL()const
{
return imageURL_;
}
void DetectVehicleIllegalParkingRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,97 @@
/*
* 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/objectdet/model/DetectVehicleIllegalParkingResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Objectdet;
using namespace AlibabaCloud::Objectdet::Model;
DetectVehicleIllegalParkingResult::DetectVehicleIllegalParkingResult() :
ServiceResult()
{}
DetectVehicleIllegalParkingResult::DetectVehicleIllegalParkingResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DetectVehicleIllegalParkingResult::~DetectVehicleIllegalParkingResult()
{}
void DetectVehicleIllegalParkingResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allRegionIntersectsNode = dataNode["RegionIntersects"]["RegionIntersect"];
for (auto dataNodeRegionIntersectsRegionIntersect : allRegionIntersectsNode)
{
Data::RegionIntersect regionIntersectObject;
auto allIds = value["Ids"]["Ids"];
for (auto value : allIds)
regionIntersectObject.ids.push_back(value.asString());
data_.regionIntersects.push_back(regionIntersectObject);
}
auto allElementsNode = dataNode["Elements"]["Element"];
for (auto dataNodeElementsElement : allElementsNode)
{
Data::Element elementObject;
if(!dataNodeElementsElement["TypeName"].isNull())
elementObject.typeName = dataNodeElementsElement["TypeName"].asString();
if(!dataNodeElementsElement["Score"].isNull())
elementObject.score = std::stof(dataNodeElementsElement["Score"].asString());
auto allBoxesNode = dataNodeElementsElement["Boxes"]["BoxesItem"];
for (auto dataNodeElementsElementBoxesBoxesItem : allBoxesNode)
{
Data::Element::BoxesItem boxesObject;
if(!dataNodeElementsElementBoxesBoxesItem["Left"].isNull())
boxesObject.left = std::stol(dataNodeElementsElementBoxesBoxesItem["Left"].asString());
if(!dataNodeElementsElementBoxesBoxesItem["Top"].isNull())
boxesObject.top = std::stol(dataNodeElementsElementBoxesBoxesItem["Top"].asString());
if(!dataNodeElementsElementBoxesBoxesItem["Right"].isNull())
boxesObject.right = std::stol(dataNodeElementsElementBoxesBoxesItem["Right"].asString());
if(!dataNodeElementsElementBoxesBoxesItem["Bottom"].isNull())
boxesObject.bottom = std::stol(dataNodeElementsElementBoxesBoxesItem["Bottom"].asString());
elementObject.boxes.push_back(boxesObject);
}
data_.elements.push_back(elementObject);
}
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
}
std::string DetectVehicleIllegalParkingResult::getMessage()const
{
return message_;
}
DetectVehicleIllegalParkingResult::Data DetectVehicleIllegalParkingResult::getData()const
{
return data_;
}
std::string DetectVehicleIllegalParkingResult::getCode()const
{
return code_;
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ONSMQTT_MODEL_GETDEVICECREDENTIALREQUEST_H_
#define ALIBABACLOUD_ONSMQTT_MODEL_GETDEVICECREDENTIALREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/onsmqtt/OnsMqttExport.h>
namespace AlibabaCloud
{
namespace OnsMqtt
{
namespace Model
{
class ALIBABACLOUD_ONSMQTT_EXPORT GetDeviceCredentialRequest : public RpcServiceRequest
{
public:
GetDeviceCredentialRequest();
~GetDeviceCredentialRequest();
std::string getClientId()const;
void setClientId(const std::string& clientId);
std::string getInstanceId()const;
void setInstanceId(const std::string& instanceId);
private:
std::string clientId_;
std::string instanceId_;
};
}
}
}
#endif // !ALIBABACLOUD_ONSMQTT_MODEL_GETDEVICECREDENTIALREQUEST_H_

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ONSMQTT_MODEL_GETDEVICECREDENTIALRESULT_H_
#define ALIBABACLOUD_ONSMQTT_MODEL_GETDEVICECREDENTIALRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/onsmqtt/OnsMqttExport.h>
namespace AlibabaCloud
{
namespace OnsMqtt
{
namespace Model
{
class ALIBABACLOUD_ONSMQTT_EXPORT GetDeviceCredentialResult : public ServiceResult
{
public:
struct DeviceCredential
{
std::string instanceId;
std::string deviceAccessKeySecret;
long createTime;
std::string deviceAccessKeyId;
long updateTime;
std::string clientId;
};
GetDeviceCredentialResult();
explicit GetDeviceCredentialResult(const std::string &payload);
~GetDeviceCredentialResult();
DeviceCredential getDeviceCredential()const;
protected:
void parse(const std::string &payload);
private:
DeviceCredential deviceCredential_;
};
}
}
}
#endif // !ALIBABACLOUD_ONSMQTT_MODEL_GETDEVICECREDENTIALRESULT_H_

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ONSMQTT_MODEL_REFRESHDEVICECREDENTIALREQUEST_H_
#define ALIBABACLOUD_ONSMQTT_MODEL_REFRESHDEVICECREDENTIALREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/onsmqtt/OnsMqttExport.h>
namespace AlibabaCloud
{
namespace OnsMqtt
{
namespace Model
{
class ALIBABACLOUD_ONSMQTT_EXPORT RefreshDeviceCredentialRequest : public RpcServiceRequest
{
public:
RefreshDeviceCredentialRequest();
~RefreshDeviceCredentialRequest();
std::string getClientId()const;
void setClientId(const std::string& clientId);
std::string getInstanceId()const;
void setInstanceId(const std::string& instanceId);
private:
std::string clientId_;
std::string instanceId_;
};
}
}
}
#endif // !ALIBABACLOUD_ONSMQTT_MODEL_REFRESHDEVICECREDENTIALREQUEST_H_

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ONSMQTT_MODEL_REFRESHDEVICECREDENTIALRESULT_H_
#define ALIBABACLOUD_ONSMQTT_MODEL_REFRESHDEVICECREDENTIALRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/onsmqtt/OnsMqttExport.h>
namespace AlibabaCloud
{
namespace OnsMqtt
{
namespace Model
{
class ALIBABACLOUD_ONSMQTT_EXPORT RefreshDeviceCredentialResult : public ServiceResult
{
public:
struct DeviceCredential
{
std::string instanceId;
std::string deviceAccessKeySecret;
long createTime;
std::string deviceAccessKeyId;
long updateTime;
std::string clientId;
};
RefreshDeviceCredentialResult();
explicit RefreshDeviceCredentialResult(const std::string &payload);
~RefreshDeviceCredentialResult();
DeviceCredential getDeviceCredential()const;
protected:
void parse(const std::string &payload);
private:
DeviceCredential deviceCredential_;
};
}
}
}
#endif // !ALIBABACLOUD_ONSMQTT_MODEL_REFRESHDEVICECREDENTIALRESULT_H_

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ONSMQTT_MODEL_REGISTERDEVICECREDENTIALREQUEST_H_
#define ALIBABACLOUD_ONSMQTT_MODEL_REGISTERDEVICECREDENTIALREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/onsmqtt/OnsMqttExport.h>
namespace AlibabaCloud
{
namespace OnsMqtt
{
namespace Model
{
class ALIBABACLOUD_ONSMQTT_EXPORT RegisterDeviceCredentialRequest : public RpcServiceRequest
{
public:
RegisterDeviceCredentialRequest();
~RegisterDeviceCredentialRequest();
std::string getClientId()const;
void setClientId(const std::string& clientId);
std::string getInstanceId()const;
void setInstanceId(const std::string& instanceId);
private:
std::string clientId_;
std::string instanceId_;
};
}
}
}
#endif // !ALIBABACLOUD_ONSMQTT_MODEL_REGISTERDEVICECREDENTIALREQUEST_H_

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ONSMQTT_MODEL_REGISTERDEVICECREDENTIALRESULT_H_
#define ALIBABACLOUD_ONSMQTT_MODEL_REGISTERDEVICECREDENTIALRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/onsmqtt/OnsMqttExport.h>
namespace AlibabaCloud
{
namespace OnsMqtt
{
namespace Model
{
class ALIBABACLOUD_ONSMQTT_EXPORT RegisterDeviceCredentialResult : public ServiceResult
{
public:
struct DeviceCredential
{
std::string instanceId;
std::string deviceAccessKeySecret;
long createTime;
std::string deviceAccessKeyId;
long updateTime;
std::string clientId;
};
RegisterDeviceCredentialResult();
explicit RegisterDeviceCredentialResult(const std::string &payload);
~RegisterDeviceCredentialResult();
DeviceCredential getDeviceCredential()const;
protected:
void parse(const std::string &payload);
private:
DeviceCredential deviceCredential_;
};
}
}
}
#endif // !ALIBABACLOUD_ONSMQTT_MODEL_REGISTERDEVICECREDENTIALRESULT_H_

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ONSMQTT_MODEL_UNREGISTERDEVICECREDENTIALREQUEST_H_
#define ALIBABACLOUD_ONSMQTT_MODEL_UNREGISTERDEVICECREDENTIALREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/onsmqtt/OnsMqttExport.h>
namespace AlibabaCloud
{
namespace OnsMqtt
{
namespace Model
{
class ALIBABACLOUD_ONSMQTT_EXPORT UnRegisterDeviceCredentialRequest : public RpcServiceRequest
{
public:
UnRegisterDeviceCredentialRequest();
~UnRegisterDeviceCredentialRequest();
std::string getClientId()const;
void setClientId(const std::string& clientId);
std::string getInstanceId()const;
void setInstanceId(const std::string& instanceId);
private:
std::string clientId_;
std::string instanceId_;
};
}
}
}
#endif // !ALIBABACLOUD_ONSMQTT_MODEL_UNREGISTERDEVICECREDENTIALREQUEST_H_

View File

@@ -0,0 +1,49 @@
/*
* 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_ONSMQTT_MODEL_UNREGISTERDEVICECREDENTIALRESULT_H_
#define ALIBABACLOUD_ONSMQTT_MODEL_UNREGISTERDEVICECREDENTIALRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/onsmqtt/OnsMqttExport.h>
namespace AlibabaCloud
{
namespace OnsMqtt
{
namespace Model
{
class ALIBABACLOUD_ONSMQTT_EXPORT UnRegisterDeviceCredentialResult : public ServiceResult
{
public:
UnRegisterDeviceCredentialResult();
explicit UnRegisterDeviceCredentialResult(const std::string &payload);
~UnRegisterDeviceCredentialResult();
protected:
void parse(const std::string &payload);
private:
};
}
}
}
#endif // !ALIBABACLOUD_ONSMQTT_MODEL_UNREGISTERDEVICECREDENTIALRESULT_H_

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/onsmqtt/model/GetDeviceCredentialRequest.h>
using AlibabaCloud::OnsMqtt::Model::GetDeviceCredentialRequest;
GetDeviceCredentialRequest::GetDeviceCredentialRequest() :
RpcServiceRequest("onsmqtt", "2020-04-20", "GetDeviceCredential")
{
setMethod(HttpRequest::Method::Post);
}
GetDeviceCredentialRequest::~GetDeviceCredentialRequest()
{}
std::string GetDeviceCredentialRequest::getClientId()const
{
return clientId_;
}
void GetDeviceCredentialRequest::setClientId(const std::string& clientId)
{
clientId_ = clientId;
setParameter("ClientId", clientId);
}
std::string GetDeviceCredentialRequest::getInstanceId()const
{
return instanceId_;
}
void GetDeviceCredentialRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/onsmqtt/model/GetDeviceCredentialResult.h>
#include <json/json.h>
using namespace AlibabaCloud::OnsMqtt;
using namespace AlibabaCloud::OnsMqtt::Model;
GetDeviceCredentialResult::GetDeviceCredentialResult() :
ServiceResult()
{}
GetDeviceCredentialResult::GetDeviceCredentialResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetDeviceCredentialResult::~GetDeviceCredentialResult()
{}
void GetDeviceCredentialResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto deviceCredentialNode = value["DeviceCredential"];
if(!deviceCredentialNode["ClientId"].isNull())
deviceCredential_.clientId = deviceCredentialNode["ClientId"].asString();
if(!deviceCredentialNode["DeviceAccessKeyId"].isNull())
deviceCredential_.deviceAccessKeyId = deviceCredentialNode["DeviceAccessKeyId"].asString();
if(!deviceCredentialNode["DeviceAccessKeySecret"].isNull())
deviceCredential_.deviceAccessKeySecret = deviceCredentialNode["DeviceAccessKeySecret"].asString();
if(!deviceCredentialNode["InstanceId"].isNull())
deviceCredential_.instanceId = deviceCredentialNode["InstanceId"].asString();
if(!deviceCredentialNode["CreateTime"].isNull())
deviceCredential_.createTime = std::stol(deviceCredentialNode["CreateTime"].asString());
if(!deviceCredentialNode["UpdateTime"].isNull())
deviceCredential_.updateTime = std::stol(deviceCredentialNode["UpdateTime"].asString());
}
GetDeviceCredentialResult::DeviceCredential GetDeviceCredentialResult::getDeviceCredential()const
{
return deviceCredential_;
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/onsmqtt/model/RefreshDeviceCredentialRequest.h>
using AlibabaCloud::OnsMqtt::Model::RefreshDeviceCredentialRequest;
RefreshDeviceCredentialRequest::RefreshDeviceCredentialRequest() :
RpcServiceRequest("onsmqtt", "2020-04-20", "RefreshDeviceCredential")
{
setMethod(HttpRequest::Method::Post);
}
RefreshDeviceCredentialRequest::~RefreshDeviceCredentialRequest()
{}
std::string RefreshDeviceCredentialRequest::getClientId()const
{
return clientId_;
}
void RefreshDeviceCredentialRequest::setClientId(const std::string& clientId)
{
clientId_ = clientId;
setParameter("ClientId", clientId);
}
std::string RefreshDeviceCredentialRequest::getInstanceId()const
{
return instanceId_;
}
void RefreshDeviceCredentialRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/onsmqtt/model/RefreshDeviceCredentialResult.h>
#include <json/json.h>
using namespace AlibabaCloud::OnsMqtt;
using namespace AlibabaCloud::OnsMqtt::Model;
RefreshDeviceCredentialResult::RefreshDeviceCredentialResult() :
ServiceResult()
{}
RefreshDeviceCredentialResult::RefreshDeviceCredentialResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RefreshDeviceCredentialResult::~RefreshDeviceCredentialResult()
{}
void RefreshDeviceCredentialResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto deviceCredentialNode = value["DeviceCredential"];
if(!deviceCredentialNode["ClientId"].isNull())
deviceCredential_.clientId = deviceCredentialNode["ClientId"].asString();
if(!deviceCredentialNode["DeviceAccessKeyId"].isNull())
deviceCredential_.deviceAccessKeyId = deviceCredentialNode["DeviceAccessKeyId"].asString();
if(!deviceCredentialNode["DeviceAccessKeySecret"].isNull())
deviceCredential_.deviceAccessKeySecret = deviceCredentialNode["DeviceAccessKeySecret"].asString();
if(!deviceCredentialNode["InstanceId"].isNull())
deviceCredential_.instanceId = deviceCredentialNode["InstanceId"].asString();
if(!deviceCredentialNode["CreateTime"].isNull())
deviceCredential_.createTime = std::stol(deviceCredentialNode["CreateTime"].asString());
if(!deviceCredentialNode["UpdateTime"].isNull())
deviceCredential_.updateTime = std::stol(deviceCredentialNode["UpdateTime"].asString());
}
RefreshDeviceCredentialResult::DeviceCredential RefreshDeviceCredentialResult::getDeviceCredential()const
{
return deviceCredential_;
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/onsmqtt/model/RegisterDeviceCredentialRequest.h>
using AlibabaCloud::OnsMqtt::Model::RegisterDeviceCredentialRequest;
RegisterDeviceCredentialRequest::RegisterDeviceCredentialRequest() :
RpcServiceRequest("onsmqtt", "2020-04-20", "RegisterDeviceCredential")
{
setMethod(HttpRequest::Method::Post);
}
RegisterDeviceCredentialRequest::~RegisterDeviceCredentialRequest()
{}
std::string RegisterDeviceCredentialRequest::getClientId()const
{
return clientId_;
}
void RegisterDeviceCredentialRequest::setClientId(const std::string& clientId)
{
clientId_ = clientId;
setParameter("ClientId", clientId);
}
std::string RegisterDeviceCredentialRequest::getInstanceId()const
{
return instanceId_;
}
void RegisterDeviceCredentialRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/onsmqtt/model/RegisterDeviceCredentialResult.h>
#include <json/json.h>
using namespace AlibabaCloud::OnsMqtt;
using namespace AlibabaCloud::OnsMqtt::Model;
RegisterDeviceCredentialResult::RegisterDeviceCredentialResult() :
ServiceResult()
{}
RegisterDeviceCredentialResult::RegisterDeviceCredentialResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RegisterDeviceCredentialResult::~RegisterDeviceCredentialResult()
{}
void RegisterDeviceCredentialResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto deviceCredentialNode = value["DeviceCredential"];
if(!deviceCredentialNode["ClientId"].isNull())
deviceCredential_.clientId = deviceCredentialNode["ClientId"].asString();
if(!deviceCredentialNode["DeviceAccessKeyId"].isNull())
deviceCredential_.deviceAccessKeyId = deviceCredentialNode["DeviceAccessKeyId"].asString();
if(!deviceCredentialNode["DeviceAccessKeySecret"].isNull())
deviceCredential_.deviceAccessKeySecret = deviceCredentialNode["DeviceAccessKeySecret"].asString();
if(!deviceCredentialNode["InstanceId"].isNull())
deviceCredential_.instanceId = deviceCredentialNode["InstanceId"].asString();
if(!deviceCredentialNode["CreateTime"].isNull())
deviceCredential_.createTime = std::stol(deviceCredentialNode["CreateTime"].asString());
if(!deviceCredentialNode["UpdateTime"].isNull())
deviceCredential_.updateTime = std::stol(deviceCredentialNode["UpdateTime"].asString());
}
RegisterDeviceCredentialResult::DeviceCredential RegisterDeviceCredentialResult::getDeviceCredential()const
{
return deviceCredential_;
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/onsmqtt/model/UnRegisterDeviceCredentialRequest.h>
using AlibabaCloud::OnsMqtt::Model::UnRegisterDeviceCredentialRequest;
UnRegisterDeviceCredentialRequest::UnRegisterDeviceCredentialRequest() :
RpcServiceRequest("onsmqtt", "2020-04-20", "UnRegisterDeviceCredential")
{
setMethod(HttpRequest::Method::Post);
}
UnRegisterDeviceCredentialRequest::~UnRegisterDeviceCredentialRequest()
{}
std::string UnRegisterDeviceCredentialRequest::getClientId()const
{
return clientId_;
}
void UnRegisterDeviceCredentialRequest::setClientId(const std::string& clientId)
{
clientId_ = clientId;
setParameter("ClientId", clientId);
}
std::string UnRegisterDeviceCredentialRequest::getInstanceId()const
{
return instanceId_;
}
void UnRegisterDeviceCredentialRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}

View File

@@ -0,0 +1,44 @@
/*
* 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/onsmqtt/model/UnRegisterDeviceCredentialResult.h>
#include <json/json.h>
using namespace AlibabaCloud::OnsMqtt;
using namespace AlibabaCloud::OnsMqtt::Model;
UnRegisterDeviceCredentialResult::UnRegisterDeviceCredentialResult() :
ServiceResult()
{}
UnRegisterDeviceCredentialResult::UnRegisterDeviceCredentialResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UnRegisterDeviceCredentialResult::~UnRegisterDeviceCredentialResult()
{}
void UnRegisterDeviceCredentialResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -26,7 +26,9 @@ set(videorecog_public_header_model
include/alibabacloud/videorecog/model/GenerateVideoCoverRequest.h
include/alibabacloud/videorecog/model/GenerateVideoCoverResult.h
include/alibabacloud/videorecog/model/GetAsyncJobResultRequest.h
include/alibabacloud/videorecog/model/GetAsyncJobResultResult.h )
include/alibabacloud/videorecog/model/GetAsyncJobResultResult.h
include/alibabacloud/videorecog/model/UnderstandVideoContentRequest.h
include/alibabacloud/videorecog/model/UnderstandVideoContentResult.h )
set(videorecog_src
src/VideorecogClient.cc
@@ -35,7 +37,9 @@ set(videorecog_src
src/model/GenerateVideoCoverRequest.cc
src/model/GenerateVideoCoverResult.cc
src/model/GetAsyncJobResultRequest.cc
src/model/GetAsyncJobResultResult.cc )
src/model/GetAsyncJobResultResult.cc
src/model/UnderstandVideoContentRequest.cc
src/model/UnderstandVideoContentResult.cc )
add_library(videorecog ${LIB_TYPE}
${videorecog_public_header}

View File

@@ -28,6 +28,8 @@
#include "model/GenerateVideoCoverResult.h"
#include "model/GetAsyncJobResultRequest.h"
#include "model/GetAsyncJobResultResult.h"
#include "model/UnderstandVideoContentRequest.h"
#include "model/UnderstandVideoContentResult.h"
namespace AlibabaCloud
@@ -46,6 +48,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::GetAsyncJobResultResult> GetAsyncJobResultOutcome;
typedef std::future<GetAsyncJobResultOutcome> GetAsyncJobResultOutcomeCallable;
typedef std::function<void(const VideorecogClient*, const Model::GetAsyncJobResultRequest&, const GetAsyncJobResultOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetAsyncJobResultAsyncHandler;
typedef Outcome<Error, Model::UnderstandVideoContentResult> UnderstandVideoContentOutcome;
typedef std::future<UnderstandVideoContentOutcome> UnderstandVideoContentOutcomeCallable;
typedef std::function<void(const VideorecogClient*, const Model::UnderstandVideoContentRequest&, const UnderstandVideoContentOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UnderstandVideoContentAsyncHandler;
VideorecogClient(const Credentials &credentials, const ClientConfiguration &configuration);
VideorecogClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
@@ -60,6 +65,9 @@ namespace AlibabaCloud
GetAsyncJobResultOutcome getAsyncJobResult(const Model::GetAsyncJobResultRequest &request)const;
void getAsyncJobResultAsync(const Model::GetAsyncJobResultRequest& request, const GetAsyncJobResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetAsyncJobResultOutcomeCallable getAsyncJobResultCallable(const Model::GetAsyncJobResultRequest& request) const;
UnderstandVideoContentOutcome understandVideoContent(const Model::UnderstandVideoContentRequest &request)const;
void understandVideoContentAsync(const Model::UnderstandVideoContentRequest& request, const UnderstandVideoContentAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UnderstandVideoContentOutcomeCallable understandVideoContentCallable(const Model::UnderstandVideoContentRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;

View File

@@ -35,14 +35,14 @@ namespace AlibabaCloud
GetAsyncJobResultRequest();
~GetAsyncJobResultRequest();
bool getAsync()const;
void setAsync(bool async);
std::string getJobId()const;
void setJobId(const std::string& jobId);
bool getAsync()const;
void setAsync(bool async);
private:
bool async_;
std::string jobId_;
bool async_;
};
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_VIDEORECOG_MODEL_UNDERSTANDVIDEOCONTENTREQUEST_H_
#define ALIBABACLOUD_VIDEORECOG_MODEL_UNDERSTANDVIDEOCONTENTREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/videorecog/VideorecogExport.h>
namespace AlibabaCloud
{
namespace Videorecog
{
namespace Model
{
class ALIBABACLOUD_VIDEORECOG_EXPORT UnderstandVideoContentRequest : public RpcServiceRequest
{
public:
UnderstandVideoContentRequest();
~UnderstandVideoContentRequest();
bool getAsync()const;
void setAsync(bool async);
std::string getVideoURL()const;
void setVideoURL(const std::string& videoURL);
private:
bool async_;
std::string videoURL_;
};
}
}
}
#endif // !ALIBABACLOUD_VIDEORECOG_MODEL_UNDERSTANDVIDEOCONTENTREQUEST_H_

View File

@@ -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_VIDEORECOG_MODEL_UNDERSTANDVIDEOCONTENTRESULT_H_
#define ALIBABACLOUD_VIDEORECOG_MODEL_UNDERSTANDVIDEOCONTENTRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/videorecog/VideorecogExport.h>
namespace AlibabaCloud
{
namespace Videorecog
{
namespace Model
{
class ALIBABACLOUD_VIDEORECOG_EXPORT UnderstandVideoContentResult : public ServiceResult
{
public:
struct Data
{
struct VideoInfo
{
float fps;
long duration;
long height;
long width;
};
std::string tagInfo;
VideoInfo videoInfo;
};
UnderstandVideoContentResult();
explicit UnderstandVideoContentResult(const std::string &payload);
~UnderstandVideoContentResult();
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_VIDEORECOG_MODEL_UNDERSTANDVIDEOCONTENTRESULT_H_

View File

@@ -159,3 +159,39 @@ VideorecogClient::GetAsyncJobResultOutcomeCallable VideorecogClient::getAsyncJob
return task->get_future();
}
VideorecogClient::UnderstandVideoContentOutcome VideorecogClient::understandVideoContent(const UnderstandVideoContentRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UnderstandVideoContentOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UnderstandVideoContentOutcome(UnderstandVideoContentResult(outcome.result()));
else
return UnderstandVideoContentOutcome(outcome.error());
}
void VideorecogClient::understandVideoContentAsync(const UnderstandVideoContentRequest& request, const UnderstandVideoContentAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, understandVideoContent(request), context);
};
asyncExecute(new Runnable(fn));
}
VideorecogClient::UnderstandVideoContentOutcomeCallable VideorecogClient::understandVideoContentCallable(const UnderstandVideoContentRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UnderstandVideoContentOutcome()>>(
[this, request]()
{
return this->understandVideoContent(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -27,17 +27,6 @@ GetAsyncJobResultRequest::GetAsyncJobResultRequest() :
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_;
@@ -49,3 +38,14 @@ void GetAsyncJobResultRequest::setJobId(const std::string& jobId)
setBodyParameter("JobId", jobId);
}
bool GetAsyncJobResultRequest::getAsync()const
{
return async_;
}
void GetAsyncJobResultRequest::setAsync(bool async)
{
async_ = async;
setBodyParameter("Async", async ? "true" : "false");
}

View File

@@ -40,16 +40,16 @@ void GetAsyncJobResultResult::parse(const std::string &payload)
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();
if(!dataNode["JobId"].isNull())
data_.jobId = dataNode["JobId"].asString();
if(!dataNode["Result"].isNull())
data_.result = dataNode["Result"].asString();
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/videorecog/model/UnderstandVideoContentRequest.h>
using AlibabaCloud::Videorecog::Model::UnderstandVideoContentRequest;
UnderstandVideoContentRequest::UnderstandVideoContentRequest() :
RpcServiceRequest("videorecog", "2020-03-20", "UnderstandVideoContent")
{
setMethod(HttpRequest::Method::Post);
}
UnderstandVideoContentRequest::~UnderstandVideoContentRequest()
{}
bool UnderstandVideoContentRequest::getAsync()const
{
return async_;
}
void UnderstandVideoContentRequest::setAsync(bool async)
{
async_ = async;
setBodyParameter("Async", async ? "true" : "false");
}
std::string UnderstandVideoContentRequest::getVideoURL()const
{
return videoURL_;
}
void UnderstandVideoContentRequest::setVideoURL(const std::string& videoURL)
{
videoURL_ = videoURL;
setBodyParameter("VideoURL", videoURL);
}

View File

@@ -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 <alibabacloud/videorecog/model/UnderstandVideoContentResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Videorecog;
using namespace AlibabaCloud::Videorecog::Model;
UnderstandVideoContentResult::UnderstandVideoContentResult() :
ServiceResult()
{}
UnderstandVideoContentResult::UnderstandVideoContentResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UnderstandVideoContentResult::~UnderstandVideoContentResult()
{}
void UnderstandVideoContentResult::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["TagInfo"].isNull())
data_.tagInfo = dataNode["TagInfo"].asString();
auto videoInfoNode = dataNode["VideoInfo"];
if(!videoInfoNode["Fps"].isNull())
data_.videoInfo.fps = std::stof(videoInfoNode["Fps"].asString());
if(!videoInfoNode["Duration"].isNull())
data_.videoInfo.duration = std::stol(videoInfoNode["Duration"].asString());
if(!videoInfoNode["Height"].isNull())
data_.videoInfo.height = std::stol(videoInfoNode["Height"].asString());
if(!videoInfoNode["Width"].isNull())
data_.videoInfo.width = std::stol(videoInfoNode["Width"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
}
std::string UnderstandVideoContentResult::getMessage()const
{
return message_;
}
UnderstandVideoContentResult::Data UnderstandVideoContentResult::getData()const
{
return data_;
}
std::string UnderstandVideoContentResult::getCode()const
{
return code_;
}

View File

@@ -23,6 +23,8 @@ set(videoseg_public_header
set(videoseg_public_header_model
include/alibabacloud/videoseg/model/GetAsyncJobResultRequest.h
include/alibabacloud/videoseg/model/GetAsyncJobResultResult.h
include/alibabacloud/videoseg/model/SegmentGreenScreenVideoRequest.h
include/alibabacloud/videoseg/model/SegmentGreenScreenVideoResult.h
include/alibabacloud/videoseg/model/SegmentHalfBodyRequest.h
include/alibabacloud/videoseg/model/SegmentHalfBodyResult.h
include/alibabacloud/videoseg/model/SegmentVideoBodyRequest.h
@@ -32,6 +34,8 @@ set(videoseg_src
src/VideosegClient.cc
src/model/GetAsyncJobResultRequest.cc
src/model/GetAsyncJobResultResult.cc
src/model/SegmentGreenScreenVideoRequest.cc
src/model/SegmentGreenScreenVideoResult.cc
src/model/SegmentHalfBodyRequest.cc
src/model/SegmentHalfBodyResult.cc
src/model/SegmentVideoBodyRequest.cc

View File

@@ -24,6 +24,8 @@
#include "VideosegExport.h"
#include "model/GetAsyncJobResultRequest.h"
#include "model/GetAsyncJobResultResult.h"
#include "model/SegmentGreenScreenVideoRequest.h"
#include "model/SegmentGreenScreenVideoResult.h"
#include "model/SegmentHalfBodyRequest.h"
#include "model/SegmentHalfBodyResult.h"
#include "model/SegmentVideoBodyRequest.h"
@@ -40,6 +42,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::GetAsyncJobResultResult> GetAsyncJobResultOutcome;
typedef std::future<GetAsyncJobResultOutcome> GetAsyncJobResultOutcomeCallable;
typedef std::function<void(const VideosegClient*, const Model::GetAsyncJobResultRequest&, const GetAsyncJobResultOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetAsyncJobResultAsyncHandler;
typedef Outcome<Error, Model::SegmentGreenScreenVideoResult> SegmentGreenScreenVideoOutcome;
typedef std::future<SegmentGreenScreenVideoOutcome> SegmentGreenScreenVideoOutcomeCallable;
typedef std::function<void(const VideosegClient*, const Model::SegmentGreenScreenVideoRequest&, const SegmentGreenScreenVideoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SegmentGreenScreenVideoAsyncHandler;
typedef Outcome<Error, Model::SegmentHalfBodyResult> SegmentHalfBodyOutcome;
typedef std::future<SegmentHalfBodyOutcome> SegmentHalfBodyOutcomeCallable;
typedef std::function<void(const VideosegClient*, const Model::SegmentHalfBodyRequest&, const SegmentHalfBodyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SegmentHalfBodyAsyncHandler;
@@ -54,6 +59,9 @@ namespace AlibabaCloud
GetAsyncJobResultOutcome getAsyncJobResult(const Model::GetAsyncJobResultRequest &request)const;
void getAsyncJobResultAsync(const Model::GetAsyncJobResultRequest& request, const GetAsyncJobResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetAsyncJobResultOutcomeCallable getAsyncJobResultCallable(const Model::GetAsyncJobResultRequest& request) const;
SegmentGreenScreenVideoOutcome segmentGreenScreenVideo(const Model::SegmentGreenScreenVideoRequest &request)const;
void segmentGreenScreenVideoAsync(const Model::SegmentGreenScreenVideoRequest& request, const SegmentGreenScreenVideoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
SegmentGreenScreenVideoOutcomeCallable segmentGreenScreenVideoCallable(const Model::SegmentGreenScreenVideoRequest& request) const;
SegmentHalfBodyOutcome segmentHalfBody(const Model::SegmentHalfBodyRequest &request)const;
void segmentHalfBodyAsync(const Model::SegmentHalfBodyRequest& request, const SegmentHalfBodyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
SegmentHalfBodyOutcomeCallable segmentHalfBodyCallable(const Model::SegmentHalfBodyRequest& request) const;

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_VIDEOSEG_MODEL_SEGMENTGREENSCREENVIDEOREQUEST_H_
#define ALIBABACLOUD_VIDEOSEG_MODEL_SEGMENTGREENSCREENVIDEOREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/videoseg/VideosegExport.h>
namespace AlibabaCloud
{
namespace Videoseg
{
namespace Model
{
class ALIBABACLOUD_VIDEOSEG_EXPORT SegmentGreenScreenVideoRequest : public RpcServiceRequest
{
public:
SegmentGreenScreenVideoRequest();
~SegmentGreenScreenVideoRequest();
bool getAsync()const;
void setAsync(bool async);
std::string getVideoURL()const;
void setVideoURL(const std::string& videoURL);
private:
bool async_;
std::string videoURL_;
};
}
}
}
#endif // !ALIBABACLOUD_VIDEOSEG_MODEL_SEGMENTGREENSCREENVIDEOREQUEST_H_

View File

@@ -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_VIDEOSEG_MODEL_SEGMENTGREENSCREENVIDEORESULT_H_
#define ALIBABACLOUD_VIDEOSEG_MODEL_SEGMENTGREENSCREENVIDEORESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/videoseg/VideosegExport.h>
namespace AlibabaCloud
{
namespace Videoseg
{
namespace Model
{
class ALIBABACLOUD_VIDEOSEG_EXPORT SegmentGreenScreenVideoResult : public ServiceResult
{
public:
struct Data
{
std::string videoURL;
};
SegmentGreenScreenVideoResult();
explicit SegmentGreenScreenVideoResult(const std::string &payload);
~SegmentGreenScreenVideoResult();
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_VIDEOSEG_MODEL_SEGMENTGREENSCREENVIDEORESULT_H_

View File

@@ -87,6 +87,42 @@ VideosegClient::GetAsyncJobResultOutcomeCallable VideosegClient::getAsyncJobResu
return task->get_future();
}
VideosegClient::SegmentGreenScreenVideoOutcome VideosegClient::segmentGreenScreenVideo(const SegmentGreenScreenVideoRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return SegmentGreenScreenVideoOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SegmentGreenScreenVideoOutcome(SegmentGreenScreenVideoResult(outcome.result()));
else
return SegmentGreenScreenVideoOutcome(outcome.error());
}
void VideosegClient::segmentGreenScreenVideoAsync(const SegmentGreenScreenVideoRequest& request, const SegmentGreenScreenVideoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, segmentGreenScreenVideo(request), context);
};
asyncExecute(new Runnable(fn));
}
VideosegClient::SegmentGreenScreenVideoOutcomeCallable VideosegClient::segmentGreenScreenVideoCallable(const SegmentGreenScreenVideoRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SegmentGreenScreenVideoOutcome()>>(
[this, request]()
{
return this->segmentGreenScreenVideo(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VideosegClient::SegmentHalfBodyOutcome VideosegClient::segmentHalfBody(const SegmentHalfBodyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/videoseg/model/SegmentGreenScreenVideoRequest.h>
using AlibabaCloud::Videoseg::Model::SegmentGreenScreenVideoRequest;
SegmentGreenScreenVideoRequest::SegmentGreenScreenVideoRequest() :
RpcServiceRequest("videoseg", "2020-03-20", "SegmentGreenScreenVideo")
{
setMethod(HttpRequest::Method::Post);
}
SegmentGreenScreenVideoRequest::~SegmentGreenScreenVideoRequest()
{}
bool SegmentGreenScreenVideoRequest::getAsync()const
{
return async_;
}
void SegmentGreenScreenVideoRequest::setAsync(bool async)
{
async_ = async;
setBodyParameter("Async", async ? "true" : "false");
}
std::string SegmentGreenScreenVideoRequest::getVideoURL()const
{
return videoURL_;
}
void SegmentGreenScreenVideoRequest::setVideoURL(const std::string& videoURL)
{
videoURL_ = videoURL;
setBodyParameter("VideoURL", videoURL);
}

View File

@@ -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 <alibabacloud/videoseg/model/SegmentGreenScreenVideoResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Videoseg;
using namespace AlibabaCloud::Videoseg::Model;
SegmentGreenScreenVideoResult::SegmentGreenScreenVideoResult() :
ServiceResult()
{}
SegmentGreenScreenVideoResult::SegmentGreenScreenVideoResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SegmentGreenScreenVideoResult::~SegmentGreenScreenVideoResult()
{}
void SegmentGreenScreenVideoResult::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["VideoURL"].isNull())
data_.videoURL = dataNode["VideoURL"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
}
std::string SegmentGreenScreenVideoResult::getMessage()const
{
return message_;
}
SegmentGreenScreenVideoResult::Data SegmentGreenScreenVideoResult::getData()const
{
return data_;
}
std::string SegmentGreenScreenVideoResult::getCode()const
{
return code_;
}