IMM SDK Auto Released By zhengrui.lj,Version:1.36.24

Signed-off-by: sdk-team <sdk-team@alibabacloud.com>
This commit is contained in:
sdk-team
2019-05-14 14:34:52 +08:00
parent eb42c015e7
commit e1febab02f
12 changed files with 682 additions and 1 deletions

View File

@@ -1743,6 +1743,42 @@ ImmClient::ListTagPhotosOutcomeCallable ImmClient::listTagPhotosCallable(const L
return task->get_future();
}
ImmClient::DetectImageBodiesOutcome ImmClient::detectImageBodies(const DetectImageBodiesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DetectImageBodiesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DetectImageBodiesOutcome(DetectImageBodiesResult(outcome.result()));
else
return DetectImageBodiesOutcome(outcome.error());
}
void ImmClient::detectImageBodiesAsync(const DetectImageBodiesRequest& request, const DetectImageBodiesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, detectImageBodies(request), context);
};
asyncExecute(new Runnable(fn));
}
ImmClient::DetectImageBodiesOutcomeCallable ImmClient::detectImageBodiesCallable(const DetectImageBodiesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DetectImageBodiesOutcome()>>(
[this, request]()
{
return this->detectImageBodies(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ImmClient::DeleteFaceSearchImageByIdOutcome ImmClient::deleteFaceSearchImageById(const DeleteFaceSearchImageByIdRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1959,6 +1995,42 @@ ImmClient::ListVideoAudiosOutcomeCallable ImmClient::listVideoAudiosCallable(con
return task->get_future();
}
ImmClient::CreateMergeFaceGroupsJobOutcome ImmClient::createMergeFaceGroupsJob(const CreateMergeFaceGroupsJobRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateMergeFaceGroupsJobOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateMergeFaceGroupsJobOutcome(CreateMergeFaceGroupsJobResult(outcome.result()));
else
return CreateMergeFaceGroupsJobOutcome(outcome.error());
}
void ImmClient::createMergeFaceGroupsJobAsync(const CreateMergeFaceGroupsJobRequest& request, const CreateMergeFaceGroupsJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createMergeFaceGroupsJob(request), context);
};
asyncExecute(new Runnable(fn));
}
ImmClient::CreateMergeFaceGroupsJobOutcomeCallable ImmClient::createMergeFaceGroupsJobCallable(const CreateMergeFaceGroupsJobRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateMergeFaceGroupsJobOutcome()>>(
[this, request]()
{
return this->createMergeFaceGroupsJob(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ImmClient::DeleteTagByUrlOutcome ImmClient::deleteTagByUrl(const DeleteTagByUrlRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,115 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imm/model/CreateMergeFaceGroupsJobRequest.h>
using AlibabaCloud::Imm::Model::CreateMergeFaceGroupsJobRequest;
CreateMergeFaceGroupsJobRequest::CreateMergeFaceGroupsJobRequest() :
RpcServiceRequest("imm", "2017-09-06", "CreateMergeFaceGroupsJob")
{}
CreateMergeFaceGroupsJobRequest::~CreateMergeFaceGroupsJobRequest()
{}
std::string CreateMergeFaceGroupsJobRequest::getGroupIdFrom()const
{
return groupIdFrom_;
}
void CreateMergeFaceGroupsJobRequest::setGroupIdFrom(const std::string& groupIdFrom)
{
groupIdFrom_ = groupIdFrom;
setCoreParameter("GroupIdFrom", groupIdFrom);
}
std::string CreateMergeFaceGroupsJobRequest::getGroupIdTo()const
{
return groupIdTo_;
}
void CreateMergeFaceGroupsJobRequest::setGroupIdTo(const std::string& groupIdTo)
{
groupIdTo_ = groupIdTo;
setCoreParameter("GroupIdTo", groupIdTo);
}
std::string CreateMergeFaceGroupsJobRequest::getNotifyTopicName()const
{
return notifyTopicName_;
}
void CreateMergeFaceGroupsJobRequest::setNotifyTopicName(const std::string& notifyTopicName)
{
notifyTopicName_ = notifyTopicName;
setCoreParameter("NotifyTopicName", notifyTopicName);
}
std::string CreateMergeFaceGroupsJobRequest::getRegionId()const
{
return regionId_;
}
void CreateMergeFaceGroupsJobRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
std::string CreateMergeFaceGroupsJobRequest::getNotifyEndpoint()const
{
return notifyEndpoint_;
}
void CreateMergeFaceGroupsJobRequest::setNotifyEndpoint(const std::string& notifyEndpoint)
{
notifyEndpoint_ = notifyEndpoint;
setCoreParameter("NotifyEndpoint", notifyEndpoint);
}
std::string CreateMergeFaceGroupsJobRequest::getProject()const
{
return project_;
}
void CreateMergeFaceGroupsJobRequest::setProject(const std::string& project)
{
project_ = project;
setCoreParameter("Project", project);
}
std::string CreateMergeFaceGroupsJobRequest::getSetId()const
{
return setId_;
}
void CreateMergeFaceGroupsJobRequest::setSetId(const std::string& setId)
{
setId_ = setId;
setCoreParameter("SetId", setId);
}
std::string CreateMergeFaceGroupsJobRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void CreateMergeFaceGroupsJobRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setCoreParameter("AccessKeyId", accessKeyId);
}

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/imm/model/CreateMergeFaceGroupsJobResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imm;
using namespace AlibabaCloud::Imm::Model;
CreateMergeFaceGroupsJobResult::CreateMergeFaceGroupsJobResult() :
ServiceResult()
{}
CreateMergeFaceGroupsJobResult::CreateMergeFaceGroupsJobResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateMergeFaceGroupsJobResult::~CreateMergeFaceGroupsJobResult()
{}
void CreateMergeFaceGroupsJobResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["JobId"].isNull())
jobId_ = value["JobId"].asString();
if(!value["SetId"].isNull())
setId_ = value["SetId"].asString();
if(!value["JobType"].isNull())
jobType_ = value["JobType"].asString();
if(!value["GroupIdTo"].isNull())
groupIdTo_ = value["GroupIdTo"].asString();
if(!value["GroupIdFrom"].isNull())
groupIdFrom_ = value["GroupIdFrom"].asString();
}
std::string CreateMergeFaceGroupsJobResult::getGroupIdFrom()const
{
return groupIdFrom_;
}
std::string CreateMergeFaceGroupsJobResult::getJobType()const
{
return jobType_;
}
std::string CreateMergeFaceGroupsJobResult::getSetId()const
{
return setId_;
}
std::string CreateMergeFaceGroupsJobResult::getGroupIdTo()const
{
return groupIdTo_;
}
std::string CreateMergeFaceGroupsJobResult::getJobId()const
{
return jobId_;
}

View File

@@ -0,0 +1,71 @@
/*
* 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/DetectImageBodiesRequest.h>
using AlibabaCloud::Imm::Model::DetectImageBodiesRequest;
DetectImageBodiesRequest::DetectImageBodiesRequest() :
RpcServiceRequest("imm", "2017-09-06", "DetectImageBodies")
{}
DetectImageBodiesRequest::~DetectImageBodiesRequest()
{}
std::string DetectImageBodiesRequest::getImageUri()const
{
return imageUri_;
}
void DetectImageBodiesRequest::setImageUri(const std::string& imageUri)
{
imageUri_ = imageUri;
setCoreParameter("ImageUri", imageUri);
}
std::string DetectImageBodiesRequest::getRegionId()const
{
return regionId_;
}
void DetectImageBodiesRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
std::string DetectImageBodiesRequest::getProject()const
{
return project_;
}
void DetectImageBodiesRequest::setProject(const std::string& project)
{
project_ = project;
setCoreParameter("Project", project);
}
std::string DetectImageBodiesRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DetectImageBodiesRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setCoreParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,74 @@
/*
* 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/DetectImageBodiesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imm;
using namespace AlibabaCloud::Imm::Model;
DetectImageBodiesResult::DetectImageBodiesResult() :
ServiceResult()
{}
DetectImageBodiesResult::DetectImageBodiesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DetectImageBodiesResult::~DetectImageBodiesResult()
{}
void DetectImageBodiesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allBodies = value["Bodies"]["BodiesItem"];
for (auto value : allBodies)
{
BodiesItem bodiesObject;
if(!value["BodyConfidence"].isNull())
bodiesObject.bodyConfidence = std::stof(value["BodyConfidence"].asString());
auto bodyBoundaryNode = value["BodyBoundary"];
if(!bodyBoundaryNode["Left"].isNull())
bodiesObject.bodyBoundary.left = std::stoi(bodyBoundaryNode["Left"].asString());
if(!bodyBoundaryNode["Top"].isNull())
bodiesObject.bodyBoundary.top = std::stoi(bodyBoundaryNode["Top"].asString());
if(!bodyBoundaryNode["Width"].isNull())
bodiesObject.bodyBoundary.width = std::stoi(bodyBoundaryNode["Width"].asString());
if(!bodyBoundaryNode["Height"].isNull())
bodiesObject.bodyBoundary.height = std::stoi(bodyBoundaryNode["Height"].asString());
bodies_.push_back(bodiesObject);
}
if(!value["ImageUri"].isNull())
imageUri_ = value["ImageUri"].asString();
}
std::vector<DetectImageBodiesResult::BodiesItem> DetectImageBodiesResult::getBodies()const
{
return bodies_;
}
std::string DetectImageBodiesResult::getImageUri()const
{
return imageUri_;
}