Multimedia poc modified.

This commit is contained in:
sdk-team
2020-04-19 18:02:55 +08:00
parent f51d79f1b9
commit 112b1d25da
62 changed files with 4084 additions and 1 deletions

View File

@@ -0,0 +1,557 @@
/*
* 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/multimediaai/MultimediaaiClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::Multimediaai;
using namespace AlibabaCloud::Multimediaai::Model;
namespace
{
const std::string SERVICE_NAME = "multimediaai";
}
MultimediaaiClient::MultimediaaiClient(const Credentials &credentials, const ClientConfiguration &configuration) :
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, "");
}
MultimediaaiClient::MultimediaaiClient(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, "");
}
MultimediaaiClient::MultimediaaiClient(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, "");
}
MultimediaaiClient::~MultimediaaiClient()
{}
MultimediaaiClient::CreateCoverTaskOutcome MultimediaaiClient::createCoverTask(const CreateCoverTaskRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateCoverTaskOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateCoverTaskOutcome(CreateCoverTaskResult(outcome.result()));
else
return CreateCoverTaskOutcome(outcome.error());
}
void MultimediaaiClient::createCoverTaskAsync(const CreateCoverTaskRequest& request, const CreateCoverTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createCoverTask(request), context);
};
asyncExecute(new Runnable(fn));
}
MultimediaaiClient::CreateCoverTaskOutcomeCallable MultimediaaiClient::createCoverTaskCallable(const CreateCoverTaskRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateCoverTaskOutcome()>>(
[this, request]()
{
return this->createCoverTask(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MultimediaaiClient::CreateFaceGroupOutcome MultimediaaiClient::createFaceGroup(const CreateFaceGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateFaceGroupOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateFaceGroupOutcome(CreateFaceGroupResult(outcome.result()));
else
return CreateFaceGroupOutcome(outcome.error());
}
void MultimediaaiClient::createFaceGroupAsync(const CreateFaceGroupRequest& request, const CreateFaceGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createFaceGroup(request), context);
};
asyncExecute(new Runnable(fn));
}
MultimediaaiClient::CreateFaceGroupOutcomeCallable MultimediaaiClient::createFaceGroupCallable(const CreateFaceGroupRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateFaceGroupOutcome()>>(
[this, request]()
{
return this->createFaceGroup(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MultimediaaiClient::CreateFacePersonOutcome MultimediaaiClient::createFacePerson(const CreateFacePersonRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateFacePersonOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateFacePersonOutcome(CreateFacePersonResult(outcome.result()));
else
return CreateFacePersonOutcome(outcome.error());
}
void MultimediaaiClient::createFacePersonAsync(const CreateFacePersonRequest& request, const CreateFacePersonAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createFacePerson(request), context);
};
asyncExecute(new Runnable(fn));
}
MultimediaaiClient::CreateFacePersonOutcomeCallable MultimediaaiClient::createFacePersonCallable(const CreateFacePersonRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateFacePersonOutcome()>>(
[this, request]()
{
return this->createFacePerson(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MultimediaaiClient::CreateGifTaskOutcome MultimediaaiClient::createGifTask(const CreateGifTaskRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateGifTaskOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateGifTaskOutcome(CreateGifTaskResult(outcome.result()));
else
return CreateGifTaskOutcome(outcome.error());
}
void MultimediaaiClient::createGifTaskAsync(const CreateGifTaskRequest& request, const CreateGifTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createGifTask(request), context);
};
asyncExecute(new Runnable(fn));
}
MultimediaaiClient::CreateGifTaskOutcomeCallable MultimediaaiClient::createGifTaskCallable(const CreateGifTaskRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateGifTaskOutcome()>>(
[this, request]()
{
return this->createGifTask(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MultimediaaiClient::CreateLabelTaskOutcome MultimediaaiClient::createLabelTask(const CreateLabelTaskRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateLabelTaskOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateLabelTaskOutcome(CreateLabelTaskResult(outcome.result()));
else
return CreateLabelTaskOutcome(outcome.error());
}
void MultimediaaiClient::createLabelTaskAsync(const CreateLabelTaskRequest& request, const CreateLabelTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createLabelTask(request), context);
};
asyncExecute(new Runnable(fn));
}
MultimediaaiClient::CreateLabelTaskOutcomeCallable MultimediaaiClient::createLabelTaskCallable(const CreateLabelTaskRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateLabelTaskOutcome()>>(
[this, request]()
{
return this->createLabelTask(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MultimediaaiClient::DeleteFaceGroupOutcome MultimediaaiClient::deleteFaceGroup(const DeleteFaceGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteFaceGroupOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteFaceGroupOutcome(DeleteFaceGroupResult(outcome.result()));
else
return DeleteFaceGroupOutcome(outcome.error());
}
void MultimediaaiClient::deleteFaceGroupAsync(const DeleteFaceGroupRequest& request, const DeleteFaceGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteFaceGroup(request), context);
};
asyncExecute(new Runnable(fn));
}
MultimediaaiClient::DeleteFaceGroupOutcomeCallable MultimediaaiClient::deleteFaceGroupCallable(const DeleteFaceGroupRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteFaceGroupOutcome()>>(
[this, request]()
{
return this->deleteFaceGroup(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MultimediaaiClient::DeleteFaceImageOutcome MultimediaaiClient::deleteFaceImage(const DeleteFaceImageRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteFaceImageOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteFaceImageOutcome(DeleteFaceImageResult(outcome.result()));
else
return DeleteFaceImageOutcome(outcome.error());
}
void MultimediaaiClient::deleteFaceImageAsync(const DeleteFaceImageRequest& request, const DeleteFaceImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteFaceImage(request), context);
};
asyncExecute(new Runnable(fn));
}
MultimediaaiClient::DeleteFaceImageOutcomeCallable MultimediaaiClient::deleteFaceImageCallable(const DeleteFaceImageRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteFaceImageOutcome()>>(
[this, request]()
{
return this->deleteFaceImage(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MultimediaaiClient::DeleteFacePersonOutcome MultimediaaiClient::deleteFacePerson(const DeleteFacePersonRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteFacePersonOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteFacePersonOutcome(DeleteFacePersonResult(outcome.result()));
else
return DeleteFacePersonOutcome(outcome.error());
}
void MultimediaaiClient::deleteFacePersonAsync(const DeleteFacePersonRequest& request, const DeleteFacePersonAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteFacePerson(request), context);
};
asyncExecute(new Runnable(fn));
}
MultimediaaiClient::DeleteFacePersonOutcomeCallable MultimediaaiClient::deleteFacePersonCallable(const DeleteFacePersonRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteFacePersonOutcome()>>(
[this, request]()
{
return this->deleteFacePerson(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MultimediaaiClient::GetTaskResultOutcome MultimediaaiClient::getTaskResult(const GetTaskResultRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetTaskResultOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetTaskResultOutcome(GetTaskResultResult(outcome.result()));
else
return GetTaskResultOutcome(outcome.error());
}
void MultimediaaiClient::getTaskResultAsync(const GetTaskResultRequest& request, const GetTaskResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getTaskResult(request), context);
};
asyncExecute(new Runnable(fn));
}
MultimediaaiClient::GetTaskResultOutcomeCallable MultimediaaiClient::getTaskResultCallable(const GetTaskResultRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetTaskResultOutcome()>>(
[this, request]()
{
return this->getTaskResult(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MultimediaaiClient::GetTaskStatusOutcome MultimediaaiClient::getTaskStatus(const GetTaskStatusRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetTaskStatusOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetTaskStatusOutcome(GetTaskStatusResult(outcome.result()));
else
return GetTaskStatusOutcome(outcome.error());
}
void MultimediaaiClient::getTaskStatusAsync(const GetTaskStatusRequest& request, const GetTaskStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getTaskStatus(request), context);
};
asyncExecute(new Runnable(fn));
}
MultimediaaiClient::GetTaskStatusOutcomeCallable MultimediaaiClient::getTaskStatusCallable(const GetTaskStatusRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetTaskStatusOutcome()>>(
[this, request]()
{
return this->getTaskStatus(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MultimediaaiClient::ListFaceGroupsOutcome MultimediaaiClient::listFaceGroups(const ListFaceGroupsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListFaceGroupsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListFaceGroupsOutcome(ListFaceGroupsResult(outcome.result()));
else
return ListFaceGroupsOutcome(outcome.error());
}
void MultimediaaiClient::listFaceGroupsAsync(const ListFaceGroupsRequest& request, const ListFaceGroupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listFaceGroups(request), context);
};
asyncExecute(new Runnable(fn));
}
MultimediaaiClient::ListFaceGroupsOutcomeCallable MultimediaaiClient::listFaceGroupsCallable(const ListFaceGroupsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListFaceGroupsOutcome()>>(
[this, request]()
{
return this->listFaceGroups(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MultimediaaiClient::ListFaceImagesOutcome MultimediaaiClient::listFaceImages(const ListFaceImagesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListFaceImagesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListFaceImagesOutcome(ListFaceImagesResult(outcome.result()));
else
return ListFaceImagesOutcome(outcome.error());
}
void MultimediaaiClient::listFaceImagesAsync(const ListFaceImagesRequest& request, const ListFaceImagesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listFaceImages(request), context);
};
asyncExecute(new Runnable(fn));
}
MultimediaaiClient::ListFaceImagesOutcomeCallable MultimediaaiClient::listFaceImagesCallable(const ListFaceImagesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListFaceImagesOutcome()>>(
[this, request]()
{
return this->listFaceImages(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MultimediaaiClient::ListFacePersonsOutcome MultimediaaiClient::listFacePersons(const ListFacePersonsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListFacePersonsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListFacePersonsOutcome(ListFacePersonsResult(outcome.result()));
else
return ListFacePersonsOutcome(outcome.error());
}
void MultimediaaiClient::listFacePersonsAsync(const ListFacePersonsRequest& request, const ListFacePersonsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listFacePersons(request), context);
};
asyncExecute(new Runnable(fn));
}
MultimediaaiClient::ListFacePersonsOutcomeCallable MultimediaaiClient::listFacePersonsCallable(const ListFacePersonsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListFacePersonsOutcome()>>(
[this, request]()
{
return this->listFacePersons(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MultimediaaiClient::RegisterFaceImageOutcome MultimediaaiClient::registerFaceImage(const RegisterFaceImageRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return RegisterFaceImageOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return RegisterFaceImageOutcome(RegisterFaceImageResult(outcome.result()));
else
return RegisterFaceImageOutcome(outcome.error());
}
void MultimediaaiClient::registerFaceImageAsync(const RegisterFaceImageRequest& request, const RegisterFaceImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, registerFaceImage(request), context);
};
asyncExecute(new Runnable(fn));
}
MultimediaaiClient::RegisterFaceImageOutcomeCallable MultimediaaiClient::registerFaceImageCallable(const RegisterFaceImageRequest &request) const
{
auto task = std::make_shared<std::packaged_task<RegisterFaceImageOutcome()>>(
[this, request]()
{
return this->registerFaceImage(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,84 @@
/*
* 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/multimediaai/model/CreateCoverTaskRequest.h>
using AlibabaCloud::Multimediaai::Model::CreateCoverTaskRequest;
CreateCoverTaskRequest::CreateCoverTaskRequest() :
RpcServiceRequest("multimediaai", "2019-08-10", "CreateCoverTask")
{
setMethod(HttpRequest::Method::Post);
}
CreateCoverTaskRequest::~CreateCoverTaskRequest()
{}
long CreateCoverTaskRequest::getTemplateId()const
{
return templateId_;
}
void CreateCoverTaskRequest::setTemplateId(long templateId)
{
templateId_ = templateId;
setParameter("TemplateId", std::to_string(templateId));
}
std::string CreateCoverTaskRequest::getVideoUrl()const
{
return videoUrl_;
}
void CreateCoverTaskRequest::setVideoUrl(const std::string& videoUrl)
{
videoUrl_ = videoUrl;
setParameter("VideoUrl", videoUrl);
}
std::string CreateCoverTaskRequest::getVideoName()const
{
return videoName_;
}
void CreateCoverTaskRequest::setVideoName(const std::string& videoName)
{
videoName_ = videoName;
setParameter("VideoName", videoName);
}
std::string CreateCoverTaskRequest::getCallbackUrl()const
{
return callbackUrl_;
}
void CreateCoverTaskRequest::setCallbackUrl(const std::string& callbackUrl)
{
callbackUrl_ = callbackUrl;
setParameter("CallbackUrl", callbackUrl);
}
std::string CreateCoverTaskRequest::getApplicationId()const
{
return applicationId_;
}
void CreateCoverTaskRequest::setApplicationId(const std::string& applicationId)
{
applicationId_ = applicationId;
setParameter("ApplicationId", applicationId);
}

View File

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

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/multimediaai/model/CreateFaceGroupRequest.h>
using AlibabaCloud::Multimediaai::Model::CreateFaceGroupRequest;
CreateFaceGroupRequest::CreateFaceGroupRequest() :
RpcServiceRequest("multimediaai", "2019-08-10", "CreateFaceGroup")
{
setMethod(HttpRequest::Method::Post);
}
CreateFaceGroupRequest::~CreateFaceGroupRequest()
{}
std::string CreateFaceGroupRequest::getDescription()const
{
return description_;
}
void CreateFaceGroupRequest::setDescription(const std::string& description)
{
description_ = description;
setParameter("Description", description);
}
std::string CreateFaceGroupRequest::getFaceGroupName()const
{
return faceGroupName_;
}
void CreateFaceGroupRequest::setFaceGroupName(const std::string& faceGroupName)
{
faceGroupName_ = faceGroupName;
setParameter("FaceGroupName", faceGroupName);
}

View File

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

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/multimediaai/model/CreateFacePersonRequest.h>
using AlibabaCloud::Multimediaai::Model::CreateFacePersonRequest;
CreateFacePersonRequest::CreateFacePersonRequest() :
RpcServiceRequest("multimediaai", "2019-08-10", "CreateFacePerson")
{
setMethod(HttpRequest::Method::Post);
}
CreateFacePersonRequest::~CreateFacePersonRequest()
{}
long CreateFacePersonRequest::getFaceGroupId()const
{
return faceGroupId_;
}
void CreateFacePersonRequest::setFaceGroupId(long faceGroupId)
{
faceGroupId_ = faceGroupId;
setParameter("FaceGroupId", std::to_string(faceGroupId));
}
std::string CreateFacePersonRequest::getImageUrls()const
{
return imageUrls_;
}
void CreateFacePersonRequest::setImageUrls(const std::string& imageUrls)
{
imageUrls_ = imageUrls;
setParameter("ImageUrls", imageUrls);
}
std::string CreateFacePersonRequest::getFacePersonName()const
{
return facePersonName_;
}
void CreateFacePersonRequest::setFacePersonName(const std::string& facePersonName)
{
facePersonName_ = facePersonName;
setParameter("FacePersonName", facePersonName);
}

View File

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

View File

@@ -0,0 +1,84 @@
/*
* 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/multimediaai/model/CreateGifTaskRequest.h>
using AlibabaCloud::Multimediaai::Model::CreateGifTaskRequest;
CreateGifTaskRequest::CreateGifTaskRequest() :
RpcServiceRequest("multimediaai", "2019-08-10", "CreateGifTask")
{
setMethod(HttpRequest::Method::Post);
}
CreateGifTaskRequest::~CreateGifTaskRequest()
{}
long CreateGifTaskRequest::getTemplateId()const
{
return templateId_;
}
void CreateGifTaskRequest::setTemplateId(long templateId)
{
templateId_ = templateId;
setParameter("TemplateId", std::to_string(templateId));
}
std::string CreateGifTaskRequest::getVideoUrl()const
{
return videoUrl_;
}
void CreateGifTaskRequest::setVideoUrl(const std::string& videoUrl)
{
videoUrl_ = videoUrl;
setParameter("VideoUrl", videoUrl);
}
std::string CreateGifTaskRequest::getVideoName()const
{
return videoName_;
}
void CreateGifTaskRequest::setVideoName(const std::string& videoName)
{
videoName_ = videoName;
setParameter("VideoName", videoName);
}
std::string CreateGifTaskRequest::getCallbackUrl()const
{
return callbackUrl_;
}
void CreateGifTaskRequest::setCallbackUrl(const std::string& callbackUrl)
{
callbackUrl_ = callbackUrl;
setParameter("CallbackUrl", callbackUrl);
}
std::string CreateGifTaskRequest::getApplicationId()const
{
return applicationId_;
}
void CreateGifTaskRequest::setApplicationId(const std::string& applicationId)
{
applicationId_ = applicationId;
setParameter("ApplicationId", applicationId);
}

View File

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

View File

@@ -0,0 +1,84 @@
/*
* 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/multimediaai/model/CreateLabelTaskRequest.h>
using AlibabaCloud::Multimediaai::Model::CreateLabelTaskRequest;
CreateLabelTaskRequest::CreateLabelTaskRequest() :
RpcServiceRequest("multimediaai", "2019-08-10", "CreateLabelTask")
{
setMethod(HttpRequest::Method::Post);
}
CreateLabelTaskRequest::~CreateLabelTaskRequest()
{}
long CreateLabelTaskRequest::getTemplateId()const
{
return templateId_;
}
void CreateLabelTaskRequest::setTemplateId(long templateId)
{
templateId_ = templateId;
setParameter("TemplateId", std::to_string(templateId));
}
std::string CreateLabelTaskRequest::getVideoUrl()const
{
return videoUrl_;
}
void CreateLabelTaskRequest::setVideoUrl(const std::string& videoUrl)
{
videoUrl_ = videoUrl;
setParameter("VideoUrl", videoUrl);
}
std::string CreateLabelTaskRequest::getVideoName()const
{
return videoName_;
}
void CreateLabelTaskRequest::setVideoName(const std::string& videoName)
{
videoName_ = videoName;
setParameter("VideoName", videoName);
}
std::string CreateLabelTaskRequest::getCallbackUrl()const
{
return callbackUrl_;
}
void CreateLabelTaskRequest::setCallbackUrl(const std::string& callbackUrl)
{
callbackUrl_ = callbackUrl;
setParameter("CallbackUrl", callbackUrl);
}
std::string CreateLabelTaskRequest::getApplicationId()const
{
return applicationId_;
}
void CreateLabelTaskRequest::setApplicationId(const std::string& applicationId)
{
applicationId_ = applicationId;
setParameter("ApplicationId", applicationId);
}

View File

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

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/multimediaai/model/DeleteFaceGroupRequest.h>
using AlibabaCloud::Multimediaai::Model::DeleteFaceGroupRequest;
DeleteFaceGroupRequest::DeleteFaceGroupRequest() :
RpcServiceRequest("multimediaai", "2019-08-10", "DeleteFaceGroup")
{
setMethod(HttpRequest::Method::Post);
}
DeleteFaceGroupRequest::~DeleteFaceGroupRequest()
{}
long DeleteFaceGroupRequest::getFaceGroupId()const
{
return faceGroupId_;
}
void DeleteFaceGroupRequest::setFaceGroupId(long faceGroupId)
{
faceGroupId_ = faceGroupId;
setParameter("FaceGroupId", std::to_string(faceGroupId));
}

View File

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

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/multimediaai/model/DeleteFaceImageRequest.h>
using AlibabaCloud::Multimediaai::Model::DeleteFaceImageRequest;
DeleteFaceImageRequest::DeleteFaceImageRequest() :
RpcServiceRequest("multimediaai", "2019-08-10", "DeleteFaceImage")
{
setMethod(HttpRequest::Method::Post);
}
DeleteFaceImageRequest::~DeleteFaceImageRequest()
{}
long DeleteFaceImageRequest::getFaceGroupId()const
{
return faceGroupId_;
}
void DeleteFaceImageRequest::setFaceGroupId(long faceGroupId)
{
faceGroupId_ = faceGroupId;
setParameter("FaceGroupId", std::to_string(faceGroupId));
}
long DeleteFaceImageRequest::getFacePersonId()const
{
return facePersonId_;
}
void DeleteFaceImageRequest::setFacePersonId(long facePersonId)
{
facePersonId_ = facePersonId;
setParameter("FacePersonId", std::to_string(facePersonId));
}
long DeleteFaceImageRequest::getFaceImageId()const
{
return faceImageId_;
}
void DeleteFaceImageRequest::setFaceImageId(long faceImageId)
{
faceImageId_ = faceImageId;
setParameter("FaceImageId", std::to_string(faceImageId));
}

View File

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

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/multimediaai/model/DeleteFacePersonRequest.h>
using AlibabaCloud::Multimediaai::Model::DeleteFacePersonRequest;
DeleteFacePersonRequest::DeleteFacePersonRequest() :
RpcServiceRequest("multimediaai", "2019-08-10", "DeleteFacePerson")
{
setMethod(HttpRequest::Method::Post);
}
DeleteFacePersonRequest::~DeleteFacePersonRequest()
{}
long DeleteFacePersonRequest::getFaceGroupId()const
{
return faceGroupId_;
}
void DeleteFacePersonRequest::setFaceGroupId(long faceGroupId)
{
faceGroupId_ = faceGroupId;
setParameter("FaceGroupId", std::to_string(faceGroupId));
}
long DeleteFacePersonRequest::getFacePersonId()const
{
return facePersonId_;
}
void DeleteFacePersonRequest::setFacePersonId(long facePersonId)
{
facePersonId_ = facePersonId;
setParameter("FacePersonId", std::to_string(facePersonId));
}

View File

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

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/multimediaai/model/GetTaskResultRequest.h>
using AlibabaCloud::Multimediaai::Model::GetTaskResultRequest;
GetTaskResultRequest::GetTaskResultRequest() :
RpcServiceRequest("multimediaai", "2019-08-10", "GetTaskResult")
{
setMethod(HttpRequest::Method::Post);
}
GetTaskResultRequest::~GetTaskResultRequest()
{}
long GetTaskResultRequest::getTaskId()const
{
return taskId_;
}
void GetTaskResultRequest::setTaskId(long taskId)
{
taskId_ = taskId;
setParameter("TaskId", std::to_string(taskId));
}

View File

@@ -0,0 +1,75 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/multimediaai/model/GetTaskResultResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Multimediaai;
using namespace AlibabaCloud::Multimediaai::Model;
GetTaskResultResult::GetTaskResultResult() :
ServiceResult()
{}
GetTaskResultResult::GetTaskResultResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetTaskResultResult::~GetTaskResultResult()
{}
void GetTaskResultResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["ApplicationId"].isNull())
result_.applicationId = resultNode["ApplicationId"].asString();
if(!resultNode["VideoName"].isNull())
result_.videoName = resultNode["VideoName"].asString();
if(!resultNode["ProcessResultUrl"].isNull())
result_.processResultUrl = resultNode["ProcessResultUrl"].asString();
if(!resultNode["AnalysisUseTime"].isNull())
result_.analysisUseTime = std::stol(resultNode["AnalysisUseTime"].asString());
if(!resultNode["VideoUrl"].isNull())
result_.videoUrl = resultNode["VideoUrl"].asString();
if(!resultNode["ErrorName"].isNull())
result_.errorName = resultNode["ErrorName"].asString();
if(!resultNode["ErrorReason"].isNull())
result_.errorReason = resultNode["ErrorReason"].asString();
if(!resultNode["ErrorCode"].isNull())
result_.errorCode = resultNode["ErrorCode"].asString();
if(!resultNode["ErrorMessage"].isNull())
result_.errorMessage = resultNode["ErrorMessage"].asString();
if(!value["Status"].isNull())
status_ = std::stoi(value["Status"].asString());
}
int GetTaskResultResult::getStatus()const
{
return status_;
}
GetTaskResultResult::Result GetTaskResultResult::getResult()const
{
return result_;
}

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/multimediaai/model/GetTaskStatusRequest.h>
using AlibabaCloud::Multimediaai::Model::GetTaskStatusRequest;
GetTaskStatusRequest::GetTaskStatusRequest() :
RpcServiceRequest("multimediaai", "2019-08-10", "GetTaskStatus")
{
setMethod(HttpRequest::Method::Post);
}
GetTaskStatusRequest::~GetTaskStatusRequest()
{}
long GetTaskStatusRequest::getTaskId()const
{
return taskId_;
}
void GetTaskStatusRequest::setTaskId(long taskId)
{
taskId_ = taskId;
setParameter("TaskId", std::to_string(taskId));
}

View File

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

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/multimediaai/model/ListFaceGroupsRequest.h>
using AlibabaCloud::Multimediaai::Model::ListFaceGroupsRequest;
ListFaceGroupsRequest::ListFaceGroupsRequest() :
RpcServiceRequest("multimediaai", "2019-08-10", "ListFaceGroups")
{
setMethod(HttpRequest::Method::Post);
}
ListFaceGroupsRequest::~ListFaceGroupsRequest()
{}
int ListFaceGroupsRequest::getPageNumber()const
{
return pageNumber_;
}
void ListFaceGroupsRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}
int ListFaceGroupsRequest::getPageSize()const
{
return pageSize_;
}
void ListFaceGroupsRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}

View File

@@ -0,0 +1,96 @@
/*
* 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/multimediaai/model/ListFaceGroupsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Multimediaai;
using namespace AlibabaCloud::Multimediaai::Model;
ListFaceGroupsResult::ListFaceGroupsResult() :
ServiceResult()
{}
ListFaceGroupsResult::ListFaceGroupsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListFaceGroupsResult::~ListFaceGroupsResult()
{}
void ListFaceGroupsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allFaceGroupsNode = value["FaceGroups"]["FaceGroup"];
for (auto valueFaceGroupsFaceGroup : allFaceGroupsNode)
{
FaceGroup faceGroupsObject;
if(!valueFaceGroupsFaceGroup["FaceGroupId"].isNull())
faceGroupsObject.faceGroupId = std::stol(valueFaceGroupsFaceGroup["FaceGroupId"].asString());
if(!valueFaceGroupsFaceGroup["FaceGroupName"].isNull())
faceGroupsObject.faceGroupName = valueFaceGroupsFaceGroup["FaceGroupName"].asString();
if(!valueFaceGroupsFaceGroup["Description"].isNull())
faceGroupsObject.description = valueFaceGroupsFaceGroup["Description"].asString();
if(!valueFaceGroupsFaceGroup["PersonCount"].isNull())
faceGroupsObject.personCount = std::stol(valueFaceGroupsFaceGroup["PersonCount"].asString());
if(!valueFaceGroupsFaceGroup["ImageCount"].isNull())
faceGroupsObject.imageCount = std::stol(valueFaceGroupsFaceGroup["ImageCount"].asString());
auto allTemplatesNode = allFaceGroupsNode["Templates"]["TemplatesItem"];
for (auto allFaceGroupsNodeTemplatesTemplatesItem : allTemplatesNode)
{
FaceGroup::TemplatesItem templatesObject;
if(!allFaceGroupsNodeTemplatesTemplatesItem["Id"].isNull())
templatesObject.id = allFaceGroupsNodeTemplatesTemplatesItem["Id"].asString();
if(!allFaceGroupsNodeTemplatesTemplatesItem["Name"].isNull())
templatesObject.name = allFaceGroupsNodeTemplatesTemplatesItem["Name"].asString();
faceGroupsObject.templates.push_back(templatesObject);
}
faceGroups_.push_back(faceGroupsObject);
}
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["TotalCount"].isNull())
totalCount_ = std::stol(value["TotalCount"].asString());
}
long ListFaceGroupsResult::getTotalCount()const
{
return totalCount_;
}
int ListFaceGroupsResult::getPageSize()const
{
return pageSize_;
}
int ListFaceGroupsResult::getPageNumber()const
{
return pageNumber_;
}
std::vector<ListFaceGroupsResult::FaceGroup> ListFaceGroupsResult::getFaceGroups()const
{
return faceGroups_;
}

View 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/multimediaai/model/ListFaceImagesRequest.h>
using AlibabaCloud::Multimediaai::Model::ListFaceImagesRequest;
ListFaceImagesRequest::ListFaceImagesRequest() :
RpcServiceRequest("multimediaai", "2019-08-10", "ListFaceImages")
{
setMethod(HttpRequest::Method::Post);
}
ListFaceImagesRequest::~ListFaceImagesRequest()
{}
long ListFaceImagesRequest::getFaceGroupId()const
{
return faceGroupId_;
}
void ListFaceImagesRequest::setFaceGroupId(long faceGroupId)
{
faceGroupId_ = faceGroupId;
setParameter("FaceGroupId", std::to_string(faceGroupId));
}
long ListFaceImagesRequest::getFacePersonId()const
{
return facePersonId_;
}
void ListFaceImagesRequest::setFacePersonId(long facePersonId)
{
facePersonId_ = facePersonId;
setParameter("FacePersonId", std::to_string(facePersonId));
}
int ListFaceImagesRequest::getPageNumber()const
{
return pageNumber_;
}
void ListFaceImagesRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}
int ListFaceImagesRequest::getPageSize()const
{
return pageSize_;
}
void ListFaceImagesRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}

View File

@@ -0,0 +1,83 @@
/*
* 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/multimediaai/model/ListFaceImagesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Multimediaai;
using namespace AlibabaCloud::Multimediaai::Model;
ListFaceImagesResult::ListFaceImagesResult() :
ServiceResult()
{}
ListFaceImagesResult::ListFaceImagesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListFaceImagesResult::~ListFaceImagesResult()
{}
void ListFaceImagesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allFaceImagesNode = value["FaceImages"]["FaceImage"];
for (auto valueFaceImagesFaceImage : allFaceImagesNode)
{
FaceImage faceImagesObject;
if(!valueFaceImagesFaceImage["FaceImageId"].isNull())
faceImagesObject.faceImageId = std::stol(valueFaceImagesFaceImage["FaceImageId"].asString());
if(!valueFaceImagesFaceImage["ImageUrl"].isNull())
faceImagesObject.imageUrl = valueFaceImagesFaceImage["ImageUrl"].asString();
auto allFaceRectangle = value["FaceRectangle"]["FaceRectangle"];
for (auto value : allFaceRectangle)
faceImagesObject.faceRectangle.push_back(value.asString());
faceImages_.push_back(faceImagesObject);
}
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["TotalCount"].isNull())
totalCount_ = std::stol(value["TotalCount"].asString());
}
long ListFaceImagesResult::getTotalCount()const
{
return totalCount_;
}
int ListFaceImagesResult::getPageSize()const
{
return pageSize_;
}
int ListFaceImagesResult::getPageNumber()const
{
return pageNumber_;
}
std::vector<ListFaceImagesResult::FaceImage> ListFaceImagesResult::getFaceImages()const
{
return faceImages_;
}

View 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/multimediaai/model/ListFacePersonsRequest.h>
using AlibabaCloud::Multimediaai::Model::ListFacePersonsRequest;
ListFacePersonsRequest::ListFacePersonsRequest() :
RpcServiceRequest("multimediaai", "2019-08-10", "ListFacePersons")
{
setMethod(HttpRequest::Method::Post);
}
ListFacePersonsRequest::~ListFacePersonsRequest()
{}
long ListFacePersonsRequest::getFaceGroupId()const
{
return faceGroupId_;
}
void ListFacePersonsRequest::setFaceGroupId(long faceGroupId)
{
faceGroupId_ = faceGroupId;
setParameter("FaceGroupId", std::to_string(faceGroupId));
}
std::string ListFacePersonsRequest::getFacePersonName()const
{
return facePersonName_;
}
void ListFacePersonsRequest::setFacePersonName(const std::string& facePersonName)
{
facePersonName_ = facePersonName;
setParameter("FacePersonName", facePersonName);
}
int ListFacePersonsRequest::getPageNumber()const
{
return pageNumber_;
}
void ListFacePersonsRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}
int ListFacePersonsRequest::getPageSize()const
{
return pageSize_;
}
void ListFacePersonsRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}

View File

@@ -0,0 +1,84 @@
/*
* 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/multimediaai/model/ListFacePersonsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Multimediaai;
using namespace AlibabaCloud::Multimediaai::Model;
ListFacePersonsResult::ListFacePersonsResult() :
ServiceResult()
{}
ListFacePersonsResult::ListFacePersonsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListFacePersonsResult::~ListFacePersonsResult()
{}
void ListFacePersonsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allFacePersonsNode = value["FacePersons"]["FacePerson"];
for (auto valueFacePersonsFacePerson : allFacePersonsNode)
{
FacePerson facePersonsObject;
if(!valueFacePersonsFacePerson["FacePersonId"].isNull())
facePersonsObject.facePersonId = std::stol(valueFacePersonsFacePerson["FacePersonId"].asString());
if(!valueFacePersonsFacePerson["FacePersonName"].isNull())
facePersonsObject.facePersonName = valueFacePersonsFacePerson["FacePersonName"].asString();
if(!valueFacePersonsFacePerson["ImageUrl"].isNull())
facePersonsObject.imageUrl = valueFacePersonsFacePerson["ImageUrl"].asString();
if(!valueFacePersonsFacePerson["ImageCount"].isNull())
facePersonsObject.imageCount = std::stol(valueFacePersonsFacePerson["ImageCount"].asString());
facePersons_.push_back(facePersonsObject);
}
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
if(!value["TotalCount"].isNull())
totalCount_ = std::stol(value["TotalCount"].asString());
}
long ListFacePersonsResult::getTotalCount()const
{
return totalCount_;
}
std::vector<ListFacePersonsResult::FacePerson> ListFacePersonsResult::getFacePersons()const
{
return facePersons_;
}
int ListFacePersonsResult::getPageSize()const
{
return pageSize_;
}
int ListFacePersonsResult::getPageNumber()const
{
return pageNumber_;
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/multimediaai/model/RegisterFaceImageRequest.h>
using AlibabaCloud::Multimediaai::Model::RegisterFaceImageRequest;
RegisterFaceImageRequest::RegisterFaceImageRequest() :
RpcServiceRequest("multimediaai", "2019-08-10", "RegisterFaceImage")
{
setMethod(HttpRequest::Method::Post);
}
RegisterFaceImageRequest::~RegisterFaceImageRequest()
{}
long RegisterFaceImageRequest::getFaceGroupId()const
{
return faceGroupId_;
}
void RegisterFaceImageRequest::setFaceGroupId(long faceGroupId)
{
faceGroupId_ = faceGroupId;
setParameter("FaceGroupId", std::to_string(faceGroupId));
}
long RegisterFaceImageRequest::getFacePersonId()const
{
return facePersonId_;
}
void RegisterFaceImageRequest::setFacePersonId(long facePersonId)
{
facePersonId_ = facePersonId;
setParameter("FacePersonId", std::to_string(facePersonId));
}
std::string RegisterFaceImageRequest::getImageUrl()const
{
return imageUrl_;
}
void RegisterFaceImageRequest::setImageUrl(const std::string& imageUrl)
{
imageUrl_ = imageUrl;
setParameter("ImageUrl", imageUrl);
}

View File

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