Compare commits

..

2 Commits

Author SHA1 Message Date
sdk-team
2650ca7420 Add Model Parameter For InitFaceVerify API. 2020-06-29 12:48:10 +08:00
sdk-team
59d9eaf390 Supported Api EraseLogoInVideo. 2020-06-26 17:48:17 +08:00
27 changed files with 630 additions and 130 deletions

View File

@@ -1,3 +1,9 @@
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.

View File

@@ -1 +1 @@
1.36.482
1.36.484

View File

@@ -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_;
};

View File

@@ -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_;

View File

@@ -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_;
};

View File

@@ -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_;
};

View File

@@ -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_;
};

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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

View File

@@ -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;

View File

@@ -0,0 +1,65 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_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_

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_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_

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_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_

View File

@@ -0,0 +1,67 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_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_

View File

@@ -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();

View File

@@ -0,0 +1,80 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/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);
}

View 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_;
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/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);
}

View 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_;
}