Support GetImageCroppingSuggestions API.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2020-07-24 Version: 1.36.536
|
||||
- Support GetImageCroppingSuggestions API.
|
||||
- Add Remarks to face group related APIs.
|
||||
- Add Model parameter to blind watermark related APIs.
|
||||
|
||||
2020-07-24 Version: 1.36.535
|
||||
- First build.
|
||||
|
||||
|
||||
@@ -105,6 +105,8 @@ set(imm_public_header_model
|
||||
include/alibabacloud/imm/model/GetDocIndexTaskResult.h
|
||||
include/alibabacloud/imm/model/GetImageRequest.h
|
||||
include/alibabacloud/imm/model/GetImageResult.h
|
||||
include/alibabacloud/imm/model/GetImageCroppingSuggestionsRequest.h
|
||||
include/alibabacloud/imm/model/GetImageCroppingSuggestionsResult.h
|
||||
include/alibabacloud/imm/model/GetImageJobRequest.h
|
||||
include/alibabacloud/imm/model/GetImageJobResult.h
|
||||
include/alibabacloud/imm/model/GetMediaMetaRequest.h
|
||||
@@ -258,6 +260,8 @@ set(imm_src
|
||||
src/model/GetDocIndexTaskResult.cc
|
||||
src/model/GetImageRequest.cc
|
||||
src/model/GetImageResult.cc
|
||||
src/model/GetImageCroppingSuggestionsRequest.cc
|
||||
src/model/GetImageCroppingSuggestionsResult.cc
|
||||
src/model/GetImageJobRequest.cc
|
||||
src/model/GetImageJobResult.cc
|
||||
src/model/GetMediaMetaRequest.cc
|
||||
|
||||
@@ -106,6 +106,8 @@
|
||||
#include "model/GetDocIndexTaskResult.h"
|
||||
#include "model/GetImageRequest.h"
|
||||
#include "model/GetImageResult.h"
|
||||
#include "model/GetImageCroppingSuggestionsRequest.h"
|
||||
#include "model/GetImageCroppingSuggestionsResult.h"
|
||||
#include "model/GetImageJobRequest.h"
|
||||
#include "model/GetImageJobResult.h"
|
||||
#include "model/GetMediaMetaRequest.h"
|
||||
@@ -307,6 +309,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::GetImageResult> GetImageOutcome;
|
||||
typedef std::future<GetImageOutcome> GetImageOutcomeCallable;
|
||||
typedef std::function<void(const ImmClient*, const Model::GetImageRequest&, const GetImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetImageAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetImageCroppingSuggestionsResult> GetImageCroppingSuggestionsOutcome;
|
||||
typedef std::future<GetImageCroppingSuggestionsOutcome> GetImageCroppingSuggestionsOutcomeCallable;
|
||||
typedef std::function<void(const ImmClient*, const Model::GetImageCroppingSuggestionsRequest&, const GetImageCroppingSuggestionsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetImageCroppingSuggestionsAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetImageJobResult> GetImageJobOutcome;
|
||||
typedef std::future<GetImageJobOutcome> GetImageJobOutcomeCallable;
|
||||
typedef std::function<void(const ImmClient*, const Model::GetImageJobRequest&, const GetImageJobOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetImageJobAsyncHandler;
|
||||
@@ -537,6 +542,9 @@ namespace AlibabaCloud
|
||||
GetImageOutcome getImage(const Model::GetImageRequest &request)const;
|
||||
void getImageAsync(const Model::GetImageRequest& request, const GetImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetImageOutcomeCallable getImageCallable(const Model::GetImageRequest& request) const;
|
||||
GetImageCroppingSuggestionsOutcome getImageCroppingSuggestions(const Model::GetImageCroppingSuggestionsRequest &request)const;
|
||||
void getImageCroppingSuggestionsAsync(const Model::GetImageCroppingSuggestionsRequest& request, const GetImageCroppingSuggestionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetImageCroppingSuggestionsOutcomeCallable getImageCroppingSuggestionsCallable(const Model::GetImageCroppingSuggestionsRequest& request) const;
|
||||
GetImageJobOutcome getImageJob(const Model::GetImageJobRequest &request)const;
|
||||
void getImageJobAsync(const Model::GetImageJobRequest& request, const GetImageJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetImageJobOutcomeCallable getImageJobCallable(const Model::GetImageJobRequest& request) const;
|
||||
|
||||
@@ -45,6 +45,8 @@ namespace AlibabaCloud
|
||||
void setWatermarkType(const std::string& watermarkType);
|
||||
std::string getTargetUri()const;
|
||||
void setTargetUri(const std::string& targetUri);
|
||||
std::string getModel()const;
|
||||
void setModel(const std::string& model);
|
||||
std::string getImageUri()const;
|
||||
void setImageUri(const std::string& imageUri);
|
||||
std::string getOriginalImageUri()const;
|
||||
@@ -56,6 +58,7 @@ namespace AlibabaCloud
|
||||
std::string accessKeyId_;
|
||||
std::string watermarkType_;
|
||||
std::string targetUri_;
|
||||
std::string model_;
|
||||
std::string imageUri_;
|
||||
std::string originalImageUri_;
|
||||
|
||||
|
||||
@@ -49,6 +49,8 @@ namespace AlibabaCloud
|
||||
void setWatermarkType(const std::string& watermarkType);
|
||||
std::string getTargetUri()const;
|
||||
void setTargetUri(const std::string& targetUri);
|
||||
std::string getModel()const;
|
||||
void setModel(const std::string& model);
|
||||
std::string getTargetImageType()const;
|
||||
void setTargetImageType(const std::string& targetImageType);
|
||||
std::string getImageUri()const;
|
||||
@@ -62,6 +64,7 @@ namespace AlibabaCloud
|
||||
std::string accessKeyId_;
|
||||
std::string watermarkType_;
|
||||
std::string targetUri_;
|
||||
std::string model_;
|
||||
std::string targetImageType_;
|
||||
std::string imageUri_;
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* 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_GETIMAGECROPPINGSUGGESTIONSREQUEST_H_
|
||||
#define ALIBABACLOUD_IMM_MODEL_GETIMAGECROPPINGSUGGESTIONSREQUEST_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 GetImageCroppingSuggestionsRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
GetImageCroppingSuggestionsRequest();
|
||||
~GetImageCroppingSuggestionsRequest();
|
||||
|
||||
std::string getProject()const;
|
||||
void setProject(const std::string& project);
|
||||
std::string getAspectRatios()const;
|
||||
void setAspectRatios(const std::string& aspectRatios);
|
||||
std::string getAccessKeyId()const;
|
||||
void setAccessKeyId(const std::string& accessKeyId);
|
||||
std::string getImageUri()const;
|
||||
void setImageUri(const std::string& imageUri);
|
||||
|
||||
private:
|
||||
std::string project_;
|
||||
std::string aspectRatios_;
|
||||
std::string accessKeyId_;
|
||||
std::string imageUri_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IMM_MODEL_GETIMAGECROPPINGSUGGESTIONSREQUEST_H_
|
||||
@@ -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_IMM_MODEL_GETIMAGECROPPINGSUGGESTIONSRESULT_H_
|
||||
#define ALIBABACLOUD_IMM_MODEL_GETIMAGECROPPINGSUGGESTIONSRESULT_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 GetImageCroppingSuggestionsResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct CroppingSuggestionsItem
|
||||
{
|
||||
struct CroppingBoundary
|
||||
{
|
||||
int left;
|
||||
int top;
|
||||
int height;
|
||||
int width;
|
||||
};
|
||||
std::string aspectRatio;
|
||||
float score;
|
||||
CroppingBoundary croppingBoundary;
|
||||
};
|
||||
|
||||
|
||||
GetImageCroppingSuggestionsResult();
|
||||
explicit GetImageCroppingSuggestionsResult(const std::string &payload);
|
||||
~GetImageCroppingSuggestionsResult();
|
||||
std::string getImageUri()const;
|
||||
std::vector<CroppingSuggestionsItem> getCroppingSuggestions()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string imageUri_;
|
||||
std::vector<CroppingSuggestionsItem> croppingSuggestions_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IMM_MODEL_GETIMAGECROPPINGSUGGESTIONSRESULT_H_
|
||||
@@ -44,6 +44,7 @@ namespace AlibabaCloud
|
||||
std::string getServiceRole()const;
|
||||
std::string getEndpoint()const;
|
||||
std::string getCreateTime()const;
|
||||
std::string getRegionId()const;
|
||||
std::string getBillingType()const;
|
||||
|
||||
protected:
|
||||
@@ -56,6 +57,7 @@ namespace AlibabaCloud
|
||||
std::string serviceRole_;
|
||||
std::string endpoint_;
|
||||
std::string createTime_;
|
||||
std::string regionId_;
|
||||
std::string billingType_;
|
||||
|
||||
};
|
||||
|
||||
@@ -37,27 +37,48 @@ namespace AlibabaCloud
|
||||
|
||||
std::string getProject()const;
|
||||
void setProject(const std::string& project);
|
||||
std::string getRemarksBQuery()const;
|
||||
void setRemarksBQuery(const std::string& remarksBQuery);
|
||||
std::string getExternalId()const;
|
||||
void setExternalId(const std::string& externalId);
|
||||
std::string getAccessKeyId()const;
|
||||
void setAccessKeyId(const std::string& accessKeyId);
|
||||
int getLimit()const;
|
||||
void setLimit(int limit);
|
||||
std::string getRemarksArrayBQuery()const;
|
||||
void setRemarksArrayBQuery(const std::string& remarksArrayBQuery);
|
||||
std::string getOrder()const;
|
||||
void setOrder(const std::string& order);
|
||||
std::string getRemarksAQuery()const;
|
||||
void setRemarksAQuery(const std::string& remarksAQuery);
|
||||
std::string getOrderBy()const;
|
||||
void setOrderBy(const std::string& orderBy);
|
||||
std::string getRemarksDQuery()const;
|
||||
void setRemarksDQuery(const std::string& remarksDQuery);
|
||||
std::string getRemarksArrayAQuery()const;
|
||||
void setRemarksArrayAQuery(const std::string& remarksArrayAQuery);
|
||||
std::string getMarker()const;
|
||||
void setMarker(const std::string& marker);
|
||||
std::string getSetId()const;
|
||||
void setSetId(const std::string& setId);
|
||||
std::string getRemarksCQuery()const;
|
||||
void setRemarksCQuery(const std::string& remarksCQuery);
|
||||
|
||||
private:
|
||||
std::string project_;
|
||||
std::string remarksBQuery_;
|
||||
std::string externalId_;
|
||||
std::string accessKeyId_;
|
||||
int limit_;
|
||||
std::string remarksArrayBQuery_;
|
||||
std::string order_;
|
||||
std::string remarksAQuery_;
|
||||
std::string orderBy_;
|
||||
std::string remarksDQuery_;
|
||||
std::string remarksArrayAQuery_;
|
||||
std::string marker_;
|
||||
std::string setId_;
|
||||
std::string remarksCQuery_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -51,8 +51,16 @@ namespace AlibabaCloud
|
||||
std::string groupName;
|
||||
std::string modifyTime;
|
||||
std::string createTime;
|
||||
int faceCount;
|
||||
std::string externalId;
|
||||
std::string remarksA;
|
||||
std::string remarksB;
|
||||
std::string groupId;
|
||||
std::string remarksArrayB;
|
||||
std::string remarksC;
|
||||
int imageCount;
|
||||
std::string remarksD;
|
||||
std::string remarksArrayA;
|
||||
int faceCount;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ namespace AlibabaCloud
|
||||
std::string serviceRole;
|
||||
std::string endpoint;
|
||||
std::string createTime;
|
||||
std::string regionId;
|
||||
std::string billingType;
|
||||
};
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace AlibabaCloud
|
||||
std::string getServiceRole()const;
|
||||
std::string getEndpoint()const;
|
||||
std::string getCreateTime()const;
|
||||
std::string getRegionId()const;
|
||||
std::string getBillingType()const;
|
||||
|
||||
protected:
|
||||
@@ -56,6 +57,7 @@ namespace AlibabaCloud
|
||||
std::string serviceRole_;
|
||||
std::string endpoint_;
|
||||
std::string createTime_;
|
||||
std::string regionId_;
|
||||
std::string billingType_;
|
||||
|
||||
};
|
||||
|
||||
@@ -37,12 +37,26 @@ namespace AlibabaCloud
|
||||
|
||||
std::string getProject()const;
|
||||
void setProject(const std::string& project);
|
||||
std::string getExternalId()const;
|
||||
void setExternalId(const std::string& externalId);
|
||||
std::string getAccessKeyId()const;
|
||||
void setAccessKeyId(const std::string& accessKeyId);
|
||||
std::string getGroupId()const;
|
||||
void setGroupId(const std::string& groupId);
|
||||
std::string getRemarksB()const;
|
||||
void setRemarksB(const std::string& remarksB);
|
||||
std::string getRemarksA()const;
|
||||
void setRemarksA(const std::string& remarksA);
|
||||
std::string getGroupName()const;
|
||||
void setGroupName(const std::string& groupName);
|
||||
std::string getRemarksArrayA()const;
|
||||
void setRemarksArrayA(const std::string& remarksArrayA);
|
||||
std::string getRemarksArrayB()const;
|
||||
void setRemarksArrayB(const std::string& remarksArrayB);
|
||||
std::string getRemarksD()const;
|
||||
void setRemarksD(const std::string& remarksD);
|
||||
std::string getRemarksC()const;
|
||||
void setRemarksC(const std::string& remarksC);
|
||||
std::string getSetId()const;
|
||||
void setSetId(const std::string& setId);
|
||||
std::string getGroupCoverFaceId()const;
|
||||
@@ -50,9 +64,16 @@ namespace AlibabaCloud
|
||||
|
||||
private:
|
||||
std::string project_;
|
||||
std::string externalId_;
|
||||
std::string accessKeyId_;
|
||||
std::string groupId_;
|
||||
std::string remarksB_;
|
||||
std::string remarksA_;
|
||||
std::string groupName_;
|
||||
std::string remarksArrayA_;
|
||||
std::string remarksArrayB_;
|
||||
std::string remarksD_;
|
||||
std::string remarksC_;
|
||||
std::string setId_;
|
||||
std::string groupCoverFaceId_;
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ namespace AlibabaCloud
|
||||
std::string getType()const;
|
||||
std::string getServiceRole()const;
|
||||
std::string getCreateTime()const;
|
||||
std::string getRegionId()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
@@ -53,6 +54,7 @@ namespace AlibabaCloud
|
||||
std::string type_;
|
||||
std::string serviceRole_;
|
||||
std::string createTime_;
|
||||
std::string regionId_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -31,21 +31,21 @@ ImmClient::ImmClient(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, "imm");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
ImmClient::ImmClient(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, "imm");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
ImmClient::ImmClient(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, "imm");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
ImmClient::~ImmClient()
|
||||
@@ -1563,6 +1563,42 @@ ImmClient::GetImageOutcomeCallable ImmClient::getImageCallable(const GetImageReq
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ImmClient::GetImageCroppingSuggestionsOutcome ImmClient::getImageCroppingSuggestions(const GetImageCroppingSuggestionsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetImageCroppingSuggestionsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetImageCroppingSuggestionsOutcome(GetImageCroppingSuggestionsResult(outcome.result()));
|
||||
else
|
||||
return GetImageCroppingSuggestionsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ImmClient::getImageCroppingSuggestionsAsync(const GetImageCroppingSuggestionsRequest& request, const GetImageCroppingSuggestionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getImageCroppingSuggestions(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ImmClient::GetImageCroppingSuggestionsOutcomeCallable ImmClient::getImageCroppingSuggestionsCallable(const GetImageCroppingSuggestionsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetImageCroppingSuggestionsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getImageCroppingSuggestions(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ImmClient::GetImageJobOutcome ImmClient::getImageJob(const GetImageJobRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -82,6 +82,17 @@ void DecodeBlindWatermarkRequest::setTargetUri(const std::string& targetUri)
|
||||
setParameter("TargetUri", targetUri);
|
||||
}
|
||||
|
||||
std::string DecodeBlindWatermarkRequest::getModel()const
|
||||
{
|
||||
return model_;
|
||||
}
|
||||
|
||||
void DecodeBlindWatermarkRequest::setModel(const std::string& model)
|
||||
{
|
||||
model_ = model;
|
||||
setParameter("Model", model);
|
||||
}
|
||||
|
||||
std::string DecodeBlindWatermarkRequest::getImageUri()const
|
||||
{
|
||||
return imageUri_;
|
||||
|
||||
@@ -104,6 +104,17 @@ void EncodeBlindWatermarkRequest::setTargetUri(const std::string& targetUri)
|
||||
setParameter("TargetUri", targetUri);
|
||||
}
|
||||
|
||||
std::string EncodeBlindWatermarkRequest::getModel()const
|
||||
{
|
||||
return model_;
|
||||
}
|
||||
|
||||
void EncodeBlindWatermarkRequest::setModel(const std::string& model)
|
||||
{
|
||||
model_ = model;
|
||||
setParameter("Model", model);
|
||||
}
|
||||
|
||||
std::string EncodeBlindWatermarkRequest::getTargetImageType()const
|
||||
{
|
||||
return targetImageType_;
|
||||
|
||||
73
imm/src/model/GetImageCroppingSuggestionsRequest.cc
Normal file
73
imm/src/model/GetImageCroppingSuggestionsRequest.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* 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/GetImageCroppingSuggestionsRequest.h>
|
||||
|
||||
using AlibabaCloud::Imm::Model::GetImageCroppingSuggestionsRequest;
|
||||
|
||||
GetImageCroppingSuggestionsRequest::GetImageCroppingSuggestionsRequest() :
|
||||
RpcServiceRequest("imm", "2017-09-06", "GetImageCroppingSuggestions")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetImageCroppingSuggestionsRequest::~GetImageCroppingSuggestionsRequest()
|
||||
{}
|
||||
|
||||
std::string GetImageCroppingSuggestionsRequest::getProject()const
|
||||
{
|
||||
return project_;
|
||||
}
|
||||
|
||||
void GetImageCroppingSuggestionsRequest::setProject(const std::string& project)
|
||||
{
|
||||
project_ = project;
|
||||
setParameter("Project", project);
|
||||
}
|
||||
|
||||
std::string GetImageCroppingSuggestionsRequest::getAspectRatios()const
|
||||
{
|
||||
return aspectRatios_;
|
||||
}
|
||||
|
||||
void GetImageCroppingSuggestionsRequest::setAspectRatios(const std::string& aspectRatios)
|
||||
{
|
||||
aspectRatios_ = aspectRatios;
|
||||
setParameter("AspectRatios", aspectRatios);
|
||||
}
|
||||
|
||||
std::string GetImageCroppingSuggestionsRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void GetImageCroppingSuggestionsRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string GetImageCroppingSuggestionsRequest::getImageUri()const
|
||||
{
|
||||
return imageUri_;
|
||||
}
|
||||
|
||||
void GetImageCroppingSuggestionsRequest::setImageUri(const std::string& imageUri)
|
||||
{
|
||||
imageUri_ = imageUri;
|
||||
setParameter("ImageUri", imageUri);
|
||||
}
|
||||
|
||||
75
imm/src/model/GetImageCroppingSuggestionsResult.cc
Normal file
75
imm/src/model/GetImageCroppingSuggestionsResult.cc
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/imm/model/GetImageCroppingSuggestionsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Imm;
|
||||
using namespace AlibabaCloud::Imm::Model;
|
||||
|
||||
GetImageCroppingSuggestionsResult::GetImageCroppingSuggestionsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetImageCroppingSuggestionsResult::GetImageCroppingSuggestionsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetImageCroppingSuggestionsResult::~GetImageCroppingSuggestionsResult()
|
||||
{}
|
||||
|
||||
void GetImageCroppingSuggestionsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allCroppingSuggestionsNode = value["CroppingSuggestions"]["CroppingSuggestionsItem"];
|
||||
for (auto valueCroppingSuggestionsCroppingSuggestionsItem : allCroppingSuggestionsNode)
|
||||
{
|
||||
CroppingSuggestionsItem croppingSuggestionsObject;
|
||||
if(!valueCroppingSuggestionsCroppingSuggestionsItem["Score"].isNull())
|
||||
croppingSuggestionsObject.score = std::stof(valueCroppingSuggestionsCroppingSuggestionsItem["Score"].asString());
|
||||
if(!valueCroppingSuggestionsCroppingSuggestionsItem["AspectRatio"].isNull())
|
||||
croppingSuggestionsObject.aspectRatio = valueCroppingSuggestionsCroppingSuggestionsItem["AspectRatio"].asString();
|
||||
auto croppingBoundaryNode = value["CroppingBoundary"];
|
||||
if(!croppingBoundaryNode["Left"].isNull())
|
||||
croppingSuggestionsObject.croppingBoundary.left = std::stoi(croppingBoundaryNode["Left"].asString());
|
||||
if(!croppingBoundaryNode["Top"].isNull())
|
||||
croppingSuggestionsObject.croppingBoundary.top = std::stoi(croppingBoundaryNode["Top"].asString());
|
||||
if(!croppingBoundaryNode["Width"].isNull())
|
||||
croppingSuggestionsObject.croppingBoundary.width = std::stoi(croppingBoundaryNode["Width"].asString());
|
||||
if(!croppingBoundaryNode["Height"].isNull())
|
||||
croppingSuggestionsObject.croppingBoundary.height = std::stoi(croppingBoundaryNode["Height"].asString());
|
||||
croppingSuggestions_.push_back(croppingSuggestionsObject);
|
||||
}
|
||||
if(!value["ImageUri"].isNull())
|
||||
imageUri_ = value["ImageUri"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetImageCroppingSuggestionsResult::getImageUri()const
|
||||
{
|
||||
return imageUri_;
|
||||
}
|
||||
|
||||
std::vector<GetImageCroppingSuggestionsResult::CroppingSuggestionsItem> GetImageCroppingSuggestionsResult::getCroppingSuggestions()const
|
||||
{
|
||||
return croppingSuggestions_;
|
||||
}
|
||||
|
||||
@@ -55,6 +55,8 @@ void GetProjectResult::parse(const std::string &payload)
|
||||
cU_ = std::stoi(value["CU"].asString());
|
||||
if(!value["BillingType"].isNull())
|
||||
billingType_ = value["BillingType"].asString();
|
||||
if(!value["RegionId"].isNull())
|
||||
regionId_ = value["RegionId"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -93,6 +95,11 @@ std::string GetProjectResult::getCreateTime()const
|
||||
return createTime_;
|
||||
}
|
||||
|
||||
std::string GetProjectResult::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
std::string GetProjectResult::getBillingType()const
|
||||
{
|
||||
return billingType_;
|
||||
|
||||
@@ -38,6 +38,28 @@ void ListFaceGroupsRequest::setProject(const std::string& project)
|
||||
setParameter("Project", project);
|
||||
}
|
||||
|
||||
std::string ListFaceGroupsRequest::getRemarksBQuery()const
|
||||
{
|
||||
return remarksBQuery_;
|
||||
}
|
||||
|
||||
void ListFaceGroupsRequest::setRemarksBQuery(const std::string& remarksBQuery)
|
||||
{
|
||||
remarksBQuery_ = remarksBQuery;
|
||||
setParameter("RemarksBQuery", remarksBQuery);
|
||||
}
|
||||
|
||||
std::string ListFaceGroupsRequest::getExternalId()const
|
||||
{
|
||||
return externalId_;
|
||||
}
|
||||
|
||||
void ListFaceGroupsRequest::setExternalId(const std::string& externalId)
|
||||
{
|
||||
externalId_ = externalId;
|
||||
setParameter("ExternalId", externalId);
|
||||
}
|
||||
|
||||
std::string ListFaceGroupsRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
@@ -60,6 +82,17 @@ void ListFaceGroupsRequest::setLimit(int limit)
|
||||
setParameter("Limit", std::to_string(limit));
|
||||
}
|
||||
|
||||
std::string ListFaceGroupsRequest::getRemarksArrayBQuery()const
|
||||
{
|
||||
return remarksArrayBQuery_;
|
||||
}
|
||||
|
||||
void ListFaceGroupsRequest::setRemarksArrayBQuery(const std::string& remarksArrayBQuery)
|
||||
{
|
||||
remarksArrayBQuery_ = remarksArrayBQuery;
|
||||
setParameter("RemarksArrayBQuery", remarksArrayBQuery);
|
||||
}
|
||||
|
||||
std::string ListFaceGroupsRequest::getOrder()const
|
||||
{
|
||||
return order_;
|
||||
@@ -71,6 +104,17 @@ void ListFaceGroupsRequest::setOrder(const std::string& order)
|
||||
setParameter("Order", order);
|
||||
}
|
||||
|
||||
std::string ListFaceGroupsRequest::getRemarksAQuery()const
|
||||
{
|
||||
return remarksAQuery_;
|
||||
}
|
||||
|
||||
void ListFaceGroupsRequest::setRemarksAQuery(const std::string& remarksAQuery)
|
||||
{
|
||||
remarksAQuery_ = remarksAQuery;
|
||||
setParameter("RemarksAQuery", remarksAQuery);
|
||||
}
|
||||
|
||||
std::string ListFaceGroupsRequest::getOrderBy()const
|
||||
{
|
||||
return orderBy_;
|
||||
@@ -82,6 +126,28 @@ void ListFaceGroupsRequest::setOrderBy(const std::string& orderBy)
|
||||
setParameter("OrderBy", orderBy);
|
||||
}
|
||||
|
||||
std::string ListFaceGroupsRequest::getRemarksDQuery()const
|
||||
{
|
||||
return remarksDQuery_;
|
||||
}
|
||||
|
||||
void ListFaceGroupsRequest::setRemarksDQuery(const std::string& remarksDQuery)
|
||||
{
|
||||
remarksDQuery_ = remarksDQuery;
|
||||
setParameter("RemarksDQuery", remarksDQuery);
|
||||
}
|
||||
|
||||
std::string ListFaceGroupsRequest::getRemarksArrayAQuery()const
|
||||
{
|
||||
return remarksArrayAQuery_;
|
||||
}
|
||||
|
||||
void ListFaceGroupsRequest::setRemarksArrayAQuery(const std::string& remarksArrayAQuery)
|
||||
{
|
||||
remarksArrayAQuery_ = remarksArrayAQuery;
|
||||
setParameter("RemarksArrayAQuery", remarksArrayAQuery);
|
||||
}
|
||||
|
||||
std::string ListFaceGroupsRequest::getMarker()const
|
||||
{
|
||||
return marker_;
|
||||
@@ -104,3 +170,14 @@ void ListFaceGroupsRequest::setSetId(const std::string& setId)
|
||||
setParameter("SetId", setId);
|
||||
}
|
||||
|
||||
std::string ListFaceGroupsRequest::getRemarksCQuery()const
|
||||
{
|
||||
return remarksCQuery_;
|
||||
}
|
||||
|
||||
void ListFaceGroupsRequest::setRemarksCQuery(const std::string& remarksCQuery)
|
||||
{
|
||||
remarksCQuery_ = remarksCQuery;
|
||||
setParameter("RemarksCQuery", remarksCQuery);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,22 @@ void ListFaceGroupsResult::parse(const std::string &payload)
|
||||
faceGroupsObject.createTime = valueFaceGroupsFaceGroupsItem["CreateTime"].asString();
|
||||
if(!valueFaceGroupsFaceGroupsItem["ModifyTime"].isNull())
|
||||
faceGroupsObject.modifyTime = valueFaceGroupsFaceGroupsItem["ModifyTime"].asString();
|
||||
if(!valueFaceGroupsFaceGroupsItem["RemarksA"].isNull())
|
||||
faceGroupsObject.remarksA = valueFaceGroupsFaceGroupsItem["RemarksA"].asString();
|
||||
if(!valueFaceGroupsFaceGroupsItem["RemarksB"].isNull())
|
||||
faceGroupsObject.remarksB = valueFaceGroupsFaceGroupsItem["RemarksB"].asString();
|
||||
if(!valueFaceGroupsFaceGroupsItem["RemarksC"].isNull())
|
||||
faceGroupsObject.remarksC = valueFaceGroupsFaceGroupsItem["RemarksC"].asString();
|
||||
if(!valueFaceGroupsFaceGroupsItem["RemarksD"].isNull())
|
||||
faceGroupsObject.remarksD = valueFaceGroupsFaceGroupsItem["RemarksD"].asString();
|
||||
if(!valueFaceGroupsFaceGroupsItem["RemarksArrayA"].isNull())
|
||||
faceGroupsObject.remarksArrayA = valueFaceGroupsFaceGroupsItem["RemarksArrayA"].asString();
|
||||
if(!valueFaceGroupsFaceGroupsItem["RemarksArrayB"].isNull())
|
||||
faceGroupsObject.remarksArrayB = valueFaceGroupsFaceGroupsItem["RemarksArrayB"].asString();
|
||||
if(!valueFaceGroupsFaceGroupsItem["ExternalId"].isNull())
|
||||
faceGroupsObject.externalId = valueFaceGroupsFaceGroupsItem["ExternalId"].asString();
|
||||
if(!valueFaceGroupsFaceGroupsItem["ImageCount"].isNull())
|
||||
faceGroupsObject.imageCount = std::stoi(valueFaceGroupsFaceGroupsItem["ImageCount"].asString());
|
||||
auto groupCoverFaceNode = value["GroupCoverFace"];
|
||||
if(!groupCoverFaceNode["FaceId"].isNull())
|
||||
faceGroupsObject.groupCoverFace.faceId = groupCoverFaceNode["FaceId"].asString();
|
||||
|
||||
@@ -59,6 +59,8 @@ void ListProjectsResult::parse(const std::string &payload)
|
||||
projectsObject.type = valueProjectsProjectsItem["Type"].asString();
|
||||
if(!valueProjectsProjectsItem["BillingType"].isNull())
|
||||
projectsObject.billingType = valueProjectsProjectsItem["BillingType"].asString();
|
||||
if(!valueProjectsProjectsItem["RegionId"].isNull())
|
||||
projectsObject.regionId = valueProjectsProjectsItem["RegionId"].asString();
|
||||
projects_.push_back(projectsObject);
|
||||
}
|
||||
if(!value["NextMarker"].isNull())
|
||||
|
||||
@@ -55,6 +55,8 @@ void PutProjectResult::parse(const std::string &payload)
|
||||
endpoint_ = value["Endpoint"].asString();
|
||||
if(!value["BillingType"].isNull())
|
||||
billingType_ = value["BillingType"].asString();
|
||||
if(!value["RegionId"].isNull())
|
||||
regionId_ = value["RegionId"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -93,6 +95,11 @@ std::string PutProjectResult::getCreateTime()const
|
||||
return createTime_;
|
||||
}
|
||||
|
||||
std::string PutProjectResult::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
std::string PutProjectResult::getBillingType()const
|
||||
{
|
||||
return billingType_;
|
||||
|
||||
@@ -38,6 +38,17 @@ void UpdateFaceGroupRequest::setProject(const std::string& project)
|
||||
setParameter("Project", project);
|
||||
}
|
||||
|
||||
std::string UpdateFaceGroupRequest::getExternalId()const
|
||||
{
|
||||
return externalId_;
|
||||
}
|
||||
|
||||
void UpdateFaceGroupRequest::setExternalId(const std::string& externalId)
|
||||
{
|
||||
externalId_ = externalId;
|
||||
setParameter("ExternalId", externalId);
|
||||
}
|
||||
|
||||
std::string UpdateFaceGroupRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
@@ -60,6 +71,28 @@ void UpdateFaceGroupRequest::setGroupId(const std::string& groupId)
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string UpdateFaceGroupRequest::getRemarksB()const
|
||||
{
|
||||
return remarksB_;
|
||||
}
|
||||
|
||||
void UpdateFaceGroupRequest::setRemarksB(const std::string& remarksB)
|
||||
{
|
||||
remarksB_ = remarksB;
|
||||
setParameter("RemarksB", remarksB);
|
||||
}
|
||||
|
||||
std::string UpdateFaceGroupRequest::getRemarksA()const
|
||||
{
|
||||
return remarksA_;
|
||||
}
|
||||
|
||||
void UpdateFaceGroupRequest::setRemarksA(const std::string& remarksA)
|
||||
{
|
||||
remarksA_ = remarksA;
|
||||
setParameter("RemarksA", remarksA);
|
||||
}
|
||||
|
||||
std::string UpdateFaceGroupRequest::getGroupName()const
|
||||
{
|
||||
return groupName_;
|
||||
@@ -71,6 +104,50 @@ void UpdateFaceGroupRequest::setGroupName(const std::string& groupName)
|
||||
setParameter("GroupName", groupName);
|
||||
}
|
||||
|
||||
std::string UpdateFaceGroupRequest::getRemarksArrayA()const
|
||||
{
|
||||
return remarksArrayA_;
|
||||
}
|
||||
|
||||
void UpdateFaceGroupRequest::setRemarksArrayA(const std::string& remarksArrayA)
|
||||
{
|
||||
remarksArrayA_ = remarksArrayA;
|
||||
setParameter("RemarksArrayA", remarksArrayA);
|
||||
}
|
||||
|
||||
std::string UpdateFaceGroupRequest::getRemarksArrayB()const
|
||||
{
|
||||
return remarksArrayB_;
|
||||
}
|
||||
|
||||
void UpdateFaceGroupRequest::setRemarksArrayB(const std::string& remarksArrayB)
|
||||
{
|
||||
remarksArrayB_ = remarksArrayB;
|
||||
setParameter("RemarksArrayB", remarksArrayB);
|
||||
}
|
||||
|
||||
std::string UpdateFaceGroupRequest::getRemarksD()const
|
||||
{
|
||||
return remarksD_;
|
||||
}
|
||||
|
||||
void UpdateFaceGroupRequest::setRemarksD(const std::string& remarksD)
|
||||
{
|
||||
remarksD_ = remarksD;
|
||||
setParameter("RemarksD", remarksD);
|
||||
}
|
||||
|
||||
std::string UpdateFaceGroupRequest::getRemarksC()const
|
||||
{
|
||||
return remarksC_;
|
||||
}
|
||||
|
||||
void UpdateFaceGroupRequest::setRemarksC(const std::string& remarksC)
|
||||
{
|
||||
remarksC_ = remarksC;
|
||||
setParameter("RemarksC", remarksC);
|
||||
}
|
||||
|
||||
std::string UpdateFaceGroupRequest::getSetId()const
|
||||
{
|
||||
return setId_;
|
||||
|
||||
@@ -51,6 +51,8 @@ void UpdateProjectResult::parse(const std::string &payload)
|
||||
cU_ = std::stoi(value["CU"].asString());
|
||||
if(!value["Type"].isNull())
|
||||
type_ = value["Type"].asString();
|
||||
if(!value["RegionId"].isNull())
|
||||
regionId_ = value["RegionId"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -84,3 +86,8 @@ std::string UpdateProjectResult::getCreateTime()const
|
||||
return createTime_;
|
||||
}
|
||||
|
||||
std::string UpdateProjectResult::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user