Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b32986689b | ||
|
|
db4bd7ae11 | ||
|
|
7e4fbe6210 | ||
|
|
de0798d2dd | ||
|
|
2650ca7420 | ||
|
|
59d9eaf390 |
15
CHANGELOG
15
CHANGELOG
@@ -1,3 +1,18 @@
|
||||
2020-06-30 Version: 1.36.487
|
||||
- Add ListMetrics API.
|
||||
|
||||
2020-06-29 Version: 1.36.486
|
||||
- Supported Rotate.
|
||||
|
||||
2020-06-29 Version: 1.36.485
|
||||
- Supported Rotate.
|
||||
|
||||
2020-06-29 Version: 1.36.484
|
||||
- Add Model Parameter For InitFaceVerify API.
|
||||
|
||||
2020-06-26 Version: 1.36.483
|
||||
- Supported Api EraseLogoInVideo.
|
||||
|
||||
2020-06-24 Version: 1.36.482
|
||||
- Add DescribeBackupPlanBilling.
|
||||
- Modify ConfigureBackupPlan.
|
||||
|
||||
@@ -37,14 +37,11 @@ namespace AlibabaCloud
|
||||
|
||||
std::string getBizType()const;
|
||||
void setBizType(const std::string& bizType);
|
||||
std::string getSourceIp()const;
|
||||
void setSourceIp(const std::string& sourceIp);
|
||||
std::string getBizId()const;
|
||||
void setBizId(const std::string& bizId);
|
||||
|
||||
private:
|
||||
std::string bizType_;
|
||||
std::string sourceIp_;
|
||||
std::string bizId_;
|
||||
|
||||
};
|
||||
|
||||
@@ -39,8 +39,6 @@ namespace AlibabaCloud
|
||||
void setFaceRetainedImageUrl(const std::string& faceRetainedImageUrl);
|
||||
std::string getUserId()const;
|
||||
void setUserId(const std::string& userId);
|
||||
std::string getSourceIp()const;
|
||||
void setSourceIp(const std::string& sourceIp);
|
||||
std::string getCallbackSeed()const;
|
||||
void setCallbackSeed(const std::string& callbackSeed);
|
||||
std::string getUserIp()const;
|
||||
@@ -71,7 +69,6 @@ namespace AlibabaCloud
|
||||
private:
|
||||
std::string faceRetainedImageUrl_;
|
||||
std::string userId_;
|
||||
std::string sourceIp_;
|
||||
std::string callbackSeed_;
|
||||
std::string userIp_;
|
||||
std::string idCardBackImageUrl_;
|
||||
|
||||
@@ -35,19 +35,13 @@ namespace AlibabaCloud
|
||||
GetMaterialsRequest();
|
||||
~GetMaterialsRequest();
|
||||
|
||||
long getResourceOwnerId()const;
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
std::string getBiz()const;
|
||||
void setBiz(const std::string& biz);
|
||||
std::string getSourceIp()const;
|
||||
void setSourceIp(const std::string& sourceIp);
|
||||
std::string getTicketId()const;
|
||||
void setTicketId(const std::string& ticketId);
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string biz_;
|
||||
std::string sourceIp_;
|
||||
std::string ticketId_;
|
||||
|
||||
};
|
||||
|
||||
@@ -35,19 +35,13 @@ namespace AlibabaCloud
|
||||
GetStatusRequest();
|
||||
~GetStatusRequest();
|
||||
|
||||
long getResourceOwnerId()const;
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
std::string getBiz()const;
|
||||
void setBiz(const std::string& biz);
|
||||
std::string getSourceIp()const;
|
||||
void setSourceIp(const std::string& sourceIp);
|
||||
std::string getTicketId()const;
|
||||
void setTicketId(const std::string& ticketId);
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string biz_;
|
||||
std::string sourceIp_;
|
||||
std::string ticketId_;
|
||||
|
||||
};
|
||||
|
||||
@@ -35,8 +35,6 @@ namespace AlibabaCloud
|
||||
GetVerifyTokenRequest();
|
||||
~GetVerifyTokenRequest();
|
||||
|
||||
long getResourceOwnerId()const;
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
std::string getBinding()const;
|
||||
void setBinding(const std::string& binding);
|
||||
std::string getVerifyConfigs()const;
|
||||
@@ -45,18 +43,14 @@ namespace AlibabaCloud
|
||||
void setUserData(const std::string& userData);
|
||||
std::string getBiz()const;
|
||||
void setBiz(const std::string& biz);
|
||||
std::string getSourceIp()const;
|
||||
void setSourceIp(const std::string& sourceIp);
|
||||
std::string getTicketId()const;
|
||||
void setTicketId(const std::string& ticketId);
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string binding_;
|
||||
std::string verifyConfigs_;
|
||||
std::string userData_;
|
||||
std::string biz_;
|
||||
std::string sourceIp_;
|
||||
std::string ticketId_;
|
||||
|
||||
};
|
||||
|
||||
@@ -51,6 +51,8 @@ namespace AlibabaCloud
|
||||
void setCertType(const std::string& certType);
|
||||
std::string getFaceContrastPictureUrl()const;
|
||||
void setFaceContrastPictureUrl(const std::string& faceContrastPictureUrl);
|
||||
std::string getModel()const;
|
||||
void setModel(const std::string& model);
|
||||
std::string getMetaInfo()const;
|
||||
void setMetaInfo(const std::string& metaInfo);
|
||||
std::string getOssObjectName()const;
|
||||
@@ -77,6 +79,7 @@ namespace AlibabaCloud
|
||||
std::string outerOrderNo_;
|
||||
std::string certType_;
|
||||
std::string faceContrastPictureUrl_;
|
||||
std::string model_;
|
||||
std::string metaInfo_;
|
||||
std::string ossObjectName_;
|
||||
std::string certName_;
|
||||
|
||||
@@ -39,8 +39,6 @@ namespace AlibabaCloud
|
||||
void setFaceImageUrl(const std::string& faceImageUrl);
|
||||
std::string getUserId()const;
|
||||
void setUserId(const std::string& userId);
|
||||
std::string getSourceIp()const;
|
||||
void setSourceIp(const std::string& sourceIp);
|
||||
std::string getIdCardBackImageUrl()const;
|
||||
void setIdCardBackImageUrl(const std::string& idCardBackImageUrl);
|
||||
std::string getIdCardNumber()const;
|
||||
@@ -57,7 +55,6 @@ namespace AlibabaCloud
|
||||
private:
|
||||
std::string faceImageUrl_;
|
||||
std::string userId_;
|
||||
std::string sourceIp_;
|
||||
std::string idCardBackImageUrl_;
|
||||
std::string idCardNumber_;
|
||||
std::string idCardFrontImageUrl_;
|
||||
|
||||
@@ -38,17 +38,6 @@ void DescribeVerifyResultRequest::setBizType(const std::string& bizType)
|
||||
setParameter("BizType", bizType);
|
||||
}
|
||||
|
||||
std::string DescribeVerifyResultRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DescribeVerifyResultRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string DescribeVerifyResultRequest::getBizId()const
|
||||
{
|
||||
return bizId_;
|
||||
|
||||
@@ -49,17 +49,6 @@ void DescribeVerifyTokenRequest::setUserId(const std::string& userId)
|
||||
setParameter("UserId", userId);
|
||||
}
|
||||
|
||||
std::string DescribeVerifyTokenRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DescribeVerifyTokenRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string DescribeVerifyTokenRequest::getCallbackSeed()const
|
||||
{
|
||||
return callbackSeed_;
|
||||
|
||||
@@ -27,17 +27,6 @@ GetMaterialsRequest::GetMaterialsRequest() :
|
||||
GetMaterialsRequest::~GetMaterialsRequest()
|
||||
{}
|
||||
|
||||
long GetMaterialsRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void GetMaterialsRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string GetMaterialsRequest::getBiz()const
|
||||
{
|
||||
return biz_;
|
||||
@@ -49,17 +38,6 @@ void GetMaterialsRequest::setBiz(const std::string& biz)
|
||||
setParameter("Biz", biz);
|
||||
}
|
||||
|
||||
std::string GetMaterialsRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void GetMaterialsRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string GetMaterialsRequest::getTicketId()const
|
||||
{
|
||||
return ticketId_;
|
||||
|
||||
@@ -27,17 +27,6 @@ GetStatusRequest::GetStatusRequest() :
|
||||
GetStatusRequest::~GetStatusRequest()
|
||||
{}
|
||||
|
||||
long GetStatusRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void GetStatusRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string GetStatusRequest::getBiz()const
|
||||
{
|
||||
return biz_;
|
||||
@@ -49,17 +38,6 @@ void GetStatusRequest::setBiz(const std::string& biz)
|
||||
setParameter("Biz", biz);
|
||||
}
|
||||
|
||||
std::string GetStatusRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void GetStatusRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string GetStatusRequest::getTicketId()const
|
||||
{
|
||||
return ticketId_;
|
||||
|
||||
@@ -27,17 +27,6 @@ GetVerifyTokenRequest::GetVerifyTokenRequest() :
|
||||
GetVerifyTokenRequest::~GetVerifyTokenRequest()
|
||||
{}
|
||||
|
||||
long GetVerifyTokenRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void GetVerifyTokenRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string GetVerifyTokenRequest::getBinding()const
|
||||
{
|
||||
return binding_;
|
||||
@@ -82,17 +71,6 @@ void GetVerifyTokenRequest::setBiz(const std::string& biz)
|
||||
setParameter("Biz", biz);
|
||||
}
|
||||
|
||||
std::string GetVerifyTokenRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void GetVerifyTokenRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string GetVerifyTokenRequest::getTicketId()const
|
||||
{
|
||||
return ticketId_;
|
||||
|
||||
@@ -115,6 +115,17 @@ void InitFaceVerifyRequest::setFaceContrastPictureUrl(const std::string& faceCon
|
||||
setParameter("FaceContrastPictureUrl", faceContrastPictureUrl);
|
||||
}
|
||||
|
||||
std::string InitFaceVerifyRequest::getModel()const
|
||||
{
|
||||
return model_;
|
||||
}
|
||||
|
||||
void InitFaceVerifyRequest::setModel(const std::string& model)
|
||||
{
|
||||
model_ = model;
|
||||
setBodyParameter("Model", model);
|
||||
}
|
||||
|
||||
std::string InitFaceVerifyRequest::getMetaInfo()const
|
||||
{
|
||||
return metaInfo_;
|
||||
|
||||
@@ -49,17 +49,6 @@ void VerifyMaterialRequest::setUserId(const std::string& userId)
|
||||
setParameter("UserId", userId);
|
||||
}
|
||||
|
||||
std::string VerifyMaterialRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void VerifyMaterialRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string VerifyMaterialRequest::getIdCardBackImageUrl()const
|
||||
{
|
||||
return idCardBackImageUrl_;
|
||||
|
||||
@@ -12,7 +12,7 @@ echo $MAKE
|
||||
rm -rf sdk_build
|
||||
mkdir sdk_build
|
||||
cd sdk_build
|
||||
cmake -DBUILD_PRODUCT="$product" -DBUILD_FUNCTION_TESTS=OFF -DBUILD_UNIT_TESTS=OFF -DENABLE_COVERAGE=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..
|
||||
cmake -DBUILD_PRODUCT="$product" -DBUILD_FUNCTION_TESTS=OFF -DBUILD_UNIT_TESTS=OFF -DENABLE_COVERAGE=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/ ..
|
||||
$MAKE
|
||||
|
||||
make install
|
||||
|
||||
@@ -93,8 +93,6 @@ set(imm_public_header_model
|
||||
include/alibabacloud/imm/model/EncodeBlindWatermarkResult.h
|
||||
include/alibabacloud/imm/model/FindImagesRequest.h
|
||||
include/alibabacloud/imm/model/FindImagesResult.h
|
||||
include/alibabacloud/imm/model/FindImagesByTagNamesRequest.h
|
||||
include/alibabacloud/imm/model/FindImagesByTagNamesResult.h
|
||||
include/alibabacloud/imm/model/FindSimilarFacesRequest.h
|
||||
include/alibabacloud/imm/model/FindSimilarFacesResult.h
|
||||
include/alibabacloud/imm/model/GetContentKeyRequest.h
|
||||
@@ -248,8 +246,6 @@ set(imm_src
|
||||
src/model/EncodeBlindWatermarkResult.cc
|
||||
src/model/FindImagesRequest.cc
|
||||
src/model/FindImagesResult.cc
|
||||
src/model/FindImagesByTagNamesRequest.cc
|
||||
src/model/FindImagesByTagNamesResult.cc
|
||||
src/model/FindSimilarFacesRequest.cc
|
||||
src/model/FindSimilarFacesResult.cc
|
||||
src/model/GetContentKeyRequest.cc
|
||||
|
||||
@@ -94,8 +94,6 @@
|
||||
#include "model/EncodeBlindWatermarkResult.h"
|
||||
#include "model/FindImagesRequest.h"
|
||||
#include "model/FindImagesResult.h"
|
||||
#include "model/FindImagesByTagNamesRequest.h"
|
||||
#include "model/FindImagesByTagNamesResult.h"
|
||||
#include "model/FindSimilarFacesRequest.h"
|
||||
#include "model/FindSimilarFacesResult.h"
|
||||
#include "model/GetContentKeyRequest.h"
|
||||
@@ -291,9 +289,6 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::FindImagesResult> FindImagesOutcome;
|
||||
typedef std::future<FindImagesOutcome> FindImagesOutcomeCallable;
|
||||
typedef std::function<void(const ImmClient*, const Model::FindImagesRequest&, const FindImagesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> FindImagesAsyncHandler;
|
||||
typedef Outcome<Error, Model::FindImagesByTagNamesResult> FindImagesByTagNamesOutcome;
|
||||
typedef std::future<FindImagesByTagNamesOutcome> FindImagesByTagNamesOutcomeCallable;
|
||||
typedef std::function<void(const ImmClient*, const Model::FindImagesByTagNamesRequest&, const FindImagesByTagNamesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> FindImagesByTagNamesAsyncHandler;
|
||||
typedef Outcome<Error, Model::FindSimilarFacesResult> FindSimilarFacesOutcome;
|
||||
typedef std::future<FindSimilarFacesOutcome> FindSimilarFacesOutcomeCallable;
|
||||
typedef std::function<void(const ImmClient*, const Model::FindSimilarFacesRequest&, const FindSimilarFacesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> FindSimilarFacesAsyncHandler;
|
||||
@@ -524,9 +519,6 @@ namespace AlibabaCloud
|
||||
FindImagesOutcome findImages(const Model::FindImagesRequest &request)const;
|
||||
void findImagesAsync(const Model::FindImagesRequest& request, const FindImagesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
FindImagesOutcomeCallable findImagesCallable(const Model::FindImagesRequest& request) const;
|
||||
FindImagesByTagNamesOutcome findImagesByTagNames(const Model::FindImagesByTagNamesRequest &request)const;
|
||||
void findImagesByTagNamesAsync(const Model::FindImagesByTagNamesRequest& request, const FindImagesByTagNamesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
FindImagesByTagNamesOutcomeCallable findImagesByTagNamesCallable(const Model::FindImagesByTagNamesRequest& request) const;
|
||||
FindSimilarFacesOutcome findSimilarFaces(const Model::FindSimilarFacesRequest &request)const;
|
||||
void findSimilarFacesAsync(const Model::FindSimilarFacesRequest& request, const FindSimilarFacesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
FindSimilarFacesOutcomeCallable findSimilarFacesCallable(const Model::FindSimilarFacesRequest& request) const;
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_IMM_MODEL_FINDIMAGESBYTAGNAMESREQUEST_H_
|
||||
#define ALIBABACLOUD_IMM_MODEL_FINDIMAGESBYTAGNAMESREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/imm/ImmExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Imm
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IMM_EXPORT FindImagesByTagNamesRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
FindImagesByTagNamesRequest();
|
||||
~FindImagesByTagNamesRequest();
|
||||
|
||||
std::string getProject()const;
|
||||
void setProject(const std::string& project);
|
||||
std::string getAccessKeyId()const;
|
||||
void setAccessKeyId(const std::string& accessKeyId);
|
||||
int getLimit()const;
|
||||
void setLimit(int limit);
|
||||
std::string getTagNames()const;
|
||||
void setTagNames(const std::string& tagNames);
|
||||
std::string getMarker()const;
|
||||
void setMarker(const std::string& marker);
|
||||
std::string getSetId()const;
|
||||
void setSetId(const std::string& setId);
|
||||
|
||||
private:
|
||||
std::string project_;
|
||||
std::string accessKeyId_;
|
||||
int limit_;
|
||||
std::string tagNames_;
|
||||
std::string marker_;
|
||||
std::string setId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IMM_MODEL_FINDIMAGESBYTAGNAMESREQUEST_H_
|
||||
@@ -1,194 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_IMM_MODEL_FINDIMAGESBYTAGNAMESRESULT_H_
|
||||
#define ALIBABACLOUD_IMM_MODEL_FINDIMAGESBYTAGNAMESRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/imm/ImmExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Imm
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IMM_EXPORT FindImagesByTagNamesResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Frames
|
||||
{
|
||||
struct Address
|
||||
{
|
||||
std::string township;
|
||||
std::string addressLine;
|
||||
std::string country;
|
||||
std::string city;
|
||||
std::string district;
|
||||
std::string province;
|
||||
};
|
||||
struct FacesItem
|
||||
{
|
||||
struct EmotionDetails
|
||||
{
|
||||
float cALM;
|
||||
float sCARED;
|
||||
float hAPPY;
|
||||
float sAD;
|
||||
float sURPRISED;
|
||||
float aNGRY;
|
||||
float dISGUSTED;
|
||||
};
|
||||
struct FaceAttributes
|
||||
{
|
||||
struct FaceBoundary
|
||||
{
|
||||
int left;
|
||||
int top;
|
||||
int height;
|
||||
int width;
|
||||
};
|
||||
struct HeadPose
|
||||
{
|
||||
float pitch;
|
||||
float roll;
|
||||
float yaw;
|
||||
};
|
||||
FaceBoundary faceBoundary;
|
||||
std::string beard;
|
||||
float beardConfidence;
|
||||
HeadPose headPose;
|
||||
float raceConfidence;
|
||||
std::string race;
|
||||
std::string glasses;
|
||||
float maskConfidence;
|
||||
std::string mask;
|
||||
float glassesConfidence;
|
||||
};
|
||||
EmotionDetails emotionDetails;
|
||||
float faceConfidence;
|
||||
std::string faceId;
|
||||
float attractive;
|
||||
float faceQuality;
|
||||
FaceAttributes faceAttributes;
|
||||
float genderConfidence;
|
||||
float emotionConfidence;
|
||||
std::string gender;
|
||||
std::string emotion;
|
||||
int age;
|
||||
std::string groupId;
|
||||
};
|
||||
struct TagsItem
|
||||
{
|
||||
float tagConfidence;
|
||||
std::string tagName;
|
||||
int tagLevel;
|
||||
std::string parentTagName;
|
||||
};
|
||||
struct OCRItem
|
||||
{
|
||||
struct OCRBoundary
|
||||
{
|
||||
int left;
|
||||
int left1;
|
||||
int height;
|
||||
int width;
|
||||
};
|
||||
OCRBoundary oCRBoundary;
|
||||
float oCRConfidence;
|
||||
std::string oCRContents;
|
||||
};
|
||||
struct CelebrityItem
|
||||
{
|
||||
struct CelebrityBoundary
|
||||
{
|
||||
int left;
|
||||
int top;
|
||||
int height;
|
||||
int width;
|
||||
};
|
||||
std::string celebrityName;
|
||||
CelebrityBoundary celebrityBoundary;
|
||||
std::string celebrityGender;
|
||||
std::string celebrityLibraryName;
|
||||
float celebrityConfidence;
|
||||
};
|
||||
std::string modifyTime;
|
||||
Address address;
|
||||
std::string sourceType;
|
||||
std::string sourceUri;
|
||||
std::string facesFailReason;
|
||||
std::string remarksA;
|
||||
std::string addressFailReason;
|
||||
std::string remarksB;
|
||||
std::string addressModifyTime;
|
||||
std::string imageFormat;
|
||||
std::string tagsFailReason;
|
||||
std::string remarksArrayB;
|
||||
std::string facesModifyTime;
|
||||
std::string exif;
|
||||
std::string remarksC;
|
||||
std::string remarksD;
|
||||
int imageWidth;
|
||||
std::vector<Frames::CelebrityItem> celebrity;
|
||||
std::string sourcePosition;
|
||||
std::string remarksArrayA;
|
||||
std::vector<Frames::FacesItem> faces;
|
||||
std::vector<Frames::TagsItem> tags;
|
||||
std::string addressStatus;
|
||||
std::string facesStatus;
|
||||
std::string createTime;
|
||||
std::string tagsModifyTime;
|
||||
std::string externalId;
|
||||
std::string imageUri;
|
||||
std::string orientation;
|
||||
std::string oCRStatus;
|
||||
std::string oCRModifyTime;
|
||||
std::string imageTime;
|
||||
std::string celebrityModifyTime;
|
||||
int imageHeight;
|
||||
std::string tagsStatus;
|
||||
std::string oCRFailReason;
|
||||
std::string celebrityFailReason;
|
||||
std::string celebrityStatus;
|
||||
std::vector<Frames::OCRItem> oCR;
|
||||
int fileSize;
|
||||
std::string location;
|
||||
};
|
||||
|
||||
|
||||
FindImagesByTagNamesResult();
|
||||
explicit FindImagesByTagNamesResult(const std::string &payload);
|
||||
~FindImagesByTagNamesResult();
|
||||
std::vector<Frames> getImages()const;
|
||||
std::string getSetId()const;
|
||||
std::string getNextMarker()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::vector<Frames> images_;
|
||||
std::string setId_;
|
||||
std::string nextMarker_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IMM_MODEL_FINDIMAGESBYTAGNAMESRESULT_H_
|
||||
@@ -34,6 +34,19 @@ namespace AlibabaCloud
|
||||
public:
|
||||
struct ImagesItem
|
||||
{
|
||||
struct ImageQuality
|
||||
{
|
||||
float clarityScore;
|
||||
float compositionScore;
|
||||
float contrastScore;
|
||||
float color;
|
||||
float exposure;
|
||||
float overallScore;
|
||||
float clarity;
|
||||
float contrast;
|
||||
float exposureScore;
|
||||
float colorScore;
|
||||
};
|
||||
struct Address
|
||||
{
|
||||
std::string township;
|
||||
@@ -43,6 +56,19 @@ namespace AlibabaCloud
|
||||
std::string district;
|
||||
std::string province;
|
||||
};
|
||||
struct CroppingSuggestionItem
|
||||
{
|
||||
struct CroppingBoundary
|
||||
{
|
||||
int left;
|
||||
int top;
|
||||
int height;
|
||||
int width;
|
||||
};
|
||||
std::string aspectRatio;
|
||||
float score;
|
||||
CroppingBoundary croppingBoundary;
|
||||
};
|
||||
struct FacesItem
|
||||
{
|
||||
struct EmotionDetails
|
||||
@@ -129,22 +155,16 @@ namespace AlibabaCloud
|
||||
std::string celebrityLibraryName;
|
||||
float celebrityConfidence;
|
||||
};
|
||||
std::string modifyTime;
|
||||
ImageQuality imageQuality;
|
||||
Address address;
|
||||
std::string sourceType;
|
||||
std::string sourceUri;
|
||||
std::string facesFailReason;
|
||||
std::string remarksA;
|
||||
std::string croppingSuggestionFailReason;
|
||||
std::string addressFailReason;
|
||||
std::string remarksB;
|
||||
std::string addressModifyTime;
|
||||
std::string imageFormat;
|
||||
std::string tagsFailReason;
|
||||
std::string remarksArrayB;
|
||||
std::string facesModifyTime;
|
||||
std::string exif;
|
||||
std::string remarksC;
|
||||
std::string remarksD;
|
||||
int imageWidth;
|
||||
std::vector<ImagesItem::CelebrityItem> celebrity;
|
||||
std::string sourcePosition;
|
||||
@@ -152,23 +172,37 @@ namespace AlibabaCloud
|
||||
std::vector<ImagesItem::FacesItem> faces;
|
||||
std::vector<ImagesItem::TagsItem> tags;
|
||||
std::string addressStatus;
|
||||
std::string imageQualityModifyTime;
|
||||
std::vector<ImagesItem::CroppingSuggestionItem> croppingSuggestion;
|
||||
std::string imageQualityFailReason;
|
||||
std::string imageUri;
|
||||
std::string orientation;
|
||||
std::string imageTime;
|
||||
std::string croppingSuggestionModifyTime;
|
||||
std::string celebrityModifyTime;
|
||||
int imageHeight;
|
||||
std::string tagsStatus;
|
||||
std::string imageQualityStatus;
|
||||
std::string celebrityFailReason;
|
||||
std::string celebrityStatus;
|
||||
int fileSize;
|
||||
std::string modifyTime;
|
||||
std::string croppingSuggestionStatus;
|
||||
std::string remarksA;
|
||||
std::string remarksB;
|
||||
std::string addressModifyTime;
|
||||
std::string tagsFailReason;
|
||||
std::string facesModifyTime;
|
||||
std::string remarksC;
|
||||
std::string remarksD;
|
||||
std::string facesStatus;
|
||||
std::string createTime;
|
||||
std::string tagsModifyTime;
|
||||
std::string externalId;
|
||||
std::string imageUri;
|
||||
std::string orientation;
|
||||
std::string oCRStatus;
|
||||
std::string oCRModifyTime;
|
||||
std::string imageTime;
|
||||
std::string celebrityModifyTime;
|
||||
int imageHeight;
|
||||
std::string tagsStatus;
|
||||
std::string oCRFailReason;
|
||||
std::string celebrityFailReason;
|
||||
std::string celebrityStatus;
|
||||
std::vector<ImagesItem::OCRItem> oCR;
|
||||
int fileSize;
|
||||
std::string location;
|
||||
};
|
||||
|
||||
|
||||
@@ -32,6 +32,19 @@ namespace AlibabaCloud
|
||||
class ALIBABACLOUD_IMM_EXPORT GetImageResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct ImageQuality
|
||||
{
|
||||
float clarityScore;
|
||||
float compositionScore;
|
||||
float contrastScore;
|
||||
float color;
|
||||
float exposure;
|
||||
float overallScore;
|
||||
float clarity;
|
||||
float contrast;
|
||||
float exposureScore;
|
||||
float colorScore;
|
||||
};
|
||||
struct Address
|
||||
{
|
||||
std::string township;
|
||||
@@ -41,6 +54,19 @@ namespace AlibabaCloud
|
||||
std::string district;
|
||||
std::string province;
|
||||
};
|
||||
struct CroppingSuggestionItem
|
||||
{
|
||||
struct CroppingBoundary
|
||||
{
|
||||
int left;
|
||||
int top;
|
||||
int height;
|
||||
int width;
|
||||
};
|
||||
std::string aspectRatio;
|
||||
float score;
|
||||
CroppingBoundary croppingBoundary;
|
||||
};
|
||||
struct FacesItem
|
||||
{
|
||||
struct FaceAttributes
|
||||
@@ -132,22 +158,16 @@ namespace AlibabaCloud
|
||||
GetImageResult();
|
||||
explicit GetImageResult(const std::string &payload);
|
||||
~GetImageResult();
|
||||
std::string getModifyTime()const;
|
||||
ImageQuality getImageQuality()const;
|
||||
Address getAddress()const;
|
||||
std::string getSourceType()const;
|
||||
std::string getSourceUri()const;
|
||||
std::string getFacesFailReason()const;
|
||||
std::string getRemarksA()const;
|
||||
std::string getCroppingSuggestionFailReason()const;
|
||||
std::string getAddressFailReason()const;
|
||||
std::string getRemarksB()const;
|
||||
std::string getAddressModifyTime()const;
|
||||
std::string getImageFormat()const;
|
||||
std::string getTagsFailReason()const;
|
||||
std::string getRemarksArrayB()const;
|
||||
std::string getExif()const;
|
||||
std::string getFacesModifyTime()const;
|
||||
std::string getRemarksC()const;
|
||||
std::string getRemarksD()const;
|
||||
int getImageWidth()const;
|
||||
std::vector<CelebrityItem> getCelebrity()const;
|
||||
std::string getSourcePosition()const;
|
||||
@@ -155,45 +175,53 @@ namespace AlibabaCloud
|
||||
std::vector<FacesItem> getFaces()const;
|
||||
std::vector<TagsItem> getTags()const;
|
||||
std::string getAddressStatus()const;
|
||||
std::string getImageQualityModifyTime()const;
|
||||
std::vector<CroppingSuggestionItem> getCroppingSuggestion()const;
|
||||
std::string getImageQualityFailReason()const;
|
||||
std::string getImageUri()const;
|
||||
std::string getOrientation()const;
|
||||
std::string getImageTime()const;
|
||||
std::string getCroppingSuggestionModifyTime()const;
|
||||
std::string getCelebrityModifyTime()const;
|
||||
int getImageHeight()const;
|
||||
std::string getTagsStatus()const;
|
||||
std::string getImageQualityStatus()const;
|
||||
std::string getCelebrityFailReason()const;
|
||||
std::string getSetId()const;
|
||||
std::string getCelebrityStatus()const;
|
||||
int getFileSize()const;
|
||||
std::string getModifyTime()const;
|
||||
std::string getCroppingSuggestionStatus()const;
|
||||
std::string getRemarksA()const;
|
||||
std::string getRemarksB()const;
|
||||
std::string getAddressModifyTime()const;
|
||||
std::string getTagsFailReason()const;
|
||||
std::string getFacesModifyTime()const;
|
||||
std::string getRemarksC()const;
|
||||
std::string getRemarksD()const;
|
||||
std::string getFacesStatus()const;
|
||||
std::string getCreateTime()const;
|
||||
std::string getTagsModifyTime()const;
|
||||
std::string getExternalId()const;
|
||||
std::string getImageUri()const;
|
||||
std::string getOrientation()const;
|
||||
std::string getOCRStatus()const;
|
||||
std::string getOCRModifyTime()const;
|
||||
std::string getImageTime()const;
|
||||
std::string getCelebrityModifyTime()const;
|
||||
int getImageHeight()const;
|
||||
std::string getTagsStatus()const;
|
||||
std::string getOCRFailReason()const;
|
||||
std::string getCelebrityFailReason()const;
|
||||
std::string getSetId()const;
|
||||
std::string getCelebrityStatus()const;
|
||||
std::vector<OCRItem> getOCR()const;
|
||||
int getFileSize()const;
|
||||
std::string getLocation()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string modifyTime_;
|
||||
ImageQuality imageQuality_;
|
||||
Address address_;
|
||||
std::string sourceType_;
|
||||
std::string sourceUri_;
|
||||
std::string facesFailReason_;
|
||||
std::string remarksA_;
|
||||
std::string croppingSuggestionFailReason_;
|
||||
std::string addressFailReason_;
|
||||
std::string remarksB_;
|
||||
std::string addressModifyTime_;
|
||||
std::string imageFormat_;
|
||||
std::string tagsFailReason_;
|
||||
std::string remarksArrayB_;
|
||||
std::string exif_;
|
||||
std::string facesModifyTime_;
|
||||
std::string remarksC_;
|
||||
std::string remarksD_;
|
||||
int imageWidth_;
|
||||
std::vector<CelebrityItem> celebrity_;
|
||||
std::string sourcePosition_;
|
||||
@@ -201,24 +229,38 @@ namespace AlibabaCloud
|
||||
std::vector<FacesItem> faces_;
|
||||
std::vector<TagsItem> tags_;
|
||||
std::string addressStatus_;
|
||||
std::string imageQualityModifyTime_;
|
||||
std::vector<CroppingSuggestionItem> croppingSuggestion_;
|
||||
std::string imageQualityFailReason_;
|
||||
std::string imageUri_;
|
||||
std::string orientation_;
|
||||
std::string imageTime_;
|
||||
std::string croppingSuggestionModifyTime_;
|
||||
std::string celebrityModifyTime_;
|
||||
int imageHeight_;
|
||||
std::string tagsStatus_;
|
||||
std::string imageQualityStatus_;
|
||||
std::string celebrityFailReason_;
|
||||
std::string setId_;
|
||||
std::string celebrityStatus_;
|
||||
int fileSize_;
|
||||
std::string modifyTime_;
|
||||
std::string croppingSuggestionStatus_;
|
||||
std::string remarksA_;
|
||||
std::string remarksB_;
|
||||
std::string addressModifyTime_;
|
||||
std::string tagsFailReason_;
|
||||
std::string facesModifyTime_;
|
||||
std::string remarksC_;
|
||||
std::string remarksD_;
|
||||
std::string facesStatus_;
|
||||
std::string createTime_;
|
||||
std::string tagsModifyTime_;
|
||||
std::string externalId_;
|
||||
std::string imageUri_;
|
||||
std::string orientation_;
|
||||
std::string oCRStatus_;
|
||||
std::string oCRModifyTime_;
|
||||
std::string imageTime_;
|
||||
std::string celebrityModifyTime_;
|
||||
int imageHeight_;
|
||||
std::string tagsStatus_;
|
||||
std::string oCRFailReason_;
|
||||
std::string celebrityFailReason_;
|
||||
std::string setId_;
|
||||
std::string celebrityStatus_;
|
||||
std::vector<OCRItem> oCR_;
|
||||
int fileSize_;
|
||||
std::string location_;
|
||||
|
||||
};
|
||||
|
||||
@@ -64,6 +64,7 @@ namespace AlibabaCloud
|
||||
std::string codecTag;
|
||||
std::string frames;
|
||||
std::string codecTimeBase;
|
||||
std::string rotate;
|
||||
std::string sampleAspectRatio;
|
||||
std::string startTime;
|
||||
int index;
|
||||
|
||||
@@ -34,6 +34,19 @@ namespace AlibabaCloud
|
||||
public:
|
||||
struct ImagesItem
|
||||
{
|
||||
struct ImageQuality
|
||||
{
|
||||
float clarityScore;
|
||||
float compositionScore;
|
||||
float contrastScore;
|
||||
float color;
|
||||
float exposure;
|
||||
float overallScore;
|
||||
float clarity;
|
||||
float contrast;
|
||||
float exposureScore;
|
||||
float colorScore;
|
||||
};
|
||||
struct Address
|
||||
{
|
||||
std::string township;
|
||||
@@ -43,6 +56,19 @@ namespace AlibabaCloud
|
||||
std::string district;
|
||||
std::string province;
|
||||
};
|
||||
struct CroppingSuggestionItem
|
||||
{
|
||||
struct CroppingBoundary
|
||||
{
|
||||
int left;
|
||||
int top;
|
||||
int height;
|
||||
int width;
|
||||
};
|
||||
std::string aspectRatio;
|
||||
float score;
|
||||
CroppingBoundary croppingBoundary;
|
||||
};
|
||||
struct FacesItem
|
||||
{
|
||||
struct EmotionDetails
|
||||
@@ -129,22 +155,16 @@ namespace AlibabaCloud
|
||||
std::string celebrityLibraryName;
|
||||
float celebrityConfidence;
|
||||
};
|
||||
std::string modifyTime;
|
||||
ImageQuality imageQuality;
|
||||
Address address;
|
||||
std::string sourceType;
|
||||
std::string sourceUri;
|
||||
std::string facesFailReason;
|
||||
std::string remarksA;
|
||||
std::string croppingSuggestionFailReason;
|
||||
std::string addressFailReason;
|
||||
std::string remarksB;
|
||||
std::string addressModifyTime;
|
||||
std::string imageFormat;
|
||||
std::string tagsFailReason;
|
||||
std::string remarksArrayB;
|
||||
std::string facesModifyTime;
|
||||
std::string exif;
|
||||
std::string remarksC;
|
||||
std::string remarksD;
|
||||
int imageWidth;
|
||||
std::vector<ImagesItem::CelebrityItem> celebrity;
|
||||
std::string sourcePosition;
|
||||
@@ -152,23 +172,37 @@ namespace AlibabaCloud
|
||||
std::vector<ImagesItem::FacesItem> faces;
|
||||
std::vector<ImagesItem::TagsItem> tags;
|
||||
std::string addressStatus;
|
||||
std::string imageQualityModifyTime;
|
||||
std::vector<ImagesItem::CroppingSuggestionItem> croppingSuggestion;
|
||||
std::string imageQualityFailReason;
|
||||
std::string imageUri;
|
||||
std::string orientation;
|
||||
std::string imageTime;
|
||||
std::string croppingSuggestionModifyTime;
|
||||
std::string celebrityModifyTime;
|
||||
int imageHeight;
|
||||
std::string tagsStatus;
|
||||
std::string imageQualityStatus;
|
||||
std::string celebrityFailReason;
|
||||
std::string celebrityStatus;
|
||||
int fileSize;
|
||||
std::string modifyTime;
|
||||
std::string croppingSuggestionStatus;
|
||||
std::string remarksA;
|
||||
std::string remarksB;
|
||||
std::string addressModifyTime;
|
||||
std::string tagsFailReason;
|
||||
std::string facesModifyTime;
|
||||
std::string remarksC;
|
||||
std::string remarksD;
|
||||
std::string facesStatus;
|
||||
std::string createTime;
|
||||
std::string tagsModifyTime;
|
||||
std::string externalId;
|
||||
std::string imageUri;
|
||||
std::string orientation;
|
||||
std::string oCRStatus;
|
||||
std::string oCRModifyTime;
|
||||
std::string imageTime;
|
||||
std::string celebrityModifyTime;
|
||||
int imageHeight;
|
||||
std::string tagsStatus;
|
||||
std::string oCRFailReason;
|
||||
std::string celebrityFailReason;
|
||||
std::string celebrityStatus;
|
||||
std::vector<ImagesItem::OCRItem> oCR;
|
||||
int fileSize;
|
||||
std::string location;
|
||||
};
|
||||
|
||||
|
||||
@@ -1347,42 +1347,6 @@ ImmClient::FindImagesOutcomeCallable ImmClient::findImagesCallable(const FindIma
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ImmClient::FindImagesByTagNamesOutcome ImmClient::findImagesByTagNames(const FindImagesByTagNamesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return FindImagesByTagNamesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return FindImagesByTagNamesOutcome(FindImagesByTagNamesResult(outcome.result()));
|
||||
else
|
||||
return FindImagesByTagNamesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ImmClient::findImagesByTagNamesAsync(const FindImagesByTagNamesRequest& request, const FindImagesByTagNamesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, findImagesByTagNames(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ImmClient::FindImagesByTagNamesOutcomeCallable ImmClient::findImagesByTagNamesCallable(const FindImagesByTagNamesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<FindImagesByTagNamesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->findImagesByTagNames(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ImmClient::FindSimilarFacesOutcome ImmClient::findSimilarFaces(const FindSimilarFacesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/imm/model/FindImagesByTagNamesRequest.h>
|
||||
|
||||
using AlibabaCloud::Imm::Model::FindImagesByTagNamesRequest;
|
||||
|
||||
FindImagesByTagNamesRequest::FindImagesByTagNamesRequest() :
|
||||
RpcServiceRequest("imm", "2017-09-06", "FindImagesByTagNames")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
FindImagesByTagNamesRequest::~FindImagesByTagNamesRequest()
|
||||
{}
|
||||
|
||||
std::string FindImagesByTagNamesRequest::getProject()const
|
||||
{
|
||||
return project_;
|
||||
}
|
||||
|
||||
void FindImagesByTagNamesRequest::setProject(const std::string& project)
|
||||
{
|
||||
project_ = project;
|
||||
setParameter("Project", project);
|
||||
}
|
||||
|
||||
std::string FindImagesByTagNamesRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void FindImagesByTagNamesRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
int FindImagesByTagNamesRequest::getLimit()const
|
||||
{
|
||||
return limit_;
|
||||
}
|
||||
|
||||
void FindImagesByTagNamesRequest::setLimit(int limit)
|
||||
{
|
||||
limit_ = limit;
|
||||
setParameter("Limit", std::to_string(limit));
|
||||
}
|
||||
|
||||
std::string FindImagesByTagNamesRequest::getTagNames()const
|
||||
{
|
||||
return tagNames_;
|
||||
}
|
||||
|
||||
void FindImagesByTagNamesRequest::setTagNames(const std::string& tagNames)
|
||||
{
|
||||
tagNames_ = tagNames;
|
||||
setParameter("TagNames", tagNames);
|
||||
}
|
||||
|
||||
std::string FindImagesByTagNamesRequest::getMarker()const
|
||||
{
|
||||
return marker_;
|
||||
}
|
||||
|
||||
void FindImagesByTagNamesRequest::setMarker(const std::string& marker)
|
||||
{
|
||||
marker_ = marker;
|
||||
setParameter("Marker", marker);
|
||||
}
|
||||
|
||||
std::string FindImagesByTagNamesRequest::getSetId()const
|
||||
{
|
||||
return setId_;
|
||||
}
|
||||
|
||||
void FindImagesByTagNamesRequest::setSetId(const std::string& setId)
|
||||
{
|
||||
setId_ = setId;
|
||||
setParameter("SetId", setId);
|
||||
}
|
||||
|
||||
@@ -1,284 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/imm/model/FindImagesByTagNamesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Imm;
|
||||
using namespace AlibabaCloud::Imm::Model;
|
||||
|
||||
FindImagesByTagNamesResult::FindImagesByTagNamesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
FindImagesByTagNamesResult::FindImagesByTagNamesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
FindImagesByTagNamesResult::~FindImagesByTagNamesResult()
|
||||
{}
|
||||
|
||||
void FindImagesByTagNamesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allImagesNode = value["Images"]["Frames"];
|
||||
for (auto valueImagesFrames : allImagesNode)
|
||||
{
|
||||
Frames imagesObject;
|
||||
if(!valueImagesFrames["FacesModifyTime"].isNull())
|
||||
imagesObject.facesModifyTime = valueImagesFrames["FacesModifyTime"].asString();
|
||||
if(!valueImagesFrames["OCRModifyTime"].isNull())
|
||||
imagesObject.oCRModifyTime = valueImagesFrames["OCRModifyTime"].asString();
|
||||
if(!valueImagesFrames["OCRStatus"].isNull())
|
||||
imagesObject.oCRStatus = valueImagesFrames["OCRStatus"].asString();
|
||||
if(!valueImagesFrames["SourcePosition"].isNull())
|
||||
imagesObject.sourcePosition = valueImagesFrames["SourcePosition"].asString();
|
||||
if(!valueImagesFrames["Exif"].isNull())
|
||||
imagesObject.exif = valueImagesFrames["Exif"].asString();
|
||||
if(!valueImagesFrames["ImageUri"].isNull())
|
||||
imagesObject.imageUri = valueImagesFrames["ImageUri"].asString();
|
||||
if(!valueImagesFrames["ImageWidth"].isNull())
|
||||
imagesObject.imageWidth = std::stoi(valueImagesFrames["ImageWidth"].asString());
|
||||
if(!valueImagesFrames["ImageFormat"].isNull())
|
||||
imagesObject.imageFormat = valueImagesFrames["ImageFormat"].asString();
|
||||
if(!valueImagesFrames["SourceType"].isNull())
|
||||
imagesObject.sourceType = valueImagesFrames["SourceType"].asString();
|
||||
if(!valueImagesFrames["ModifyTime"].isNull())
|
||||
imagesObject.modifyTime = valueImagesFrames["ModifyTime"].asString();
|
||||
if(!valueImagesFrames["FileSize"].isNull())
|
||||
imagesObject.fileSize = std::stoi(valueImagesFrames["FileSize"].asString());
|
||||
if(!valueImagesFrames["SourceUri"].isNull())
|
||||
imagesObject.sourceUri = valueImagesFrames["SourceUri"].asString();
|
||||
if(!valueImagesFrames["CreateTime"].isNull())
|
||||
imagesObject.createTime = valueImagesFrames["CreateTime"].asString();
|
||||
if(!valueImagesFrames["FacesStatus"].isNull())
|
||||
imagesObject.facesStatus = valueImagesFrames["FacesStatus"].asString();
|
||||
if(!valueImagesFrames["RemarksA"].isNull())
|
||||
imagesObject.remarksA = valueImagesFrames["RemarksA"].asString();
|
||||
if(!valueImagesFrames["ImageHeight"].isNull())
|
||||
imagesObject.imageHeight = std::stoi(valueImagesFrames["ImageHeight"].asString());
|
||||
if(!valueImagesFrames["RemarksB"].isNull())
|
||||
imagesObject.remarksB = valueImagesFrames["RemarksB"].asString();
|
||||
if(!valueImagesFrames["ImageTime"].isNull())
|
||||
imagesObject.imageTime = valueImagesFrames["ImageTime"].asString();
|
||||
if(!valueImagesFrames["Orientation"].isNull())
|
||||
imagesObject.orientation = valueImagesFrames["Orientation"].asString();
|
||||
if(!valueImagesFrames["Location"].isNull())
|
||||
imagesObject.location = valueImagesFrames["Location"].asString();
|
||||
if(!valueImagesFrames["OCRFailReason"].isNull())
|
||||
imagesObject.oCRFailReason = valueImagesFrames["OCRFailReason"].asString();
|
||||
if(!valueImagesFrames["FacesFailReason"].isNull())
|
||||
imagesObject.facesFailReason = valueImagesFrames["FacesFailReason"].asString();
|
||||
if(!valueImagesFrames["TagsFailReason"].isNull())
|
||||
imagesObject.tagsFailReason = valueImagesFrames["TagsFailReason"].asString();
|
||||
if(!valueImagesFrames["TagsModifyTime"].isNull())
|
||||
imagesObject.tagsModifyTime = valueImagesFrames["TagsModifyTime"].asString();
|
||||
if(!valueImagesFrames["CelebrityStatus"].isNull())
|
||||
imagesObject.celebrityStatus = valueImagesFrames["CelebrityStatus"].asString();
|
||||
if(!valueImagesFrames["CelebrityModifyTime"].isNull())
|
||||
imagesObject.celebrityModifyTime = valueImagesFrames["CelebrityModifyTime"].asString();
|
||||
if(!valueImagesFrames["CelebrityFailReason"].isNull())
|
||||
imagesObject.celebrityFailReason = valueImagesFrames["CelebrityFailReason"].asString();
|
||||
if(!valueImagesFrames["TagsStatus"].isNull())
|
||||
imagesObject.tagsStatus = valueImagesFrames["TagsStatus"].asString();
|
||||
if(!valueImagesFrames["ExternalId"].isNull())
|
||||
imagesObject.externalId = valueImagesFrames["ExternalId"].asString();
|
||||
if(!valueImagesFrames["RemarksC"].isNull())
|
||||
imagesObject.remarksC = valueImagesFrames["RemarksC"].asString();
|
||||
if(!valueImagesFrames["RemarksD"].isNull())
|
||||
imagesObject.remarksD = valueImagesFrames["RemarksD"].asString();
|
||||
if(!valueImagesFrames["AddressModifyTime"].isNull())
|
||||
imagesObject.addressModifyTime = valueImagesFrames["AddressModifyTime"].asString();
|
||||
if(!valueImagesFrames["AddressStatus"].isNull())
|
||||
imagesObject.addressStatus = valueImagesFrames["AddressStatus"].asString();
|
||||
if(!valueImagesFrames["AddressFailReason"].isNull())
|
||||
imagesObject.addressFailReason = valueImagesFrames["AddressFailReason"].asString();
|
||||
if(!valueImagesFrames["RemarksArrayA"].isNull())
|
||||
imagesObject.remarksArrayA = valueImagesFrames["RemarksArrayA"].asString();
|
||||
if(!valueImagesFrames["RemarksArrayB"].isNull())
|
||||
imagesObject.remarksArrayB = valueImagesFrames["RemarksArrayB"].asString();
|
||||
auto allFacesNode = allImagesNode["Faces"]["FacesItem"];
|
||||
for (auto allImagesNodeFacesFacesItem : allFacesNode)
|
||||
{
|
||||
Frames::FacesItem facesObject;
|
||||
if(!allImagesNodeFacesFacesItem["Age"].isNull())
|
||||
facesObject.age = std::stoi(allImagesNodeFacesFacesItem["Age"].asString());
|
||||
if(!allImagesNodeFacesFacesItem["GenderConfidence"].isNull())
|
||||
facesObject.genderConfidence = std::stof(allImagesNodeFacesFacesItem["GenderConfidence"].asString());
|
||||
if(!allImagesNodeFacesFacesItem["Attractive"].isNull())
|
||||
facesObject.attractive = std::stof(allImagesNodeFacesFacesItem["Attractive"].asString());
|
||||
if(!allImagesNodeFacesFacesItem["Gender"].isNull())
|
||||
facesObject.gender = allImagesNodeFacesFacesItem["Gender"].asString();
|
||||
if(!allImagesNodeFacesFacesItem["FaceConfidence"].isNull())
|
||||
facesObject.faceConfidence = std::stof(allImagesNodeFacesFacesItem["FaceConfidence"].asString());
|
||||
if(!allImagesNodeFacesFacesItem["Emotion"].isNull())
|
||||
facesObject.emotion = allImagesNodeFacesFacesItem["Emotion"].asString();
|
||||
if(!allImagesNodeFacesFacesItem["FaceId"].isNull())
|
||||
facesObject.faceId = allImagesNodeFacesFacesItem["FaceId"].asString();
|
||||
if(!allImagesNodeFacesFacesItem["EmotionConfidence"].isNull())
|
||||
facesObject.emotionConfidence = std::stof(allImagesNodeFacesFacesItem["EmotionConfidence"].asString());
|
||||
if(!allImagesNodeFacesFacesItem["GroupId"].isNull())
|
||||
facesObject.groupId = allImagesNodeFacesFacesItem["GroupId"].asString();
|
||||
if(!allImagesNodeFacesFacesItem["FaceQuality"].isNull())
|
||||
facesObject.faceQuality = std::stof(allImagesNodeFacesFacesItem["FaceQuality"].asString());
|
||||
auto emotionDetailsNode = value["EmotionDetails"];
|
||||
if(!emotionDetailsNode["SAD"].isNull())
|
||||
facesObject.emotionDetails.sAD = std::stof(emotionDetailsNode["SAD"].asString());
|
||||
if(!emotionDetailsNode["CALM"].isNull())
|
||||
facesObject.emotionDetails.cALM = std::stof(emotionDetailsNode["CALM"].asString());
|
||||
if(!emotionDetailsNode["ANGRY"].isNull())
|
||||
facesObject.emotionDetails.aNGRY = std::stof(emotionDetailsNode["ANGRY"].asString());
|
||||
if(!emotionDetailsNode["HAPPY"].isNull())
|
||||
facesObject.emotionDetails.hAPPY = std::stof(emotionDetailsNode["HAPPY"].asString());
|
||||
if(!emotionDetailsNode["SCARED"].isNull())
|
||||
facesObject.emotionDetails.sCARED = std::stof(emotionDetailsNode["SCARED"].asString());
|
||||
if(!emotionDetailsNode["DISGUSTED"].isNull())
|
||||
facesObject.emotionDetails.dISGUSTED = std::stof(emotionDetailsNode["DISGUSTED"].asString());
|
||||
if(!emotionDetailsNode["SURPRISED"].isNull())
|
||||
facesObject.emotionDetails.sURPRISED = std::stof(emotionDetailsNode["SURPRISED"].asString());
|
||||
auto faceAttributesNode = value["FaceAttributes"];
|
||||
if(!faceAttributesNode["GlassesConfidence"].isNull())
|
||||
facesObject.faceAttributes.glassesConfidence = std::stof(faceAttributesNode["GlassesConfidence"].asString());
|
||||
if(!faceAttributesNode["Glasses"].isNull())
|
||||
facesObject.faceAttributes.glasses = faceAttributesNode["Glasses"].asString();
|
||||
if(!faceAttributesNode["RaceConfidence"].isNull())
|
||||
facesObject.faceAttributes.raceConfidence = std::stof(faceAttributesNode["RaceConfidence"].asString());
|
||||
if(!faceAttributesNode["Beard"].isNull())
|
||||
facesObject.faceAttributes.beard = faceAttributesNode["Beard"].asString();
|
||||
if(!faceAttributesNode["MaskConfidence"].isNull())
|
||||
facesObject.faceAttributes.maskConfidence = std::stof(faceAttributesNode["MaskConfidence"].asString());
|
||||
if(!faceAttributesNode["Race"].isNull())
|
||||
facesObject.faceAttributes.race = faceAttributesNode["Race"].asString();
|
||||
if(!faceAttributesNode["BeardConfidence"].isNull())
|
||||
facesObject.faceAttributes.beardConfidence = std::stof(faceAttributesNode["BeardConfidence"].asString());
|
||||
if(!faceAttributesNode["Mask"].isNull())
|
||||
facesObject.faceAttributes.mask = faceAttributesNode["Mask"].asString();
|
||||
auto faceBoundaryNode = faceAttributesNode["FaceBoundary"];
|
||||
if(!faceBoundaryNode["Top"].isNull())
|
||||
facesObject.faceAttributes.faceBoundary.top = std::stoi(faceBoundaryNode["Top"].asString());
|
||||
if(!faceBoundaryNode["Height"].isNull())
|
||||
facesObject.faceAttributes.faceBoundary.height = std::stoi(faceBoundaryNode["Height"].asString());
|
||||
if(!faceBoundaryNode["Width"].isNull())
|
||||
facesObject.faceAttributes.faceBoundary.width = std::stoi(faceBoundaryNode["Width"].asString());
|
||||
if(!faceBoundaryNode["Left"].isNull())
|
||||
facesObject.faceAttributes.faceBoundary.left = std::stoi(faceBoundaryNode["Left"].asString());
|
||||
auto headPoseNode = faceAttributesNode["HeadPose"];
|
||||
if(!headPoseNode["Pitch"].isNull())
|
||||
facesObject.faceAttributes.headPose.pitch = std::stof(headPoseNode["Pitch"].asString());
|
||||
if(!headPoseNode["Roll"].isNull())
|
||||
facesObject.faceAttributes.headPose.roll = std::stof(headPoseNode["Roll"].asString());
|
||||
if(!headPoseNode["Yaw"].isNull())
|
||||
facesObject.faceAttributes.headPose.yaw = std::stof(headPoseNode["Yaw"].asString());
|
||||
imagesObject.faces.push_back(facesObject);
|
||||
}
|
||||
auto allTagsNode = allImagesNode["Tags"]["TagsItem"];
|
||||
for (auto allImagesNodeTagsTagsItem : allTagsNode)
|
||||
{
|
||||
Frames::TagsItem tagsObject;
|
||||
if(!allImagesNodeTagsTagsItem["TagConfidence"].isNull())
|
||||
tagsObject.tagConfidence = std::stof(allImagesNodeTagsTagsItem["TagConfidence"].asString());
|
||||
if(!allImagesNodeTagsTagsItem["TagLevel"].isNull())
|
||||
tagsObject.tagLevel = std::stoi(allImagesNodeTagsTagsItem["TagLevel"].asString());
|
||||
if(!allImagesNodeTagsTagsItem["TagName"].isNull())
|
||||
tagsObject.tagName = allImagesNodeTagsTagsItem["TagName"].asString();
|
||||
if(!allImagesNodeTagsTagsItem["ParentTagName"].isNull())
|
||||
tagsObject.parentTagName = allImagesNodeTagsTagsItem["ParentTagName"].asString();
|
||||
imagesObject.tags.push_back(tagsObject);
|
||||
}
|
||||
auto allOCRNode = allImagesNode["OCR"]["OCRItem"];
|
||||
for (auto allImagesNodeOCROCRItem : allOCRNode)
|
||||
{
|
||||
Frames::OCRItem oCRObject;
|
||||
if(!allImagesNodeOCROCRItem["OCRContents"].isNull())
|
||||
oCRObject.oCRContents = allImagesNodeOCROCRItem["OCRContents"].asString();
|
||||
if(!allImagesNodeOCROCRItem["OCRConfidence"].isNull())
|
||||
oCRObject.oCRConfidence = std::stof(allImagesNodeOCROCRItem["OCRConfidence"].asString());
|
||||
auto oCRBoundaryNode = value["OCRBoundary"];
|
||||
if(!oCRBoundaryNode["Left"].isNull())
|
||||
oCRObject.oCRBoundary.left = std::stoi(oCRBoundaryNode["Left"].asString());
|
||||
if(!oCRBoundaryNode["Left"].isNull())
|
||||
oCRObject.oCRBoundary.left1 = std::stoi(oCRBoundaryNode["Left"].asString());
|
||||
if(!oCRBoundaryNode["Width"].isNull())
|
||||
oCRObject.oCRBoundary.width = std::stoi(oCRBoundaryNode["Width"].asString());
|
||||
if(!oCRBoundaryNode["Height"].isNull())
|
||||
oCRObject.oCRBoundary.height = std::stoi(oCRBoundaryNode["Height"].asString());
|
||||
imagesObject.oCR.push_back(oCRObject);
|
||||
}
|
||||
auto allCelebrityNode = allImagesNode["Celebrity"]["CelebrityItem"];
|
||||
for (auto allImagesNodeCelebrityCelebrityItem : allCelebrityNode)
|
||||
{
|
||||
Frames::CelebrityItem celebrityObject;
|
||||
if(!allImagesNodeCelebrityCelebrityItem["CelebrityName"].isNull())
|
||||
celebrityObject.celebrityName = allImagesNodeCelebrityCelebrityItem["CelebrityName"].asString();
|
||||
if(!allImagesNodeCelebrityCelebrityItem["CelebrityGender"].isNull())
|
||||
celebrityObject.celebrityGender = allImagesNodeCelebrityCelebrityItem["CelebrityGender"].asString();
|
||||
if(!allImagesNodeCelebrityCelebrityItem["CelebrityConfidence"].isNull())
|
||||
celebrityObject.celebrityConfidence = std::stof(allImagesNodeCelebrityCelebrityItem["CelebrityConfidence"].asString());
|
||||
if(!allImagesNodeCelebrityCelebrityItem["CelebrityLibraryName"].isNull())
|
||||
celebrityObject.celebrityLibraryName = allImagesNodeCelebrityCelebrityItem["CelebrityLibraryName"].asString();
|
||||
auto celebrityBoundaryNode = value["CelebrityBoundary"];
|
||||
if(!celebrityBoundaryNode["Left"].isNull())
|
||||
celebrityObject.celebrityBoundary.left = std::stoi(celebrityBoundaryNode["Left"].asString());
|
||||
if(!celebrityBoundaryNode["Top"].isNull())
|
||||
celebrityObject.celebrityBoundary.top = std::stoi(celebrityBoundaryNode["Top"].asString());
|
||||
if(!celebrityBoundaryNode["Width"].isNull())
|
||||
celebrityObject.celebrityBoundary.width = std::stoi(celebrityBoundaryNode["Width"].asString());
|
||||
if(!celebrityBoundaryNode["Height"].isNull())
|
||||
celebrityObject.celebrityBoundary.height = std::stoi(celebrityBoundaryNode["Height"].asString());
|
||||
imagesObject.celebrity.push_back(celebrityObject);
|
||||
}
|
||||
auto addressNode = value["Address"];
|
||||
if(!addressNode["AddressLine"].isNull())
|
||||
imagesObject.address.addressLine = addressNode["AddressLine"].asString();
|
||||
if(!addressNode["Country"].isNull())
|
||||
imagesObject.address.country = addressNode["Country"].asString();
|
||||
if(!addressNode["Province"].isNull())
|
||||
imagesObject.address.province = addressNode["Province"].asString();
|
||||
if(!addressNode["City"].isNull())
|
||||
imagesObject.address.city = addressNode["City"].asString();
|
||||
if(!addressNode["District"].isNull())
|
||||
imagesObject.address.district = addressNode["District"].asString();
|
||||
if(!addressNode["Township"].isNull())
|
||||
imagesObject.address.township = addressNode["Township"].asString();
|
||||
images_.push_back(imagesObject);
|
||||
}
|
||||
if(!value["SetId"].isNull())
|
||||
setId_ = value["SetId"].asString();
|
||||
if(!value["NextMarker"].isNull())
|
||||
nextMarker_ = value["NextMarker"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::vector<FindImagesByTagNamesResult::Frames> FindImagesByTagNamesResult::getImages()const
|
||||
{
|
||||
return images_;
|
||||
}
|
||||
|
||||
std::string FindImagesByTagNamesResult::getSetId()const
|
||||
{
|
||||
return setId_;
|
||||
}
|
||||
|
||||
std::string FindImagesByTagNamesResult::getNextMarker()const
|
||||
{
|
||||
return nextMarker_;
|
||||
}
|
||||
|
||||
@@ -115,6 +115,37 @@ void FindImagesResult::parse(const std::string &payload)
|
||||
imagesObject.remarksArrayB = valueImagesImagesItem["RemarksArrayB"].asString();
|
||||
if(!valueImagesImagesItem["RemarksArrayA"].isNull())
|
||||
imagesObject.remarksArrayA = valueImagesImagesItem["RemarksArrayA"].asString();
|
||||
if(!valueImagesImagesItem["ImageQualityStatus"].isNull())
|
||||
imagesObject.imageQualityStatus = valueImagesImagesItem["ImageQualityStatus"].asString();
|
||||
if(!valueImagesImagesItem["ImageQualityFailReason"].isNull())
|
||||
imagesObject.imageQualityFailReason = valueImagesImagesItem["ImageQualityFailReason"].asString();
|
||||
if(!valueImagesImagesItem["ImageQualityModifyTime"].isNull())
|
||||
imagesObject.imageQualityModifyTime = valueImagesImagesItem["ImageQualityModifyTime"].asString();
|
||||
if(!valueImagesImagesItem["CroppingSuggestionStatus"].isNull())
|
||||
imagesObject.croppingSuggestionStatus = valueImagesImagesItem["CroppingSuggestionStatus"].asString();
|
||||
if(!valueImagesImagesItem["CroppingSuggestionFailReason"].isNull())
|
||||
imagesObject.croppingSuggestionFailReason = valueImagesImagesItem["CroppingSuggestionFailReason"].asString();
|
||||
if(!valueImagesImagesItem["CroppingSuggestionModifyTime"].isNull())
|
||||
imagesObject.croppingSuggestionModifyTime = valueImagesImagesItem["CroppingSuggestionModifyTime"].asString();
|
||||
auto allCroppingSuggestionNode = allImagesNode["CroppingSuggestion"]["CroppingSuggestionItem"];
|
||||
for (auto allImagesNodeCroppingSuggestionCroppingSuggestionItem : allCroppingSuggestionNode)
|
||||
{
|
||||
ImagesItem::CroppingSuggestionItem croppingSuggestionObject;
|
||||
if(!allImagesNodeCroppingSuggestionCroppingSuggestionItem["AspectRatio"].isNull())
|
||||
croppingSuggestionObject.aspectRatio = allImagesNodeCroppingSuggestionCroppingSuggestionItem["AspectRatio"].asString();
|
||||
if(!allImagesNodeCroppingSuggestionCroppingSuggestionItem["Score"].isNull())
|
||||
croppingSuggestionObject.score = std::stof(allImagesNodeCroppingSuggestionCroppingSuggestionItem["Score"].asString());
|
||||
auto croppingBoundaryNode = value["CroppingBoundary"];
|
||||
if(!croppingBoundaryNode["Width"].isNull())
|
||||
croppingSuggestionObject.croppingBoundary.width = std::stoi(croppingBoundaryNode["Width"].asString());
|
||||
if(!croppingBoundaryNode["Height"].isNull())
|
||||
croppingSuggestionObject.croppingBoundary.height = std::stoi(croppingBoundaryNode["Height"].asString());
|
||||
if(!croppingBoundaryNode["Left"].isNull())
|
||||
croppingSuggestionObject.croppingBoundary.left = std::stoi(croppingBoundaryNode["Left"].asString());
|
||||
if(!croppingBoundaryNode["Top"].isNull())
|
||||
croppingSuggestionObject.croppingBoundary.top = std::stoi(croppingBoundaryNode["Top"].asString());
|
||||
imagesObject.croppingSuggestion.push_back(croppingSuggestionObject);
|
||||
}
|
||||
auto allFacesNode = allImagesNode["Faces"]["FacesItem"];
|
||||
for (auto allImagesNodeFacesFacesItem : allFacesNode)
|
||||
{
|
||||
@@ -245,6 +276,27 @@ void FindImagesResult::parse(const std::string &payload)
|
||||
celebrityObject.celebrityBoundary.height = std::stoi(celebrityBoundaryNode["Height"].asString());
|
||||
imagesObject.celebrity.push_back(celebrityObject);
|
||||
}
|
||||
auto imageQualityNode = value["ImageQuality"];
|
||||
if(!imageQualityNode["OverallScore"].isNull())
|
||||
imagesObject.imageQuality.overallScore = std::stof(imageQualityNode["OverallScore"].asString());
|
||||
if(!imageQualityNode["ClarityScore"].isNull())
|
||||
imagesObject.imageQuality.clarityScore = std::stof(imageQualityNode["ClarityScore"].asString());
|
||||
if(!imageQualityNode["Clarity"].isNull())
|
||||
imagesObject.imageQuality.clarity = std::stof(imageQualityNode["Clarity"].asString());
|
||||
if(!imageQualityNode["ExposureScore"].isNull())
|
||||
imagesObject.imageQuality.exposureScore = std::stof(imageQualityNode["ExposureScore"].asString());
|
||||
if(!imageQualityNode["Exposure"].isNull())
|
||||
imagesObject.imageQuality.exposure = std::stof(imageQualityNode["Exposure"].asString());
|
||||
if(!imageQualityNode["ContrastScore"].isNull())
|
||||
imagesObject.imageQuality.contrastScore = std::stof(imageQualityNode["ContrastScore"].asString());
|
||||
if(!imageQualityNode["Contrast"].isNull())
|
||||
imagesObject.imageQuality.contrast = std::stof(imageQualityNode["Contrast"].asString());
|
||||
if(!imageQualityNode["ColorScore"].isNull())
|
||||
imagesObject.imageQuality.colorScore = std::stof(imageQualityNode["ColorScore"].asString());
|
||||
if(!imageQualityNode["Color"].isNull())
|
||||
imagesObject.imageQuality.color = std::stof(imageQualityNode["Color"].asString());
|
||||
if(!imageQualityNode["CompositionScore"].isNull())
|
||||
imagesObject.imageQuality.compositionScore = std::stof(imageQualityNode["CompositionScore"].asString());
|
||||
auto addressNode = value["Address"];
|
||||
if(!addressNode["AddressLine"].isNull())
|
||||
imagesObject.address.addressLine = addressNode["AddressLine"].asString();
|
||||
|
||||
@@ -39,6 +39,25 @@ void GetImageResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allCroppingSuggestionNode = value["CroppingSuggestion"]["CroppingSuggestionItem"];
|
||||
for (auto valueCroppingSuggestionCroppingSuggestionItem : allCroppingSuggestionNode)
|
||||
{
|
||||
CroppingSuggestionItem croppingSuggestionObject;
|
||||
if(!valueCroppingSuggestionCroppingSuggestionItem["AspectRatio"].isNull())
|
||||
croppingSuggestionObject.aspectRatio = valueCroppingSuggestionCroppingSuggestionItem["AspectRatio"].asString();
|
||||
if(!valueCroppingSuggestionCroppingSuggestionItem["Score"].isNull())
|
||||
croppingSuggestionObject.score = std::stof(valueCroppingSuggestionCroppingSuggestionItem["Score"].asString());
|
||||
auto croppingBoundaryNode = value["CroppingBoundary"];
|
||||
if(!croppingBoundaryNode["Width"].isNull())
|
||||
croppingSuggestionObject.croppingBoundary.width = std::stoi(croppingBoundaryNode["Width"].asString());
|
||||
if(!croppingBoundaryNode["Height"].isNull())
|
||||
croppingSuggestionObject.croppingBoundary.height = std::stoi(croppingBoundaryNode["Height"].asString());
|
||||
if(!croppingBoundaryNode["Left"].isNull())
|
||||
croppingSuggestionObject.croppingBoundary.left = std::stoi(croppingBoundaryNode["Left"].asString());
|
||||
if(!croppingBoundaryNode["Top"].isNull())
|
||||
croppingSuggestionObject.croppingBoundary.top = std::stoi(croppingBoundaryNode["Top"].asString());
|
||||
croppingSuggestion_.push_back(croppingSuggestionObject);
|
||||
}
|
||||
auto allFacesNode = value["Faces"]["FacesItem"];
|
||||
for (auto valueFacesFacesItem : allFacesNode)
|
||||
{
|
||||
@@ -169,6 +188,27 @@ void GetImageResult::parse(const std::string &payload)
|
||||
celebrityObject.celebrityBoundary.height = std::stoi(celebrityBoundaryNode["Height"].asString());
|
||||
celebrity_.push_back(celebrityObject);
|
||||
}
|
||||
auto imageQualityNode = value["ImageQuality"];
|
||||
if(!imageQualityNode["OverallScore"].isNull())
|
||||
imageQuality_.overallScore = std::stof(imageQualityNode["OverallScore"].asString());
|
||||
if(!imageQualityNode["ClarityScore"].isNull())
|
||||
imageQuality_.clarityScore = std::stof(imageQualityNode["ClarityScore"].asString());
|
||||
if(!imageQualityNode["Clarity"].isNull())
|
||||
imageQuality_.clarity = std::stof(imageQualityNode["Clarity"].asString());
|
||||
if(!imageQualityNode["ExposureScore"].isNull())
|
||||
imageQuality_.exposureScore = std::stof(imageQualityNode["ExposureScore"].asString());
|
||||
if(!imageQualityNode["Exposure"].isNull())
|
||||
imageQuality_.exposure = std::stof(imageQualityNode["Exposure"].asString());
|
||||
if(!imageQualityNode["ContrastScore"].isNull())
|
||||
imageQuality_.contrastScore = std::stof(imageQualityNode["ContrastScore"].asString());
|
||||
if(!imageQualityNode["Contrast"].isNull())
|
||||
imageQuality_.contrast = std::stof(imageQualityNode["Contrast"].asString());
|
||||
if(!imageQualityNode["ColorScore"].isNull())
|
||||
imageQuality_.colorScore = std::stof(imageQualityNode["ColorScore"].asString());
|
||||
if(!imageQualityNode["Color"].isNull())
|
||||
imageQuality_.color = std::stof(imageQualityNode["Color"].asString());
|
||||
if(!imageQualityNode["CompositionScore"].isNull())
|
||||
imageQuality_.compositionScore = std::stof(imageQualityNode["CompositionScore"].asString());
|
||||
auto addressNode = value["Address"];
|
||||
if(!addressNode["AddressLine"].isNull())
|
||||
address_.addressLine = addressNode["AddressLine"].asString();
|
||||
@@ -256,12 +296,24 @@ void GetImageResult::parse(const std::string &payload)
|
||||
remarksArrayA_ = value["RemarksArrayA"].asString();
|
||||
if(!value["RemarksArrayB"].isNull())
|
||||
remarksArrayB_ = value["RemarksArrayB"].asString();
|
||||
if(!value["ImageQualityModifyTime"].isNull())
|
||||
imageQualityModifyTime_ = value["ImageQualityModifyTime"].asString();
|
||||
if(!value["ImageQualityFailReason"].isNull())
|
||||
imageQualityFailReason_ = value["ImageQualityFailReason"].asString();
|
||||
if(!value["ImageQualityStatus"].isNull())
|
||||
imageQualityStatus_ = value["ImageQualityStatus"].asString();
|
||||
if(!value["CroppingSuggestionStatus"].isNull())
|
||||
croppingSuggestionStatus_ = value["CroppingSuggestionStatus"].asString();
|
||||
if(!value["CroppingSuggestionFailReason"].isNull())
|
||||
croppingSuggestionFailReason_ = value["CroppingSuggestionFailReason"].asString();
|
||||
if(!value["CroppingSuggestionModifyTime"].isNull())
|
||||
croppingSuggestionModifyTime_ = value["CroppingSuggestionModifyTime"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetImageResult::getModifyTime()const
|
||||
GetImageResult::ImageQuality GetImageResult::getImageQuality()const
|
||||
{
|
||||
return modifyTime_;
|
||||
return imageQuality_;
|
||||
}
|
||||
|
||||
GetImageResult::Address GetImageResult::getAddress()const
|
||||
@@ -284,9 +336,9 @@ std::string GetImageResult::getFacesFailReason()const
|
||||
return facesFailReason_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getRemarksA()const
|
||||
std::string GetImageResult::getCroppingSuggestionFailReason()const
|
||||
{
|
||||
return remarksA_;
|
||||
return croppingSuggestionFailReason_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getAddressFailReason()const
|
||||
@@ -294,26 +346,11 @@ std::string GetImageResult::getAddressFailReason()const
|
||||
return addressFailReason_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getRemarksB()const
|
||||
{
|
||||
return remarksB_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getAddressModifyTime()const
|
||||
{
|
||||
return addressModifyTime_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getImageFormat()const
|
||||
{
|
||||
return imageFormat_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getTagsFailReason()const
|
||||
{
|
||||
return tagsFailReason_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getRemarksArrayB()const
|
||||
{
|
||||
return remarksArrayB_;
|
||||
@@ -324,21 +361,6 @@ std::string GetImageResult::getExif()const
|
||||
return exif_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getFacesModifyTime()const
|
||||
{
|
||||
return facesModifyTime_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getRemarksC()const
|
||||
{
|
||||
return remarksC_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getRemarksD()const
|
||||
{
|
||||
return remarksD_;
|
||||
}
|
||||
|
||||
int GetImageResult::getImageWidth()const
|
||||
{
|
||||
return imageWidth_;
|
||||
@@ -374,6 +396,126 @@ std::string GetImageResult::getAddressStatus()const
|
||||
return addressStatus_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getImageQualityModifyTime()const
|
||||
{
|
||||
return imageQualityModifyTime_;
|
||||
}
|
||||
|
||||
std::vector<GetImageResult::CroppingSuggestionItem> GetImageResult::getCroppingSuggestion()const
|
||||
{
|
||||
return croppingSuggestion_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getImageQualityFailReason()const
|
||||
{
|
||||
return imageQualityFailReason_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getImageUri()const
|
||||
{
|
||||
return imageUri_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getOrientation()const
|
||||
{
|
||||
return orientation_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getImageTime()const
|
||||
{
|
||||
return imageTime_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getCroppingSuggestionModifyTime()const
|
||||
{
|
||||
return croppingSuggestionModifyTime_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getCelebrityModifyTime()const
|
||||
{
|
||||
return celebrityModifyTime_;
|
||||
}
|
||||
|
||||
int GetImageResult::getImageHeight()const
|
||||
{
|
||||
return imageHeight_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getTagsStatus()const
|
||||
{
|
||||
return tagsStatus_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getImageQualityStatus()const
|
||||
{
|
||||
return imageQualityStatus_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getCelebrityFailReason()const
|
||||
{
|
||||
return celebrityFailReason_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getSetId()const
|
||||
{
|
||||
return setId_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getCelebrityStatus()const
|
||||
{
|
||||
return celebrityStatus_;
|
||||
}
|
||||
|
||||
int GetImageResult::getFileSize()const
|
||||
{
|
||||
return fileSize_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getModifyTime()const
|
||||
{
|
||||
return modifyTime_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getCroppingSuggestionStatus()const
|
||||
{
|
||||
return croppingSuggestionStatus_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getRemarksA()const
|
||||
{
|
||||
return remarksA_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getRemarksB()const
|
||||
{
|
||||
return remarksB_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getAddressModifyTime()const
|
||||
{
|
||||
return addressModifyTime_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getTagsFailReason()const
|
||||
{
|
||||
return tagsFailReason_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getFacesModifyTime()const
|
||||
{
|
||||
return facesModifyTime_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getRemarksC()const
|
||||
{
|
||||
return remarksC_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getRemarksD()const
|
||||
{
|
||||
return remarksD_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getFacesStatus()const
|
||||
{
|
||||
return facesStatus_;
|
||||
@@ -394,16 +536,6 @@ std::string GetImageResult::getExternalId()const
|
||||
return externalId_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getImageUri()const
|
||||
{
|
||||
return imageUri_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getOrientation()const
|
||||
{
|
||||
return orientation_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getOCRStatus()const
|
||||
{
|
||||
return oCRStatus_;
|
||||
@@ -414,56 +546,16 @@ std::string GetImageResult::getOCRModifyTime()const
|
||||
return oCRModifyTime_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getImageTime()const
|
||||
{
|
||||
return imageTime_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getCelebrityModifyTime()const
|
||||
{
|
||||
return celebrityModifyTime_;
|
||||
}
|
||||
|
||||
int GetImageResult::getImageHeight()const
|
||||
{
|
||||
return imageHeight_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getTagsStatus()const
|
||||
{
|
||||
return tagsStatus_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getOCRFailReason()const
|
||||
{
|
||||
return oCRFailReason_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getCelebrityFailReason()const
|
||||
{
|
||||
return celebrityFailReason_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getSetId()const
|
||||
{
|
||||
return setId_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getCelebrityStatus()const
|
||||
{
|
||||
return celebrityStatus_;
|
||||
}
|
||||
|
||||
std::vector<GetImageResult::OCRItem> GetImageResult::getOCR()const
|
||||
{
|
||||
return oCR_;
|
||||
}
|
||||
|
||||
int GetImageResult::getFileSize()const
|
||||
{
|
||||
return fileSize_;
|
||||
}
|
||||
|
||||
std::string GetImageResult::getLocation()const
|
||||
{
|
||||
return location_;
|
||||
|
||||
@@ -123,6 +123,8 @@ void GetMediaMetaResult::parse(const std::string &payload)
|
||||
videoStreamObject.bitrate = mediaStreamsNodeVideoStreamsVideoStream["Bitrate"].asString();
|
||||
if(!mediaStreamsNodeVideoStreamsVideoStream["Frames"].isNull())
|
||||
videoStreamObject.frames = mediaStreamsNodeVideoStreamsVideoStream["Frames"].asString();
|
||||
if(!mediaStreamsNodeVideoStreamsVideoStream["Rotate"].isNull())
|
||||
videoStreamObject.rotate = mediaStreamsNodeVideoStreamsVideoStream["Rotate"].asString();
|
||||
mediaMeta_.mediaStreams.videoStreams.push_back(videoStreamObject);
|
||||
}
|
||||
auto allAudioStreamsNode = mediaStreamsNode["AudioStreams"]["AudioStream"];
|
||||
|
||||
@@ -115,6 +115,37 @@ void ListImagesResult::parse(const std::string &payload)
|
||||
imagesObject.remarksArrayA = valueImagesImagesItem["RemarksArrayA"].asString();
|
||||
if(!valueImagesImagesItem["RemarksArrayB"].isNull())
|
||||
imagesObject.remarksArrayB = valueImagesImagesItem["RemarksArrayB"].asString();
|
||||
if(!valueImagesImagesItem["ImageQualityStatus"].isNull())
|
||||
imagesObject.imageQualityStatus = valueImagesImagesItem["ImageQualityStatus"].asString();
|
||||
if(!valueImagesImagesItem["ImageQualityFailReason"].isNull())
|
||||
imagesObject.imageQualityFailReason = valueImagesImagesItem["ImageQualityFailReason"].asString();
|
||||
if(!valueImagesImagesItem["ImageQualityModifyTime"].isNull())
|
||||
imagesObject.imageQualityModifyTime = valueImagesImagesItem["ImageQualityModifyTime"].asString();
|
||||
if(!valueImagesImagesItem["CroppingSuggestionStatus"].isNull())
|
||||
imagesObject.croppingSuggestionStatus = valueImagesImagesItem["CroppingSuggestionStatus"].asString();
|
||||
if(!valueImagesImagesItem["CroppingSuggestionFailReason"].isNull())
|
||||
imagesObject.croppingSuggestionFailReason = valueImagesImagesItem["CroppingSuggestionFailReason"].asString();
|
||||
if(!valueImagesImagesItem["CroppingSuggestionModifyTime"].isNull())
|
||||
imagesObject.croppingSuggestionModifyTime = valueImagesImagesItem["CroppingSuggestionModifyTime"].asString();
|
||||
auto allCroppingSuggestionNode = allImagesNode["CroppingSuggestion"]["CroppingSuggestionItem"];
|
||||
for (auto allImagesNodeCroppingSuggestionCroppingSuggestionItem : allCroppingSuggestionNode)
|
||||
{
|
||||
ImagesItem::CroppingSuggestionItem croppingSuggestionObject;
|
||||
if(!allImagesNodeCroppingSuggestionCroppingSuggestionItem["AspectRatio"].isNull())
|
||||
croppingSuggestionObject.aspectRatio = allImagesNodeCroppingSuggestionCroppingSuggestionItem["AspectRatio"].asString();
|
||||
if(!allImagesNodeCroppingSuggestionCroppingSuggestionItem["Score"].isNull())
|
||||
croppingSuggestionObject.score = std::stof(allImagesNodeCroppingSuggestionCroppingSuggestionItem["Score"].asString());
|
||||
auto croppingBoundaryNode = value["CroppingBoundary"];
|
||||
if(!croppingBoundaryNode["Width"].isNull())
|
||||
croppingSuggestionObject.croppingBoundary.width = std::stoi(croppingBoundaryNode["Width"].asString());
|
||||
if(!croppingBoundaryNode["Height"].isNull())
|
||||
croppingSuggestionObject.croppingBoundary.height = std::stoi(croppingBoundaryNode["Height"].asString());
|
||||
if(!croppingBoundaryNode["Left"].isNull())
|
||||
croppingSuggestionObject.croppingBoundary.left = std::stoi(croppingBoundaryNode["Left"].asString());
|
||||
if(!croppingBoundaryNode["Top"].isNull())
|
||||
croppingSuggestionObject.croppingBoundary.top = std::stoi(croppingBoundaryNode["Top"].asString());
|
||||
imagesObject.croppingSuggestion.push_back(croppingSuggestionObject);
|
||||
}
|
||||
auto allFacesNode = allImagesNode["Faces"]["FacesItem"];
|
||||
for (auto allImagesNodeFacesFacesItem : allFacesNode)
|
||||
{
|
||||
@@ -245,6 +276,27 @@ void ListImagesResult::parse(const std::string &payload)
|
||||
celebrityObject.celebrityBoundary.height = std::stoi(celebrityBoundaryNode["Height"].asString());
|
||||
imagesObject.celebrity.push_back(celebrityObject);
|
||||
}
|
||||
auto imageQualityNode = value["ImageQuality"];
|
||||
if(!imageQualityNode["OverallScore"].isNull())
|
||||
imagesObject.imageQuality.overallScore = std::stof(imageQualityNode["OverallScore"].asString());
|
||||
if(!imageQualityNode["ClarityScore"].isNull())
|
||||
imagesObject.imageQuality.clarityScore = std::stof(imageQualityNode["ClarityScore"].asString());
|
||||
if(!imageQualityNode["Clarity"].isNull())
|
||||
imagesObject.imageQuality.clarity = std::stof(imageQualityNode["Clarity"].asString());
|
||||
if(!imageQualityNode["ExposureScore"].isNull())
|
||||
imagesObject.imageQuality.exposureScore = std::stof(imageQualityNode["ExposureScore"].asString());
|
||||
if(!imageQualityNode["Exposure"].isNull())
|
||||
imagesObject.imageQuality.exposure = std::stof(imageQualityNode["Exposure"].asString());
|
||||
if(!imageQualityNode["ContrastScore"].isNull())
|
||||
imagesObject.imageQuality.contrastScore = std::stof(imageQualityNode["ContrastScore"].asString());
|
||||
if(!imageQualityNode["Contrast"].isNull())
|
||||
imagesObject.imageQuality.contrast = std::stof(imageQualityNode["Contrast"].asString());
|
||||
if(!imageQualityNode["ColorScore"].isNull())
|
||||
imagesObject.imageQuality.colorScore = std::stof(imageQualityNode["ColorScore"].asString());
|
||||
if(!imageQualityNode["Color"].isNull())
|
||||
imagesObject.imageQuality.color = std::stof(imageQualityNode["Color"].asString());
|
||||
if(!imageQualityNode["CompositionScore"].isNull())
|
||||
imagesObject.imageQuality.compositionScore = std::stof(imageQualityNode["CompositionScore"].asString());
|
||||
auto addressNode = value["Address"];
|
||||
if(!addressNode["AddressLine"].isNull())
|
||||
imagesObject.address.addressLine = addressNode["AddressLine"].asString();
|
||||
|
||||
@@ -27,8 +27,12 @@ set(ivpd_public_header_model
|
||||
include/alibabacloud/ivpd/model/CreateSegmentBodyJobResult.h
|
||||
include/alibabacloud/ivpd/model/DetectImageElementsRequest.h
|
||||
include/alibabacloud/ivpd/model/DetectImageElementsResult.h
|
||||
include/alibabacloud/ivpd/model/EraseLogoInVideoRequest.h
|
||||
include/alibabacloud/ivpd/model/EraseLogoInVideoResult.h
|
||||
include/alibabacloud/ivpd/model/ExtendImageStyleRequest.h
|
||||
include/alibabacloud/ivpd/model/ExtendImageStyleResult.h
|
||||
include/alibabacloud/ivpd/model/GetAsyncResultRequest.h
|
||||
include/alibabacloud/ivpd/model/GetAsyncResultResult.h
|
||||
include/alibabacloud/ivpd/model/GetJobResultRequest.h
|
||||
include/alibabacloud/ivpd/model/GetJobResultResult.h
|
||||
include/alibabacloud/ivpd/model/GetJobStatusRequest.h
|
||||
@@ -62,8 +66,12 @@ set(ivpd_src
|
||||
src/model/CreateSegmentBodyJobResult.cc
|
||||
src/model/DetectImageElementsRequest.cc
|
||||
src/model/DetectImageElementsResult.cc
|
||||
src/model/EraseLogoInVideoRequest.cc
|
||||
src/model/EraseLogoInVideoResult.cc
|
||||
src/model/ExtendImageStyleRequest.cc
|
||||
src/model/ExtendImageStyleResult.cc
|
||||
src/model/GetAsyncResultRequest.cc
|
||||
src/model/GetAsyncResultResult.cc
|
||||
src/model/GetJobResultRequest.cc
|
||||
src/model/GetJobResultResult.cc
|
||||
src/model/GetJobStatusRequest.cc
|
||||
|
||||
@@ -28,8 +28,12 @@
|
||||
#include "model/CreateSegmentBodyJobResult.h"
|
||||
#include "model/DetectImageElementsRequest.h"
|
||||
#include "model/DetectImageElementsResult.h"
|
||||
#include "model/EraseLogoInVideoRequest.h"
|
||||
#include "model/EraseLogoInVideoResult.h"
|
||||
#include "model/ExtendImageStyleRequest.h"
|
||||
#include "model/ExtendImageStyleResult.h"
|
||||
#include "model/GetAsyncResultRequest.h"
|
||||
#include "model/GetAsyncResultResult.h"
|
||||
#include "model/GetJobResultRequest.h"
|
||||
#include "model/GetJobResultResult.h"
|
||||
#include "model/GetJobStatusRequest.h"
|
||||
@@ -72,9 +76,15 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::DetectImageElementsResult> DetectImageElementsOutcome;
|
||||
typedef std::future<DetectImageElementsOutcome> DetectImageElementsOutcomeCallable;
|
||||
typedef std::function<void(const IvpdClient*, const Model::DetectImageElementsRequest&, const DetectImageElementsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectImageElementsAsyncHandler;
|
||||
typedef Outcome<Error, Model::EraseLogoInVideoResult> EraseLogoInVideoOutcome;
|
||||
typedef std::future<EraseLogoInVideoOutcome> EraseLogoInVideoOutcomeCallable;
|
||||
typedef std::function<void(const IvpdClient*, const Model::EraseLogoInVideoRequest&, const EraseLogoInVideoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> EraseLogoInVideoAsyncHandler;
|
||||
typedef Outcome<Error, Model::ExtendImageStyleResult> ExtendImageStyleOutcome;
|
||||
typedef std::future<ExtendImageStyleOutcome> ExtendImageStyleOutcomeCallable;
|
||||
typedef std::function<void(const IvpdClient*, const Model::ExtendImageStyleRequest&, const ExtendImageStyleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ExtendImageStyleAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetAsyncResultResult> GetAsyncResultOutcome;
|
||||
typedef std::future<GetAsyncResultOutcome> GetAsyncResultOutcomeCallable;
|
||||
typedef std::function<void(const IvpdClient*, const Model::GetAsyncResultRequest&, const GetAsyncResultOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetAsyncResultAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetJobResultResult> GetJobResultOutcome;
|
||||
typedef std::future<GetJobResultOutcome> GetJobResultOutcomeCallable;
|
||||
typedef std::function<void(const IvpdClient*, const Model::GetJobResultRequest&, const GetJobResultOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetJobResultAsyncHandler;
|
||||
@@ -125,9 +135,15 @@ namespace AlibabaCloud
|
||||
DetectImageElementsOutcome detectImageElements(const Model::DetectImageElementsRequest &request)const;
|
||||
void detectImageElementsAsync(const Model::DetectImageElementsRequest& request, const DetectImageElementsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DetectImageElementsOutcomeCallable detectImageElementsCallable(const Model::DetectImageElementsRequest& request) const;
|
||||
EraseLogoInVideoOutcome eraseLogoInVideo(const Model::EraseLogoInVideoRequest &request)const;
|
||||
void eraseLogoInVideoAsync(const Model::EraseLogoInVideoRequest& request, const EraseLogoInVideoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
EraseLogoInVideoOutcomeCallable eraseLogoInVideoCallable(const Model::EraseLogoInVideoRequest& request) const;
|
||||
ExtendImageStyleOutcome extendImageStyle(const Model::ExtendImageStyleRequest &request)const;
|
||||
void extendImageStyleAsync(const Model::ExtendImageStyleRequest& request, const ExtendImageStyleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ExtendImageStyleOutcomeCallable extendImageStyleCallable(const Model::ExtendImageStyleRequest& request) const;
|
||||
GetAsyncResultOutcome getAsyncResult(const Model::GetAsyncResultRequest &request)const;
|
||||
void getAsyncResultAsync(const Model::GetAsyncResultRequest& request, const GetAsyncResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetAsyncResultOutcomeCallable getAsyncResultCallable(const Model::GetAsyncResultRequest& request) const;
|
||||
GetJobResultOutcome getJobResult(const Model::GetJobResultRequest &request)const;
|
||||
void getJobResultAsync(const Model::GetJobResultRequest& request, const GetJobResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetJobResultOutcomeCallable getJobResultCallable(const Model::GetJobResultRequest& request) const;
|
||||
|
||||
@@ -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_IVPD_MODEL_ERASELOGOINVIDEOREQUEST_H_
|
||||
#define ALIBABACLOUD_IVPD_MODEL_ERASELOGOINVIDEOREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/ivpd/IvpdExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ivpd
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IVPD_EXPORT EraseLogoInVideoRequest : public RpcServiceRequest
|
||||
{
|
||||
public:
|
||||
struct Boxes
|
||||
{
|
||||
float w;
|
||||
float h;
|
||||
float x;
|
||||
float y;
|
||||
};
|
||||
|
||||
public:
|
||||
EraseLogoInVideoRequest();
|
||||
~EraseLogoInVideoRequest();
|
||||
|
||||
std::vector<Boxes> getBoxes()const;
|
||||
void setBoxes(const std::vector<Boxes>& boxes);
|
||||
bool getAsync()const;
|
||||
void setAsync(bool async);
|
||||
std::string getJobId()const;
|
||||
void setJobId(const std::string& jobId);
|
||||
std::string getVideoUrl()const;
|
||||
void setVideoUrl(const std::string& videoUrl);
|
||||
|
||||
private:
|
||||
std::vector<Boxes> boxes_;
|
||||
bool async_;
|
||||
std::string jobId_;
|
||||
std::string videoUrl_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IVPD_MODEL_ERASELOGOINVIDEOREQUEST_H_
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_IVPD_MODEL_ERASELOGOINVIDEORESULT_H_
|
||||
#define ALIBABACLOUD_IVPD_MODEL_ERASELOGOINVIDEORESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/ivpd/IvpdExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ivpd
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IVPD_EXPORT EraseLogoInVideoResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string jobId;
|
||||
std::string videoUrl;
|
||||
};
|
||||
|
||||
|
||||
EraseLogoInVideoResult();
|
||||
explicit EraseLogoInVideoResult(const std::string &payload);
|
||||
~EraseLogoInVideoResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IVPD_MODEL_ERASELOGOINVIDEORESULT_H_
|
||||
48
ivpd/include/alibabacloud/ivpd/model/GetAsyncResultRequest.h
Normal file
48
ivpd/include/alibabacloud/ivpd/model/GetAsyncResultRequest.h
Normal 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_IVPD_MODEL_GETASYNCRESULTREQUEST_H_
|
||||
#define ALIBABACLOUD_IVPD_MODEL_GETASYNCRESULTREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/ivpd/IvpdExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ivpd
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IVPD_EXPORT GetAsyncResultRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
GetAsyncResultRequest();
|
||||
~GetAsyncResultRequest();
|
||||
|
||||
std::string getJobId()const;
|
||||
void setJobId(const std::string& jobId);
|
||||
|
||||
private:
|
||||
std::string jobId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IVPD_MODEL_GETASYNCRESULTREQUEST_H_
|
||||
67
ivpd/include/alibabacloud/ivpd/model/GetAsyncResultResult.h
Normal file
67
ivpd/include/alibabacloud/ivpd/model/GetAsyncResultResult.h
Normal 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_IVPD_MODEL_GETASYNCRESULTRESULT_H_
|
||||
#define ALIBABACLOUD_IVPD_MODEL_GETASYNCRESULTRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/ivpd/IvpdExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ivpd
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IVPD_EXPORT GetAsyncResultResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string status;
|
||||
std::string batchSize;
|
||||
float progress;
|
||||
std::string message;
|
||||
long totalUsedTime;
|
||||
bool completed;
|
||||
bool finish;
|
||||
std::string code;
|
||||
std::string result;
|
||||
};
|
||||
|
||||
|
||||
GetAsyncResultResult();
|
||||
explicit GetAsyncResultResult(const std::string &payload);
|
||||
~GetAsyncResultResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IVPD_MODEL_GETASYNCRESULTRESULT_H_
|
||||
@@ -31,21 +31,21 @@ IvpdClient::IvpdClient(const Credentials &credentials, const ClientConfiguration
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "ivpd");
|
||||
}
|
||||
|
||||
IvpdClient::IvpdClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "ivpd");
|
||||
}
|
||||
|
||||
IvpdClient::IvpdClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "ivpd");
|
||||
}
|
||||
|
||||
IvpdClient::~IvpdClient()
|
||||
@@ -159,6 +159,42 @@ IvpdClient::DetectImageElementsOutcomeCallable IvpdClient::detectImageElementsCa
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IvpdClient::EraseLogoInVideoOutcome IvpdClient::eraseLogoInVideo(const EraseLogoInVideoRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return EraseLogoInVideoOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return EraseLogoInVideoOutcome(EraseLogoInVideoResult(outcome.result()));
|
||||
else
|
||||
return EraseLogoInVideoOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void IvpdClient::eraseLogoInVideoAsync(const EraseLogoInVideoRequest& request, const EraseLogoInVideoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, eraseLogoInVideo(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
IvpdClient::EraseLogoInVideoOutcomeCallable IvpdClient::eraseLogoInVideoCallable(const EraseLogoInVideoRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<EraseLogoInVideoOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->eraseLogoInVideo(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IvpdClient::ExtendImageStyleOutcome IvpdClient::extendImageStyle(const ExtendImageStyleRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -195,6 +231,42 @@ IvpdClient::ExtendImageStyleOutcomeCallable IvpdClient::extendImageStyleCallable
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IvpdClient::GetAsyncResultOutcome IvpdClient::getAsyncResult(const GetAsyncResultRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetAsyncResultOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetAsyncResultOutcome(GetAsyncResultResult(outcome.result()));
|
||||
else
|
||||
return GetAsyncResultOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void IvpdClient::getAsyncResultAsync(const GetAsyncResultRequest& request, const GetAsyncResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getAsyncResult(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
IvpdClient::GetAsyncResultOutcomeCallable IvpdClient::getAsyncResultCallable(const GetAsyncResultRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetAsyncResultOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getAsyncResult(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IvpdClient::GetJobResultOutcome IvpdClient::getJobResult(const GetJobResultRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
80
ivpd/src/model/EraseLogoInVideoRequest.cc
Normal file
80
ivpd/src/model/EraseLogoInVideoRequest.cc
Normal 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/ivpd/model/EraseLogoInVideoRequest.h>
|
||||
|
||||
using AlibabaCloud::Ivpd::Model::EraseLogoInVideoRequest;
|
||||
|
||||
EraseLogoInVideoRequest::EraseLogoInVideoRequest() :
|
||||
RpcServiceRequest("ivpd", "2019-06-25", "EraseLogoInVideo")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
EraseLogoInVideoRequest::~EraseLogoInVideoRequest()
|
||||
{}
|
||||
|
||||
std::vector<EraseLogoInVideoRequest::Boxes> EraseLogoInVideoRequest::getBoxes()const
|
||||
{
|
||||
return boxes_;
|
||||
}
|
||||
|
||||
void EraseLogoInVideoRequest::setBoxes(const std::vector<Boxes>& boxes)
|
||||
{
|
||||
boxes_ = boxes;
|
||||
for(int dep1 = 0; dep1!= boxes.size(); dep1++) {
|
||||
auto boxesObj = boxes.at(dep1);
|
||||
std::string boxesObjStr = "Boxes." + std::to_string(dep1 + 1);
|
||||
setParameter(boxesObjStr + ".W", std::to_string(boxesObj.w));
|
||||
setParameter(boxesObjStr + ".H", std::to_string(boxesObj.h));
|
||||
setParameter(boxesObjStr + ".X", std::to_string(boxesObj.x));
|
||||
setParameter(boxesObjStr + ".Y", std::to_string(boxesObj.y));
|
||||
}
|
||||
}
|
||||
|
||||
bool EraseLogoInVideoRequest::getAsync()const
|
||||
{
|
||||
return async_;
|
||||
}
|
||||
|
||||
void EraseLogoInVideoRequest::setAsync(bool async)
|
||||
{
|
||||
async_ = async;
|
||||
setBodyParameter("Async", async ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string EraseLogoInVideoRequest::getJobId()const
|
||||
{
|
||||
return jobId_;
|
||||
}
|
||||
|
||||
void EraseLogoInVideoRequest::setJobId(const std::string& jobId)
|
||||
{
|
||||
jobId_ = jobId;
|
||||
setBodyParameter("JobId", jobId);
|
||||
}
|
||||
|
||||
std::string EraseLogoInVideoRequest::getVideoUrl()const
|
||||
{
|
||||
return videoUrl_;
|
||||
}
|
||||
|
||||
void EraseLogoInVideoRequest::setVideoUrl(const std::string& videoUrl)
|
||||
{
|
||||
videoUrl_ = videoUrl;
|
||||
setBodyParameter("VideoUrl", videoUrl);
|
||||
}
|
||||
|
||||
68
ivpd/src/model/EraseLogoInVideoResult.cc
Normal file
68
ivpd/src/model/EraseLogoInVideoResult.cc
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ivpd/model/EraseLogoInVideoResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ivpd;
|
||||
using namespace AlibabaCloud::Ivpd::Model;
|
||||
|
||||
EraseLogoInVideoResult::EraseLogoInVideoResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
EraseLogoInVideoResult::EraseLogoInVideoResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
EraseLogoInVideoResult::~EraseLogoInVideoResult()
|
||||
{}
|
||||
|
||||
void EraseLogoInVideoResult::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(!dataNode["JobId"].isNull())
|
||||
data_.jobId = dataNode["JobId"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string EraseLogoInVideoResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
EraseLogoInVideoResult::Data EraseLogoInVideoResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string EraseLogoInVideoResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
40
ivpd/src/model/GetAsyncResultRequest.cc
Normal file
40
ivpd/src/model/GetAsyncResultRequest.cc
Normal 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/ivpd/model/GetAsyncResultRequest.h>
|
||||
|
||||
using AlibabaCloud::Ivpd::Model::GetAsyncResultRequest;
|
||||
|
||||
GetAsyncResultRequest::GetAsyncResultRequest() :
|
||||
RpcServiceRequest("ivpd", "2019-06-25", "GetAsyncResult")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetAsyncResultRequest::~GetAsyncResultRequest()
|
||||
{}
|
||||
|
||||
std::string GetAsyncResultRequest::getJobId()const
|
||||
{
|
||||
return jobId_;
|
||||
}
|
||||
|
||||
void GetAsyncResultRequest::setJobId(const std::string& jobId)
|
||||
{
|
||||
jobId_ = jobId;
|
||||
setBodyParameter("JobId", jobId);
|
||||
}
|
||||
|
||||
82
ivpd/src/model/GetAsyncResultResult.cc
Normal file
82
ivpd/src/model/GetAsyncResultResult.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* 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/ivpd/model/GetAsyncResultResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ivpd;
|
||||
using namespace AlibabaCloud::Ivpd::Model;
|
||||
|
||||
GetAsyncResultResult::GetAsyncResultResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetAsyncResultResult::GetAsyncResultResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetAsyncResultResult::~GetAsyncResultResult()
|
||||
{}
|
||||
|
||||
void GetAsyncResultResult::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["Status"].isNull())
|
||||
data_.status = dataNode["Status"].asString();
|
||||
if(!dataNode["BatchSize"].isNull())
|
||||
data_.batchSize = dataNode["BatchSize"].asString();
|
||||
if(!dataNode["Finish"].isNull())
|
||||
data_.finish = dataNode["Finish"].asString() == "true";
|
||||
if(!dataNode["Progress"].isNull())
|
||||
data_.progress = std::stof(dataNode["Progress"].asString());
|
||||
if(!dataNode["Message"].isNull())
|
||||
data_.message = dataNode["Message"].asString();
|
||||
if(!dataNode["Completed"].isNull())
|
||||
data_.completed = dataNode["Completed"].asString() == "true";
|
||||
if(!dataNode["TotalUsedTime"].isNull())
|
||||
data_.totalUsedTime = std::stol(dataNode["TotalUsedTime"].asString());
|
||||
if(!dataNode["Result"].isNull())
|
||||
data_.result = dataNode["Result"].asString();
|
||||
if(!dataNode["Code"].isNull())
|
||||
data_.code = dataNode["Code"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetAsyncResultResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
GetAsyncResultResult::Data GetAsyncResultResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string GetAsyncResultResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
@@ -49,6 +49,8 @@ set(vcs_public_header_model
|
||||
include/alibabacloud/vcs/model/ListCorpsResult.h
|
||||
include/alibabacloud/vcs/model/ListDevicesRequest.h
|
||||
include/alibabacloud/vcs/model/ListDevicesResult.h
|
||||
include/alibabacloud/vcs/model/ListMetricsRequest.h
|
||||
include/alibabacloud/vcs/model/ListMetricsResult.h
|
||||
include/alibabacloud/vcs/model/ListPersonsRequest.h
|
||||
include/alibabacloud/vcs/model/ListPersonsResult.h
|
||||
include/alibabacloud/vcs/model/RecognizeFaceQualityRequest.h
|
||||
@@ -98,6 +100,8 @@ set(vcs_src
|
||||
src/model/ListCorpsResult.cc
|
||||
src/model/ListDevicesRequest.cc
|
||||
src/model/ListDevicesResult.cc
|
||||
src/model/ListMetricsRequest.cc
|
||||
src/model/ListMetricsResult.cc
|
||||
src/model/ListPersonsRequest.cc
|
||||
src/model/ListPersonsResult.cc
|
||||
src/model/RecognizeFaceQualityRequest.cc
|
||||
|
||||
@@ -50,6 +50,8 @@
|
||||
#include "model/ListCorpsResult.h"
|
||||
#include "model/ListDevicesRequest.h"
|
||||
#include "model/ListDevicesResult.h"
|
||||
#include "model/ListMetricsRequest.h"
|
||||
#include "model/ListMetricsResult.h"
|
||||
#include "model/ListPersonsRequest.h"
|
||||
#include "model/ListPersonsResult.h"
|
||||
#include "model/RecognizeFaceQualityRequest.h"
|
||||
@@ -119,6 +121,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::ListDevicesResult> ListDevicesOutcome;
|
||||
typedef std::future<ListDevicesOutcome> ListDevicesOutcomeCallable;
|
||||
typedef std::function<void(const VcsClient*, const Model::ListDevicesRequest&, const ListDevicesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListDevicesAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListMetricsResult> ListMetricsOutcome;
|
||||
typedef std::future<ListMetricsOutcome> ListMetricsOutcomeCallable;
|
||||
typedef std::function<void(const VcsClient*, const Model::ListMetricsRequest&, const ListMetricsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListMetricsAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListPersonsResult> ListPersonsOutcome;
|
||||
typedef std::future<ListPersonsOutcome> ListPersonsOutcomeCallable;
|
||||
typedef std::function<void(const VcsClient*, const Model::ListPersonsRequest&, const ListPersonsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListPersonsAsyncHandler;
|
||||
@@ -193,6 +198,9 @@ namespace AlibabaCloud
|
||||
ListDevicesOutcome listDevices(const Model::ListDevicesRequest &request)const;
|
||||
void listDevicesAsync(const Model::ListDevicesRequest& request, const ListDevicesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListDevicesOutcomeCallable listDevicesCallable(const Model::ListDevicesRequest& request) const;
|
||||
ListMetricsOutcome listMetrics(const Model::ListMetricsRequest &request)const;
|
||||
void listMetricsAsync(const Model::ListMetricsRequest& request, const ListMetricsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListMetricsOutcomeCallable listMetricsCallable(const Model::ListMetricsRequest& request) const;
|
||||
ListPersonsOutcome listPersons(const Model::ListPersonsRequest &request)const;
|
||||
void listPersonsAsync(const Model::ListPersonsRequest& request, const ListPersonsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListPersonsOutcomeCallable listPersonsCallable(const Model::ListPersonsRequest& request) const;
|
||||
|
||||
66
vcs/include/alibabacloud/vcs/model/ListMetricsRequest.h
Normal file
66
vcs/include/alibabacloud/vcs/model/ListMetricsRequest.h
Normal 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_VCS_MODEL_LISTMETRICSREQUEST_H_
|
||||
#define ALIBABACLOUD_VCS_MODEL_LISTMETRICSREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/vcs/VcsExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Vcs
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VCS_EXPORT ListMetricsRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
ListMetricsRequest();
|
||||
~ListMetricsRequest();
|
||||
|
||||
std::string getCorpId()const;
|
||||
void setCorpId(const std::string& corpId);
|
||||
std::string getEndTime()const;
|
||||
void setEndTime(const std::string& endTime);
|
||||
std::string getStartTime()const;
|
||||
void setStartTime(const std::string& startTime);
|
||||
std::string getPageNumber()const;
|
||||
void setPageNumber(const std::string& pageNumber);
|
||||
std::string getTagCode()const;
|
||||
void setTagCode(const std::string& tagCode);
|
||||
std::string getPageSize()const;
|
||||
void setPageSize(const std::string& pageSize);
|
||||
std::string getAggregateType()const;
|
||||
void setAggregateType(const std::string& aggregateType);
|
||||
|
||||
private:
|
||||
std::string corpId_;
|
||||
std::string endTime_;
|
||||
std::string startTime_;
|
||||
std::string pageNumber_;
|
||||
std::string tagCode_;
|
||||
std::string pageSize_;
|
||||
std::string aggregateType_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VCS_MODEL_LISTMETRICSREQUEST_H_
|
||||
70
vcs/include/alibabacloud/vcs/model/ListMetricsResult.h
Normal file
70
vcs/include/alibabacloud/vcs/model/ListMetricsResult.h
Normal 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_VCS_MODEL_LISTMETRICSRESULT_H_
|
||||
#define ALIBABACLOUD_VCS_MODEL_LISTMETRICSRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/vcs/VcsExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Vcs
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_VCS_EXPORT ListMetricsResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct RecordsItem
|
||||
{
|
||||
std::string tagMetric;
|
||||
std::string tagCode;
|
||||
std::string tagValue;
|
||||
std::string dateTime;
|
||||
};
|
||||
int totalCount;
|
||||
int pageSize;
|
||||
int totalPage;
|
||||
int pageNumber;
|
||||
std::vector<RecordsItem> records;
|
||||
};
|
||||
|
||||
|
||||
ListMetricsResult();
|
||||
explicit ListMetricsResult(const std::string &payload);
|
||||
~ListMetricsResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_VCS_MODEL_LISTMETRICSRESULT_H_
|
||||
@@ -555,6 +555,42 @@ VcsClient::ListDevicesOutcomeCallable VcsClient::listDevicesCallable(const ListD
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
VcsClient::ListMetricsOutcome VcsClient::listMetrics(const ListMetricsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListMetricsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListMetricsOutcome(ListMetricsResult(outcome.result()));
|
||||
else
|
||||
return ListMetricsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void VcsClient::listMetricsAsync(const ListMetricsRequest& request, const ListMetricsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listMetrics(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
VcsClient::ListMetricsOutcomeCallable VcsClient::listMetricsCallable(const ListMetricsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListMetricsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listMetrics(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
VcsClient::ListPersonsOutcome VcsClient::listPersons(const ListPersonsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
106
vcs/src/model/ListMetricsRequest.cc
Normal file
106
vcs/src/model/ListMetricsRequest.cc
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/vcs/model/ListMetricsRequest.h>
|
||||
|
||||
using AlibabaCloud::Vcs::Model::ListMetricsRequest;
|
||||
|
||||
ListMetricsRequest::ListMetricsRequest() :
|
||||
RpcServiceRequest("vcs", "2020-05-15", "ListMetrics")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListMetricsRequest::~ListMetricsRequest()
|
||||
{}
|
||||
|
||||
std::string ListMetricsRequest::getCorpId()const
|
||||
{
|
||||
return corpId_;
|
||||
}
|
||||
|
||||
void ListMetricsRequest::setCorpId(const std::string& corpId)
|
||||
{
|
||||
corpId_ = corpId;
|
||||
setBodyParameter("CorpId", corpId);
|
||||
}
|
||||
|
||||
std::string ListMetricsRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void ListMetricsRequest::setEndTime(const std::string& endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setBodyParameter("EndTime", endTime);
|
||||
}
|
||||
|
||||
std::string ListMetricsRequest::getStartTime()const
|
||||
{
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void ListMetricsRequest::setStartTime(const std::string& startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setBodyParameter("StartTime", startTime);
|
||||
}
|
||||
|
||||
std::string ListMetricsRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListMetricsRequest::setPageNumber(const std::string& pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setBodyParameter("PageNumber", pageNumber);
|
||||
}
|
||||
|
||||
std::string ListMetricsRequest::getTagCode()const
|
||||
{
|
||||
return tagCode_;
|
||||
}
|
||||
|
||||
void ListMetricsRequest::setTagCode(const std::string& tagCode)
|
||||
{
|
||||
tagCode_ = tagCode;
|
||||
setBodyParameter("TagCode", tagCode);
|
||||
}
|
||||
|
||||
std::string ListMetricsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListMetricsRequest::setPageSize(const std::string& pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setBodyParameter("PageSize", pageSize);
|
||||
}
|
||||
|
||||
std::string ListMetricsRequest::getAggregateType()const
|
||||
{
|
||||
return aggregateType_;
|
||||
}
|
||||
|
||||
void ListMetricsRequest::setAggregateType(const std::string& aggregateType)
|
||||
{
|
||||
aggregateType_ = aggregateType;
|
||||
setBodyParameter("AggregateType", aggregateType);
|
||||
}
|
||||
|
||||
86
vcs/src/model/ListMetricsResult.cc
Normal file
86
vcs/src/model/ListMetricsResult.cc
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* 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/vcs/model/ListMetricsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Vcs;
|
||||
using namespace AlibabaCloud::Vcs::Model;
|
||||
|
||||
ListMetricsResult::ListMetricsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListMetricsResult::ListMetricsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListMetricsResult::~ListMetricsResult()
|
||||
{}
|
||||
|
||||
void ListMetricsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["PageNumber"].isNull())
|
||||
data_.pageNumber = std::stoi(dataNode["PageNumber"].asString());
|
||||
if(!dataNode["PageSize"].isNull())
|
||||
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
|
||||
if(!dataNode["TotalCount"].isNull())
|
||||
data_.totalCount = std::stoi(dataNode["TotalCount"].asString());
|
||||
if(!dataNode["TotalPage"].isNull())
|
||||
data_.totalPage = std::stoi(dataNode["TotalPage"].asString());
|
||||
auto allRecordsNode = dataNode["Records"]["RecordsItem"];
|
||||
for (auto dataNodeRecordsRecordsItem : allRecordsNode)
|
||||
{
|
||||
Data::RecordsItem recordsItemObject;
|
||||
if(!dataNodeRecordsRecordsItem["DateTime"].isNull())
|
||||
recordsItemObject.dateTime = dataNodeRecordsRecordsItem["DateTime"].asString();
|
||||
if(!dataNodeRecordsRecordsItem["TagCode"].isNull())
|
||||
recordsItemObject.tagCode = dataNodeRecordsRecordsItem["TagCode"].asString();
|
||||
if(!dataNodeRecordsRecordsItem["TagValue"].isNull())
|
||||
recordsItemObject.tagValue = dataNodeRecordsRecordsItem["TagValue"].asString();
|
||||
if(!dataNodeRecordsRecordsItem["TagMetric"].isNull())
|
||||
recordsItemObject.tagMetric = dataNodeRecordsRecordsItem["TagMetric"].asString();
|
||||
data_.records.push_back(recordsItemObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ListMetricsResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
ListMetricsResult::Data ListMetricsResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string ListMetricsResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user