Compare commits
12 Commits
openanalyt
...
imageaudit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d9dc66719 | ||
|
|
97fa00faef | ||
|
|
630656ce24 | ||
|
|
f3b00eade0 | ||
|
|
02122aa7ea | ||
|
|
67d6a5f9d4 | ||
|
|
a15a171b2d | ||
|
|
9d980b6731 | ||
|
|
d6aeb545bc | ||
|
|
6217773578 | ||
|
|
cb2d0e9b5d | ||
|
|
2ee11b248a |
38
CHANGELOG
38
CHANGELOG
@@ -1,3 +1,41 @@
|
|||||||
|
2020-11-13 Version: patch
|
||||||
|
- Update Imageaudit.
|
||||||
|
|
||||||
|
2020-11-13 Version: patch
|
||||||
|
- Add DeccribeEngineVersion DescribeTasks DescribeInstanceConfig and more APIs.
|
||||||
|
|
||||||
|
2020-11-13 Version: patch
|
||||||
|
- Fix GetBranchInfo and DeleteBranch API 404 error.
|
||||||
|
- Add ListRepositoryBranches and GetGroupDetail API.
|
||||||
|
|
||||||
|
2020-11-13 Version: patch
|
||||||
|
- Release ErasePerson.
|
||||||
|
|
||||||
|
2020-11-13 Version: patch
|
||||||
|
- Release DetectCardScreenshot RecognizePoiName.
|
||||||
|
|
||||||
|
2020-11-13 Version: patch
|
||||||
|
- Release GenerateHumanAnimeStyle CountCrowd.
|
||||||
|
|
||||||
|
2020-11-13 Version: patch
|
||||||
|
- Release SegmentHDSky SegmentHDCommonImage.
|
||||||
|
|
||||||
|
2020-11-12 Version: patch
|
||||||
|
- Support drm.
|
||||||
|
|
||||||
|
2020-11-12 Version: patch
|
||||||
|
- Generated 2019-06-01 for `smc`.
|
||||||
|
|
||||||
|
2020-11-12 Version: patch
|
||||||
|
- Update new version.
|
||||||
|
|
||||||
|
2020-11-12 Version: patch
|
||||||
|
- Support DescribeDBClusterTDE.
|
||||||
|
- Support ModifyDBClusterTDE.
|
||||||
|
|
||||||
|
2020-11-12 Version: patch
|
||||||
|
- Supported Open Api.
|
||||||
|
|
||||||
2020-11-12 Version: patch
|
2020-11-12 Version: patch
|
||||||
- Support OpenAPI.
|
- Support OpenAPI.
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ set(codeup_public_header_model
|
|||||||
include/alibabacloud/codeup/model/GetCodeupOrganizationResult.h
|
include/alibabacloud/codeup/model/GetCodeupOrganizationResult.h
|
||||||
include/alibabacloud/codeup/model/GetFileBlobsRequest.h
|
include/alibabacloud/codeup/model/GetFileBlobsRequest.h
|
||||||
include/alibabacloud/codeup/model/GetFileBlobsResult.h
|
include/alibabacloud/codeup/model/GetFileBlobsResult.h
|
||||||
|
include/alibabacloud/codeup/model/GetGroupDetailRequest.h
|
||||||
|
include/alibabacloud/codeup/model/GetGroupDetailResult.h
|
||||||
include/alibabacloud/codeup/model/GetProjectMemberRequest.h
|
include/alibabacloud/codeup/model/GetProjectMemberRequest.h
|
||||||
include/alibabacloud/codeup/model/GetProjectMemberResult.h
|
include/alibabacloud/codeup/model/GetProjectMemberResult.h
|
||||||
include/alibabacloud/codeup/model/GetRepositoryInfoRequest.h
|
include/alibabacloud/codeup/model/GetRepositoryInfoRequest.h
|
||||||
@@ -67,6 +69,8 @@ set(codeup_public_header_model
|
|||||||
include/alibabacloud/codeup/model/ListGroupRepositoriesResult.h
|
include/alibabacloud/codeup/model/ListGroupRepositoriesResult.h
|
||||||
include/alibabacloud/codeup/model/ListGroupsRequest.h
|
include/alibabacloud/codeup/model/ListGroupsRequest.h
|
||||||
include/alibabacloud/codeup/model/ListGroupsResult.h
|
include/alibabacloud/codeup/model/ListGroupsResult.h
|
||||||
|
include/alibabacloud/codeup/model/ListRepositoryBranchesRequest.h
|
||||||
|
include/alibabacloud/codeup/model/ListRepositoryBranchesResult.h
|
||||||
include/alibabacloud/codeup/model/ListRepositoryMemberRequest.h
|
include/alibabacloud/codeup/model/ListRepositoryMemberRequest.h
|
||||||
include/alibabacloud/codeup/model/ListRepositoryMemberResult.h
|
include/alibabacloud/codeup/model/ListRepositoryMemberResult.h
|
||||||
include/alibabacloud/codeup/model/ListRepositoryTreeRequest.h
|
include/alibabacloud/codeup/model/ListRepositoryTreeRequest.h
|
||||||
@@ -118,6 +122,8 @@ set(codeup_src
|
|||||||
src/model/GetCodeupOrganizationResult.cc
|
src/model/GetCodeupOrganizationResult.cc
|
||||||
src/model/GetFileBlobsRequest.cc
|
src/model/GetFileBlobsRequest.cc
|
||||||
src/model/GetFileBlobsResult.cc
|
src/model/GetFileBlobsResult.cc
|
||||||
|
src/model/GetGroupDetailRequest.cc
|
||||||
|
src/model/GetGroupDetailResult.cc
|
||||||
src/model/GetProjectMemberRequest.cc
|
src/model/GetProjectMemberRequest.cc
|
||||||
src/model/GetProjectMemberResult.cc
|
src/model/GetProjectMemberResult.cc
|
||||||
src/model/GetRepositoryInfoRequest.cc
|
src/model/GetRepositoryInfoRequest.cc
|
||||||
@@ -128,6 +134,8 @@ set(codeup_src
|
|||||||
src/model/ListGroupRepositoriesResult.cc
|
src/model/ListGroupRepositoriesResult.cc
|
||||||
src/model/ListGroupsRequest.cc
|
src/model/ListGroupsRequest.cc
|
||||||
src/model/ListGroupsResult.cc
|
src/model/ListGroupsResult.cc
|
||||||
|
src/model/ListRepositoryBranchesRequest.cc
|
||||||
|
src/model/ListRepositoryBranchesResult.cc
|
||||||
src/model/ListRepositoryMemberRequest.cc
|
src/model/ListRepositoryMemberRequest.cc
|
||||||
src/model/ListRepositoryMemberResult.cc
|
src/model/ListRepositoryMemberResult.cc
|
||||||
src/model/ListRepositoryTreeRequest.cc
|
src/model/ListRepositoryTreeRequest.cc
|
||||||
|
|||||||
@@ -58,6 +58,8 @@
|
|||||||
#include "model/GetCodeupOrganizationResult.h"
|
#include "model/GetCodeupOrganizationResult.h"
|
||||||
#include "model/GetFileBlobsRequest.h"
|
#include "model/GetFileBlobsRequest.h"
|
||||||
#include "model/GetFileBlobsResult.h"
|
#include "model/GetFileBlobsResult.h"
|
||||||
|
#include "model/GetGroupDetailRequest.h"
|
||||||
|
#include "model/GetGroupDetailResult.h"
|
||||||
#include "model/GetProjectMemberRequest.h"
|
#include "model/GetProjectMemberRequest.h"
|
||||||
#include "model/GetProjectMemberResult.h"
|
#include "model/GetProjectMemberResult.h"
|
||||||
#include "model/GetRepositoryInfoRequest.h"
|
#include "model/GetRepositoryInfoRequest.h"
|
||||||
@@ -68,6 +70,8 @@
|
|||||||
#include "model/ListGroupRepositoriesResult.h"
|
#include "model/ListGroupRepositoriesResult.h"
|
||||||
#include "model/ListGroupsRequest.h"
|
#include "model/ListGroupsRequest.h"
|
||||||
#include "model/ListGroupsResult.h"
|
#include "model/ListGroupsResult.h"
|
||||||
|
#include "model/ListRepositoryBranchesRequest.h"
|
||||||
|
#include "model/ListRepositoryBranchesResult.h"
|
||||||
#include "model/ListRepositoryMemberRequest.h"
|
#include "model/ListRepositoryMemberRequest.h"
|
||||||
#include "model/ListRepositoryMemberResult.h"
|
#include "model/ListRepositoryMemberResult.h"
|
||||||
#include "model/ListRepositoryTreeRequest.h"
|
#include "model/ListRepositoryTreeRequest.h"
|
||||||
@@ -143,6 +147,9 @@ namespace AlibabaCloud
|
|||||||
typedef Outcome<Error, Model::GetFileBlobsResult> GetFileBlobsOutcome;
|
typedef Outcome<Error, Model::GetFileBlobsResult> GetFileBlobsOutcome;
|
||||||
typedef std::future<GetFileBlobsOutcome> GetFileBlobsOutcomeCallable;
|
typedef std::future<GetFileBlobsOutcome> GetFileBlobsOutcomeCallable;
|
||||||
typedef std::function<void(const CodeupClient*, const Model::GetFileBlobsRequest&, const GetFileBlobsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetFileBlobsAsyncHandler;
|
typedef std::function<void(const CodeupClient*, const Model::GetFileBlobsRequest&, const GetFileBlobsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetFileBlobsAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::GetGroupDetailResult> GetGroupDetailOutcome;
|
||||||
|
typedef std::future<GetGroupDetailOutcome> GetGroupDetailOutcomeCallable;
|
||||||
|
typedef std::function<void(const CodeupClient*, const Model::GetGroupDetailRequest&, const GetGroupDetailOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetGroupDetailAsyncHandler;
|
||||||
typedef Outcome<Error, Model::GetProjectMemberResult> GetProjectMemberOutcome;
|
typedef Outcome<Error, Model::GetProjectMemberResult> GetProjectMemberOutcome;
|
||||||
typedef std::future<GetProjectMemberOutcome> GetProjectMemberOutcomeCallable;
|
typedef std::future<GetProjectMemberOutcome> GetProjectMemberOutcomeCallable;
|
||||||
typedef std::function<void(const CodeupClient*, const Model::GetProjectMemberRequest&, const GetProjectMemberOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetProjectMemberAsyncHandler;
|
typedef std::function<void(const CodeupClient*, const Model::GetProjectMemberRequest&, const GetProjectMemberOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetProjectMemberAsyncHandler;
|
||||||
@@ -158,6 +165,9 @@ namespace AlibabaCloud
|
|||||||
typedef Outcome<Error, Model::ListGroupsResult> ListGroupsOutcome;
|
typedef Outcome<Error, Model::ListGroupsResult> ListGroupsOutcome;
|
||||||
typedef std::future<ListGroupsOutcome> ListGroupsOutcomeCallable;
|
typedef std::future<ListGroupsOutcome> ListGroupsOutcomeCallable;
|
||||||
typedef std::function<void(const CodeupClient*, const Model::ListGroupsRequest&, const ListGroupsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListGroupsAsyncHandler;
|
typedef std::function<void(const CodeupClient*, const Model::ListGroupsRequest&, const ListGroupsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListGroupsAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::ListRepositoryBranchesResult> ListRepositoryBranchesOutcome;
|
||||||
|
typedef std::future<ListRepositoryBranchesOutcome> ListRepositoryBranchesOutcomeCallable;
|
||||||
|
typedef std::function<void(const CodeupClient*, const Model::ListRepositoryBranchesRequest&, const ListRepositoryBranchesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListRepositoryBranchesAsyncHandler;
|
||||||
typedef Outcome<Error, Model::ListRepositoryMemberResult> ListRepositoryMemberOutcome;
|
typedef Outcome<Error, Model::ListRepositoryMemberResult> ListRepositoryMemberOutcome;
|
||||||
typedef std::future<ListRepositoryMemberOutcome> ListRepositoryMemberOutcomeCallable;
|
typedef std::future<ListRepositoryMemberOutcome> ListRepositoryMemberOutcomeCallable;
|
||||||
typedef std::function<void(const CodeupClient*, const Model::ListRepositoryMemberRequest&, const ListRepositoryMemberOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListRepositoryMemberAsyncHandler;
|
typedef std::function<void(const CodeupClient*, const Model::ListRepositoryMemberRequest&, const ListRepositoryMemberOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListRepositoryMemberAsyncHandler;
|
||||||
@@ -235,6 +245,9 @@ namespace AlibabaCloud
|
|||||||
GetFileBlobsOutcome getFileBlobs(const Model::GetFileBlobsRequest &request)const;
|
GetFileBlobsOutcome getFileBlobs(const Model::GetFileBlobsRequest &request)const;
|
||||||
void getFileBlobsAsync(const Model::GetFileBlobsRequest& request, const GetFileBlobsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
void getFileBlobsAsync(const Model::GetFileBlobsRequest& request, const GetFileBlobsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
GetFileBlobsOutcomeCallable getFileBlobsCallable(const Model::GetFileBlobsRequest& request) const;
|
GetFileBlobsOutcomeCallable getFileBlobsCallable(const Model::GetFileBlobsRequest& request) const;
|
||||||
|
GetGroupDetailOutcome getGroupDetail(const Model::GetGroupDetailRequest &request)const;
|
||||||
|
void getGroupDetailAsync(const Model::GetGroupDetailRequest& request, const GetGroupDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
GetGroupDetailOutcomeCallable getGroupDetailCallable(const Model::GetGroupDetailRequest& request) const;
|
||||||
GetProjectMemberOutcome getProjectMember(const Model::GetProjectMemberRequest &request)const;
|
GetProjectMemberOutcome getProjectMember(const Model::GetProjectMemberRequest &request)const;
|
||||||
void getProjectMemberAsync(const Model::GetProjectMemberRequest& request, const GetProjectMemberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
void getProjectMemberAsync(const Model::GetProjectMemberRequest& request, const GetProjectMemberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
GetProjectMemberOutcomeCallable getProjectMemberCallable(const Model::GetProjectMemberRequest& request) const;
|
GetProjectMemberOutcomeCallable getProjectMemberCallable(const Model::GetProjectMemberRequest& request) const;
|
||||||
@@ -250,6 +263,9 @@ namespace AlibabaCloud
|
|||||||
ListGroupsOutcome listGroups(const Model::ListGroupsRequest &request)const;
|
ListGroupsOutcome listGroups(const Model::ListGroupsRequest &request)const;
|
||||||
void listGroupsAsync(const Model::ListGroupsRequest& request, const ListGroupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
void listGroupsAsync(const Model::ListGroupsRequest& request, const ListGroupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
ListGroupsOutcomeCallable listGroupsCallable(const Model::ListGroupsRequest& request) const;
|
ListGroupsOutcomeCallable listGroupsCallable(const Model::ListGroupsRequest& request) const;
|
||||||
|
ListRepositoryBranchesOutcome listRepositoryBranches(const Model::ListRepositoryBranchesRequest &request)const;
|
||||||
|
void listRepositoryBranchesAsync(const Model::ListRepositoryBranchesRequest& request, const ListRepositoryBranchesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
ListRepositoryBranchesOutcomeCallable listRepositoryBranchesCallable(const Model::ListRepositoryBranchesRequest& request) const;
|
||||||
ListRepositoryMemberOutcome listRepositoryMember(const Model::ListRepositoryMemberRequest &request)const;
|
ListRepositoryMemberOutcome listRepositoryMember(const Model::ListRepositoryMemberRequest &request)const;
|
||||||
void listRepositoryMemberAsync(const Model::ListRepositoryMemberRequest& request, const ListRepositoryMemberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
void listRepositoryMemberAsync(const Model::ListRepositoryMemberRequest& request, const ListRepositoryMemberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
ListRepositoryMemberOutcomeCallable listRepositoryMemberCallable(const Model::ListRepositoryMemberRequest& request) const;
|
ListRepositoryMemberOutcomeCallable listRepositoryMemberCallable(const Model::ListRepositoryMemberRequest& request) const;
|
||||||
|
|||||||
@@ -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_CODEUP_MODEL_GETGROUPDETAILREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_CODEUP_MODEL_GETGROUPDETAILREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||||
|
#include <alibabacloud/codeup/CodeupExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Codeup
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_CODEUP_EXPORT GetGroupDetailRequest : public RoaServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
GetGroupDetailRequest();
|
||||||
|
~GetGroupDetailRequest();
|
||||||
|
|
||||||
|
std::string getOrganizationId()const;
|
||||||
|
void setOrganizationId(const std::string& organizationId);
|
||||||
|
std::string getSubUserId()const;
|
||||||
|
void setSubUserId(const std::string& subUserId);
|
||||||
|
long getGroupId()const;
|
||||||
|
void setGroupId(long groupId);
|
||||||
|
std::string getAccessToken()const;
|
||||||
|
void setAccessToken(const std::string& accessToken);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string organizationId_;
|
||||||
|
std::string subUserId_;
|
||||||
|
long groupId_;
|
||||||
|
std::string accessToken_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_CODEUP_MODEL_GETGROUPDETAILREQUEST_H_
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
/*
|
||||||
|
* 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_CODEUP_MODEL_GETGROUPDETAILRESULT_H_
|
||||||
|
#define ALIBABACLOUD_CODEUP_MODEL_GETGROUPDETAILRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/codeup/CodeupExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Codeup
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_CODEUP_EXPORT GetGroupDetailResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Result
|
||||||
|
{
|
||||||
|
std::string path;
|
||||||
|
std::string pathWithNamespace;
|
||||||
|
long parentId;
|
||||||
|
std::string type;
|
||||||
|
std::string description;
|
||||||
|
std::string avatarUrl;
|
||||||
|
long ownerId;
|
||||||
|
std::string webUrl;
|
||||||
|
std::string nameWithNamespace;
|
||||||
|
std::string visibilityLevel;
|
||||||
|
long id;
|
||||||
|
std::string name;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
GetGroupDetailResult();
|
||||||
|
explicit GetGroupDetailResult(const std::string &payload);
|
||||||
|
~GetGroupDetailResult();
|
||||||
|
std::string getErrorCode()const;
|
||||||
|
std::string getErrorMessage()const;
|
||||||
|
bool getSuccess()const;
|
||||||
|
Result getResult()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
std::string errorCode_;
|
||||||
|
std::string errorMessage_;
|
||||||
|
bool success_;
|
||||||
|
Result result_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_CODEUP_MODEL_GETGROUPDETAILRESULT_H_
|
||||||
@@ -46,6 +46,7 @@ namespace AlibabaCloud
|
|||||||
ListGroupMemberResult();
|
ListGroupMemberResult();
|
||||||
explicit ListGroupMemberResult(const std::string &payload);
|
explicit ListGroupMemberResult(const std::string &payload);
|
||||||
~ListGroupMemberResult();
|
~ListGroupMemberResult();
|
||||||
|
long getTotal()const;
|
||||||
std::string getErrorCode()const;
|
std::string getErrorCode()const;
|
||||||
std::string getErrorMessage()const;
|
std::string getErrorMessage()const;
|
||||||
bool getSuccess()const;
|
bool getSuccess()const;
|
||||||
@@ -54,6 +55,7 @@ namespace AlibabaCloud
|
|||||||
protected:
|
protected:
|
||||||
void parse(const std::string &payload);
|
void parse(const std::string &payload);
|
||||||
private:
|
private:
|
||||||
|
long total_;
|
||||||
std::string errorCode_;
|
std::string errorCode_;
|
||||||
std::string errorMessage_;
|
std::string errorMessage_;
|
||||||
bool success_;
|
bool success_;
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ namespace AlibabaCloud
|
|||||||
ListGroupRepositoriesResult();
|
ListGroupRepositoriesResult();
|
||||||
explicit ListGroupRepositoriesResult(const std::string &payload);
|
explicit ListGroupRepositoriesResult(const std::string &payload);
|
||||||
~ListGroupRepositoriesResult();
|
~ListGroupRepositoriesResult();
|
||||||
|
long getTotal()const;
|
||||||
std::string getErrorCode()const;
|
std::string getErrorCode()const;
|
||||||
std::string getErrorMessage()const;
|
std::string getErrorMessage()const;
|
||||||
bool getSuccess()const;
|
bool getSuccess()const;
|
||||||
@@ -64,6 +65,7 @@ namespace AlibabaCloud
|
|||||||
protected:
|
protected:
|
||||||
void parse(const std::string &payload);
|
void parse(const std::string &payload);
|
||||||
private:
|
private:
|
||||||
|
long total_;
|
||||||
std::string errorCode_;
|
std::string errorCode_;
|
||||||
std::string errorMessage_;
|
std::string errorMessage_;
|
||||||
bool success_;
|
bool success_;
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ namespace AlibabaCloud
|
|||||||
ListGroupsResult();
|
ListGroupsResult();
|
||||||
explicit ListGroupsResult(const std::string &payload);
|
explicit ListGroupsResult(const std::string &payload);
|
||||||
~ListGroupsResult();
|
~ListGroupsResult();
|
||||||
|
long getTotal()const;
|
||||||
std::string getErrorCode()const;
|
std::string getErrorCode()const;
|
||||||
std::string getErrorMessage()const;
|
std::string getErrorMessage()const;
|
||||||
bool getSuccess()const;
|
bool getSuccess()const;
|
||||||
@@ -62,6 +63,7 @@ namespace AlibabaCloud
|
|||||||
protected:
|
protected:
|
||||||
void parse(const std::string &payload);
|
void parse(const std::string &payload);
|
||||||
private:
|
private:
|
||||||
|
long total_;
|
||||||
std::string errorCode_;
|
std::string errorCode_;
|
||||||
std::string errorMessage_;
|
std::string errorMessage_;
|
||||||
bool success_;
|
bool success_;
|
||||||
|
|||||||
@@ -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_CODEUP_MODEL_LISTREPOSITORYBRANCHESREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_CODEUP_MODEL_LISTREPOSITORYBRANCHESREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||||
|
#include <alibabacloud/codeup/CodeupExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Codeup
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_CODEUP_EXPORT ListRepositoryBranchesRequest : public RoaServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
ListRepositoryBranchesRequest();
|
||||||
|
~ListRepositoryBranchesRequest();
|
||||||
|
|
||||||
|
std::string getOrganizationId()const;
|
||||||
|
void setOrganizationId(const std::string& organizationId);
|
||||||
|
std::string getSearch()const;
|
||||||
|
void setSearch(const std::string& search);
|
||||||
|
std::string getSubUserId()const;
|
||||||
|
void setSubUserId(const std::string& subUserId);
|
||||||
|
long getPageSize()const;
|
||||||
|
void setPageSize(long pageSize);
|
||||||
|
std::string getAccessToken()const;
|
||||||
|
void setAccessToken(const std::string& accessToken);
|
||||||
|
long getPage()const;
|
||||||
|
void setPage(long page);
|
||||||
|
long getProjectId()const;
|
||||||
|
void setProjectId(long projectId);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string organizationId_;
|
||||||
|
std::string search_;
|
||||||
|
std::string subUserId_;
|
||||||
|
long pageSize_;
|
||||||
|
std::string accessToken_;
|
||||||
|
long page_;
|
||||||
|
long projectId_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_CODEUP_MODEL_LISTREPOSITORYBRANCHESREQUEST_H_
|
||||||
@@ -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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_CODEUP_MODEL_LISTREPOSITORYBRANCHESRESULT_H_
|
||||||
|
#define ALIBABACLOUD_CODEUP_MODEL_LISTREPOSITORYBRANCHESRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/codeup/CodeupExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Codeup
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_CODEUP_EXPORT ListRepositoryBranchesResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct ResultItem
|
||||||
|
{
|
||||||
|
struct CommitInfo
|
||||||
|
{
|
||||||
|
std::string authorName;
|
||||||
|
std::string message;
|
||||||
|
std::string authorDate;
|
||||||
|
std::string committedDate;
|
||||||
|
std::string committerEmail;
|
||||||
|
std::vector<std::string> parentIds;
|
||||||
|
std::string createdAt;
|
||||||
|
std::string shortId;
|
||||||
|
std::string title;
|
||||||
|
std::string id;
|
||||||
|
std::string authorEmail;
|
||||||
|
std::string committerName;
|
||||||
|
};
|
||||||
|
bool protectedBranch;
|
||||||
|
CommitInfo commitInfo;
|
||||||
|
std::string branchName;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
ListRepositoryBranchesResult();
|
||||||
|
explicit ListRepositoryBranchesResult(const std::string &payload);
|
||||||
|
~ListRepositoryBranchesResult();
|
||||||
|
long getTotal()const;
|
||||||
|
std::string getErrorCode()const;
|
||||||
|
std::string getErrorMessage()const;
|
||||||
|
bool getSuccess()const;
|
||||||
|
std::vector<ResultItem> getResult()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
long total_;
|
||||||
|
std::string errorCode_;
|
||||||
|
std::string errorMessage_;
|
||||||
|
bool success_;
|
||||||
|
std::vector<ResultItem> result_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_CODEUP_MODEL_LISTREPOSITORYBRANCHESRESULT_H_
|
||||||
@@ -46,6 +46,7 @@ namespace AlibabaCloud
|
|||||||
ListRepositoryMemberResult();
|
ListRepositoryMemberResult();
|
||||||
explicit ListRepositoryMemberResult(const std::string &payload);
|
explicit ListRepositoryMemberResult(const std::string &payload);
|
||||||
~ListRepositoryMemberResult();
|
~ListRepositoryMemberResult();
|
||||||
|
long getTotal()const;
|
||||||
std::string getErrorCode()const;
|
std::string getErrorCode()const;
|
||||||
std::string getErrorMessage()const;
|
std::string getErrorMessage()const;
|
||||||
bool getSuccess()const;
|
bool getSuccess()const;
|
||||||
@@ -54,6 +55,7 @@ namespace AlibabaCloud
|
|||||||
protected:
|
protected:
|
||||||
void parse(const std::string &payload);
|
void parse(const std::string &payload);
|
||||||
private:
|
private:
|
||||||
|
long total_;
|
||||||
std::string errorCode_;
|
std::string errorCode_;
|
||||||
std::string errorMessage_;
|
std::string errorMessage_;
|
||||||
bool success_;
|
bool success_;
|
||||||
|
|||||||
@@ -699,6 +699,42 @@ CodeupClient::GetFileBlobsOutcomeCallable CodeupClient::getFileBlobsCallable(con
|
|||||||
return task->get_future();
|
return task->get_future();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CodeupClient::GetGroupDetailOutcome CodeupClient::getGroupDetail(const GetGroupDetailRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return GetGroupDetailOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return GetGroupDetailOutcome(GetGroupDetailResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return GetGroupDetailOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void CodeupClient::getGroupDetailAsync(const GetGroupDetailRequest& request, const GetGroupDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, getGroupDetail(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
CodeupClient::GetGroupDetailOutcomeCallable CodeupClient::getGroupDetailCallable(const GetGroupDetailRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<GetGroupDetailOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->getGroupDetail(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
CodeupClient::GetProjectMemberOutcome CodeupClient::getProjectMember(const GetProjectMemberRequest &request) const
|
CodeupClient::GetProjectMemberOutcome CodeupClient::getProjectMember(const GetProjectMemberRequest &request) const
|
||||||
{
|
{
|
||||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
@@ -879,6 +915,42 @@ CodeupClient::ListGroupsOutcomeCallable CodeupClient::listGroupsCallable(const L
|
|||||||
return task->get_future();
|
return task->get_future();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CodeupClient::ListRepositoryBranchesOutcome CodeupClient::listRepositoryBranches(const ListRepositoryBranchesRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return ListRepositoryBranchesOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return ListRepositoryBranchesOutcome(ListRepositoryBranchesResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return ListRepositoryBranchesOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void CodeupClient::listRepositoryBranchesAsync(const ListRepositoryBranchesRequest& request, const ListRepositoryBranchesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, listRepositoryBranches(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
CodeupClient::ListRepositoryBranchesOutcomeCallable CodeupClient::listRepositoryBranchesCallable(const ListRepositoryBranchesRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<ListRepositoryBranchesOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->listRepositoryBranches(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
CodeupClient::ListRepositoryMemberOutcome CodeupClient::listRepositoryMember(const ListRepositoryMemberRequest &request) const
|
CodeupClient::ListRepositoryMemberOutcome CodeupClient::listRepositoryMember(const ListRepositoryMemberRequest &request) const
|
||||||
{
|
{
|
||||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
|||||||
@@ -112,18 +112,18 @@ void CreateMergeRequestResult::parse(const std::string &payload)
|
|||||||
satisfiedCheckResultsItemObject.checkName = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckName"].asString();
|
satisfiedCheckResultsItemObject.checkName = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckName"].asString();
|
||||||
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckType"].isNull())
|
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckType"].isNull())
|
||||||
satisfiedCheckResultsItemObject.checkType = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckType"].asString();
|
satisfiedCheckResultsItemObject.checkType = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckType"].asString();
|
||||||
auto allExtraUsersNode = allSatisfiedCheckResultsNode["ExtraUsers"]["ExtraUsersItem"];
|
auto allExtraUsersNode = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["ExtraUsers"]["ExtraUsersItem"];
|
||||||
for (auto allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem : allExtraUsersNode)
|
for (auto approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem : allExtraUsersNode)
|
||||||
{
|
{
|
||||||
Result::ApproveCheckResult::SatisfiedCheckResultsItem::ExtraUsersItem extraUsersObject;
|
Result::ApproveCheckResult::SatisfiedCheckResultsItem::ExtraUsersItem extraUsersObject;
|
||||||
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].isNull())
|
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].isNull())
|
||||||
extraUsersObject.id = std::stol(allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].asString());
|
extraUsersObject.id = std::stol(approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].asString());
|
||||||
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].isNull())
|
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].isNull())
|
||||||
extraUsersObject.externUserId = allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].asString();
|
extraUsersObject.externUserId = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].asString();
|
||||||
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].isNull())
|
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].isNull())
|
||||||
extraUsersObject.avatarUrl = allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].asString();
|
extraUsersObject.avatarUrl = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].asString();
|
||||||
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].isNull())
|
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Name"].isNull())
|
||||||
extraUsersObject.name = allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].asString();
|
extraUsersObject.name = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Name"].asString();
|
||||||
satisfiedCheckResultsItemObject.extraUsers.push_back(extraUsersObject);
|
satisfiedCheckResultsItemObject.extraUsers.push_back(extraUsersObject);
|
||||||
}
|
}
|
||||||
auto allSatisfiedItems = value["SatisfiedItems"]["SatisfiedItems"];
|
auto allSatisfiedItems = value["SatisfiedItems"]["SatisfiedItems"];
|
||||||
@@ -144,18 +144,18 @@ void CreateMergeRequestResult::parse(const std::string &payload)
|
|||||||
unsatisfiedCheckResultsItemObject.checkName = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckName"].asString();
|
unsatisfiedCheckResultsItemObject.checkName = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckName"].asString();
|
||||||
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckType"].isNull())
|
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckType"].isNull())
|
||||||
unsatisfiedCheckResultsItemObject.checkType = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckType"].asString();
|
unsatisfiedCheckResultsItemObject.checkType = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckType"].asString();
|
||||||
auto allExtraUsers3Node = allUnsatisfiedCheckResultsNode["ExtraUsers"]["ExtraUsersItem"];
|
auto allExtraUsers3Node = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["ExtraUsers"]["ExtraUsersItem"];
|
||||||
for (auto allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem : allExtraUsers3Node)
|
for (auto approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem : allExtraUsers3Node)
|
||||||
{
|
{
|
||||||
Result::ApproveCheckResult::UnsatisfiedCheckResultsItem::ExtraUsersItem4 extraUsers3Object;
|
Result::ApproveCheckResult::UnsatisfiedCheckResultsItem::ExtraUsersItem4 extraUsers3Object;
|
||||||
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].isNull())
|
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].isNull())
|
||||||
extraUsers3Object.id = std::stol(allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].asString());
|
extraUsers3Object.id = std::stol(approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].asString());
|
||||||
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].isNull())
|
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].isNull())
|
||||||
extraUsers3Object.externUserId = allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].asString();
|
extraUsers3Object.externUserId = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].asString();
|
||||||
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].isNull())
|
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].isNull())
|
||||||
extraUsers3Object.avatarUrl = allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].asString();
|
extraUsers3Object.avatarUrl = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].asString();
|
||||||
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].isNull())
|
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Name"].isNull())
|
||||||
extraUsers3Object.name = allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].asString();
|
extraUsers3Object.name = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Name"].asString();
|
||||||
unsatisfiedCheckResultsItemObject.extraUsers3.push_back(extraUsers3Object);
|
unsatisfiedCheckResultsItemObject.extraUsers3.push_back(extraUsers3Object);
|
||||||
}
|
}
|
||||||
auto allSatisfiedItems1 = value["SatisfiedItems"]["SatisfiedItems"];
|
auto allSatisfiedItems1 = value["SatisfiedItems"]["SatisfiedItems"];
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ using AlibabaCloud::Codeup::Model::DeleteBranchRequest;
|
|||||||
DeleteBranchRequest::DeleteBranchRequest() :
|
DeleteBranchRequest::DeleteBranchRequest() :
|
||||||
RoaServiceRequest("codeup", "2020-04-14")
|
RoaServiceRequest("codeup", "2020-04-14")
|
||||||
{
|
{
|
||||||
setResourcePath("/api/v3/projects/[ProjectId]/repository/branches/[BranchName]");
|
setResourcePath("/api/v3/projects/[ProjectId]/repository/branches/delete");
|
||||||
setMethod(HttpRequest::Method::Delete);
|
setMethod(HttpRequest::Method::Delete);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ using AlibabaCloud::Codeup::Model::GetBranchInfoRequest;
|
|||||||
GetBranchInfoRequest::GetBranchInfoRequest() :
|
GetBranchInfoRequest::GetBranchInfoRequest() :
|
||||||
RoaServiceRequest("codeup", "2020-04-14")
|
RoaServiceRequest("codeup", "2020-04-14")
|
||||||
{
|
{
|
||||||
setResourcePath("/api/v3/projects/[ProjectId]/repository/branches/[BranchName]");
|
setResourcePath("/api/v3/projects/[ProjectId]/repository/branches/detail");
|
||||||
setMethod(HttpRequest::Method::Get);
|
setMethod(HttpRequest::Method::Get);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
74
codeup/src/model/GetGroupDetailRequest.cc
Normal file
74
codeup/src/model/GetGroupDetailRequest.cc
Normal 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/codeup/model/GetGroupDetailRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Codeup::Model::GetGroupDetailRequest;
|
||||||
|
|
||||||
|
GetGroupDetailRequest::GetGroupDetailRequest() :
|
||||||
|
RoaServiceRequest("codeup", "2020-04-14")
|
||||||
|
{
|
||||||
|
setResourcePath("/api/v3/groups/detail");
|
||||||
|
setMethod(HttpRequest::Method::Get);
|
||||||
|
}
|
||||||
|
|
||||||
|
GetGroupDetailRequest::~GetGroupDetailRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
std::string GetGroupDetailRequest::getOrganizationId()const
|
||||||
|
{
|
||||||
|
return organizationId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GetGroupDetailRequest::setOrganizationId(const std::string& organizationId)
|
||||||
|
{
|
||||||
|
organizationId_ = organizationId;
|
||||||
|
setParameter("OrganizationId", organizationId);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string GetGroupDetailRequest::getSubUserId()const
|
||||||
|
{
|
||||||
|
return subUserId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GetGroupDetailRequest::setSubUserId(const std::string& subUserId)
|
||||||
|
{
|
||||||
|
subUserId_ = subUserId;
|
||||||
|
setParameter("SubUserId", subUserId);
|
||||||
|
}
|
||||||
|
|
||||||
|
long GetGroupDetailRequest::getGroupId()const
|
||||||
|
{
|
||||||
|
return groupId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GetGroupDetailRequest::setGroupId(long groupId)
|
||||||
|
{
|
||||||
|
groupId_ = groupId;
|
||||||
|
setParameter("GroupId", std::to_string(groupId));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string GetGroupDetailRequest::getAccessToken()const
|
||||||
|
{
|
||||||
|
return accessToken_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GetGroupDetailRequest::setAccessToken(const std::string& accessToken)
|
||||||
|
{
|
||||||
|
accessToken_ = accessToken;
|
||||||
|
setParameter("AccessToken", accessToken);
|
||||||
|
}
|
||||||
|
|
||||||
95
codeup/src/model/GetGroupDetailResult.cc
Normal file
95
codeup/src/model/GetGroupDetailResult.cc
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
/*
|
||||||
|
* 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/codeup/model/GetGroupDetailResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Codeup;
|
||||||
|
using namespace AlibabaCloud::Codeup::Model;
|
||||||
|
|
||||||
|
GetGroupDetailResult::GetGroupDetailResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
GetGroupDetailResult::GetGroupDetailResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
GetGroupDetailResult::~GetGroupDetailResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void GetGroupDetailResult::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["Id"].isNull())
|
||||||
|
result_.id = std::stol(resultNode["Id"].asString());
|
||||||
|
if(!resultNode["Name"].isNull())
|
||||||
|
result_.name = resultNode["Name"].asString();
|
||||||
|
if(!resultNode["Path"].isNull())
|
||||||
|
result_.path = resultNode["Path"].asString();
|
||||||
|
if(!resultNode["Description"].isNull())
|
||||||
|
result_.description = resultNode["Description"].asString();
|
||||||
|
if(!resultNode["AvatarUrl"].isNull())
|
||||||
|
result_.avatarUrl = resultNode["AvatarUrl"].asString();
|
||||||
|
if(!resultNode["WebUrl"].isNull())
|
||||||
|
result_.webUrl = resultNode["WebUrl"].asString();
|
||||||
|
if(!resultNode["PathWithNamespace"].isNull())
|
||||||
|
result_.pathWithNamespace = resultNode["PathWithNamespace"].asString();
|
||||||
|
if(!resultNode["NameWithNamespace"].isNull())
|
||||||
|
result_.nameWithNamespace = resultNode["NameWithNamespace"].asString();
|
||||||
|
if(!resultNode["Type"].isNull())
|
||||||
|
result_.type = resultNode["Type"].asString();
|
||||||
|
if(!resultNode["VisibilityLevel"].isNull())
|
||||||
|
result_.visibilityLevel = resultNode["VisibilityLevel"].asString();
|
||||||
|
if(!resultNode["ParentId"].isNull())
|
||||||
|
result_.parentId = std::stol(resultNode["ParentId"].asString());
|
||||||
|
if(!resultNode["OwnerId"].isNull())
|
||||||
|
result_.ownerId = std::stol(resultNode["OwnerId"].asString());
|
||||||
|
if(!value["ErrorCode"].isNull())
|
||||||
|
errorCode_ = value["ErrorCode"].asString();
|
||||||
|
if(!value["Success"].isNull())
|
||||||
|
success_ = value["Success"].asString() == "true";
|
||||||
|
if(!value["ErrorMessage"].isNull())
|
||||||
|
errorMessage_ = value["ErrorMessage"].asString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string GetGroupDetailResult::getErrorCode()const
|
||||||
|
{
|
||||||
|
return errorCode_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string GetGroupDetailResult::getErrorMessage()const
|
||||||
|
{
|
||||||
|
return errorMessage_;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool GetGroupDetailResult::getSuccess()const
|
||||||
|
{
|
||||||
|
return success_;
|
||||||
|
}
|
||||||
|
|
||||||
|
GetGroupDetailResult::Result GetGroupDetailResult::getResult()const
|
||||||
|
{
|
||||||
|
return result_;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -63,9 +63,16 @@ void ListGroupMemberResult::parse(const std::string &payload)
|
|||||||
success_ = value["Success"].asString() == "true";
|
success_ = value["Success"].asString() == "true";
|
||||||
if(!value["ErrorMessage"].isNull())
|
if(!value["ErrorMessage"].isNull())
|
||||||
errorMessage_ = value["ErrorMessage"].asString();
|
errorMessage_ = value["ErrorMessage"].asString();
|
||||||
|
if(!value["Total"].isNull())
|
||||||
|
total_ = std::stol(value["Total"].asString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long ListGroupMemberResult::getTotal()const
|
||||||
|
{
|
||||||
|
return total_;
|
||||||
|
}
|
||||||
|
|
||||||
std::string ListGroupMemberResult::getErrorCode()const
|
std::string ListGroupMemberResult::getErrorCode()const
|
||||||
{
|
{
|
||||||
return errorCode_;
|
return errorCode_;
|
||||||
|
|||||||
@@ -83,9 +83,16 @@ void ListGroupRepositoriesResult::parse(const std::string &payload)
|
|||||||
success_ = value["Success"].asString() == "true";
|
success_ = value["Success"].asString() == "true";
|
||||||
if(!value["ErrorMessage"].isNull())
|
if(!value["ErrorMessage"].isNull())
|
||||||
errorMessage_ = value["ErrorMessage"].asString();
|
errorMessage_ = value["ErrorMessage"].asString();
|
||||||
|
if(!value["Total"].isNull())
|
||||||
|
total_ = std::stol(value["Total"].asString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long ListGroupRepositoriesResult::getTotal()const
|
||||||
|
{
|
||||||
|
return total_;
|
||||||
|
}
|
||||||
|
|
||||||
std::string ListGroupRepositoriesResult::getErrorCode()const
|
std::string ListGroupRepositoriesResult::getErrorCode()const
|
||||||
{
|
{
|
||||||
return errorCode_;
|
return errorCode_;
|
||||||
|
|||||||
@@ -79,9 +79,16 @@ void ListGroupsResult::parse(const std::string &payload)
|
|||||||
success_ = value["Success"].asString() == "true";
|
success_ = value["Success"].asString() == "true";
|
||||||
if(!value["ErrorMessage"].isNull())
|
if(!value["ErrorMessage"].isNull())
|
||||||
errorMessage_ = value["ErrorMessage"].asString();
|
errorMessage_ = value["ErrorMessage"].asString();
|
||||||
|
if(!value["Total"].isNull())
|
||||||
|
total_ = std::stol(value["Total"].asString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long ListGroupsResult::getTotal()const
|
||||||
|
{
|
||||||
|
return total_;
|
||||||
|
}
|
||||||
|
|
||||||
std::string ListGroupsResult::getErrorCode()const
|
std::string ListGroupsResult::getErrorCode()const
|
||||||
{
|
{
|
||||||
return errorCode_;
|
return errorCode_;
|
||||||
|
|||||||
107
codeup/src/model/ListRepositoryBranchesRequest.cc
Normal file
107
codeup/src/model/ListRepositoryBranchesRequest.cc
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
/*
|
||||||
|
* 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/codeup/model/ListRepositoryBranchesRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Codeup::Model::ListRepositoryBranchesRequest;
|
||||||
|
|
||||||
|
ListRepositoryBranchesRequest::ListRepositoryBranchesRequest() :
|
||||||
|
RoaServiceRequest("codeup", "2020-04-14")
|
||||||
|
{
|
||||||
|
setResourcePath("/api/v3/projects/[ProjectId]/repository/branches");
|
||||||
|
setMethod(HttpRequest::Method::Get);
|
||||||
|
}
|
||||||
|
|
||||||
|
ListRepositoryBranchesRequest::~ListRepositoryBranchesRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
std::string ListRepositoryBranchesRequest::getOrganizationId()const
|
||||||
|
{
|
||||||
|
return organizationId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListRepositoryBranchesRequest::setOrganizationId(const std::string& organizationId)
|
||||||
|
{
|
||||||
|
organizationId_ = organizationId;
|
||||||
|
setParameter("OrganizationId", organizationId);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListRepositoryBranchesRequest::getSearch()const
|
||||||
|
{
|
||||||
|
return search_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListRepositoryBranchesRequest::setSearch(const std::string& search)
|
||||||
|
{
|
||||||
|
search_ = search;
|
||||||
|
setParameter("Search", search);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListRepositoryBranchesRequest::getSubUserId()const
|
||||||
|
{
|
||||||
|
return subUserId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListRepositoryBranchesRequest::setSubUserId(const std::string& subUserId)
|
||||||
|
{
|
||||||
|
subUserId_ = subUserId;
|
||||||
|
setParameter("SubUserId", subUserId);
|
||||||
|
}
|
||||||
|
|
||||||
|
long ListRepositoryBranchesRequest::getPageSize()const
|
||||||
|
{
|
||||||
|
return pageSize_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListRepositoryBranchesRequest::setPageSize(long pageSize)
|
||||||
|
{
|
||||||
|
pageSize_ = pageSize;
|
||||||
|
setParameter("PageSize", std::to_string(pageSize));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListRepositoryBranchesRequest::getAccessToken()const
|
||||||
|
{
|
||||||
|
return accessToken_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListRepositoryBranchesRequest::setAccessToken(const std::string& accessToken)
|
||||||
|
{
|
||||||
|
accessToken_ = accessToken;
|
||||||
|
setParameter("AccessToken", accessToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
long ListRepositoryBranchesRequest::getPage()const
|
||||||
|
{
|
||||||
|
return page_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListRepositoryBranchesRequest::setPage(long page)
|
||||||
|
{
|
||||||
|
page_ = page;
|
||||||
|
setParameter("Page", std::to_string(page));
|
||||||
|
}
|
||||||
|
|
||||||
|
long ListRepositoryBranchesRequest::getProjectId()const
|
||||||
|
{
|
||||||
|
return projectId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListRepositoryBranchesRequest::setProjectId(long projectId)
|
||||||
|
{
|
||||||
|
projectId_ = projectId;
|
||||||
|
setParameter("ProjectId", std::to_string(projectId));
|
||||||
|
}
|
||||||
|
|
||||||
113
codeup/src/model/ListRepositoryBranchesResult.cc
Normal file
113
codeup/src/model/ListRepositoryBranchesResult.cc
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
/*
|
||||||
|
* 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/codeup/model/ListRepositoryBranchesResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Codeup;
|
||||||
|
using namespace AlibabaCloud::Codeup::Model;
|
||||||
|
|
||||||
|
ListRepositoryBranchesResult::ListRepositoryBranchesResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
ListRepositoryBranchesResult::ListRepositoryBranchesResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
ListRepositoryBranchesResult::~ListRepositoryBranchesResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void ListRepositoryBranchesResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto allResultNode = value["Result"]["ResultItem"];
|
||||||
|
for (auto valueResultResultItem : allResultNode)
|
||||||
|
{
|
||||||
|
ResultItem resultObject;
|
||||||
|
if(!valueResultResultItem["BranchName"].isNull())
|
||||||
|
resultObject.branchName = valueResultResultItem["BranchName"].asString();
|
||||||
|
if(!valueResultResultItem["ProtectedBranch"].isNull())
|
||||||
|
resultObject.protectedBranch = valueResultResultItem["ProtectedBranch"].asString() == "true";
|
||||||
|
auto commitInfoNode = value["CommitInfo"];
|
||||||
|
if(!commitInfoNode["Id"].isNull())
|
||||||
|
resultObject.commitInfo.id = commitInfoNode["Id"].asString();
|
||||||
|
if(!commitInfoNode["ShortId"].isNull())
|
||||||
|
resultObject.commitInfo.shortId = commitInfoNode["ShortId"].asString();
|
||||||
|
if(!commitInfoNode["Title"].isNull())
|
||||||
|
resultObject.commitInfo.title = commitInfoNode["Title"].asString();
|
||||||
|
if(!commitInfoNode["AuthorName"].isNull())
|
||||||
|
resultObject.commitInfo.authorName = commitInfoNode["AuthorName"].asString();
|
||||||
|
if(!commitInfoNode["AuthorEmail"].isNull())
|
||||||
|
resultObject.commitInfo.authorEmail = commitInfoNode["AuthorEmail"].asString();
|
||||||
|
if(!commitInfoNode["CreatedAt"].isNull())
|
||||||
|
resultObject.commitInfo.createdAt = commitInfoNode["CreatedAt"].asString();
|
||||||
|
if(!commitInfoNode["Message"].isNull())
|
||||||
|
resultObject.commitInfo.message = commitInfoNode["Message"].asString();
|
||||||
|
if(!commitInfoNode["AuthorDate"].isNull())
|
||||||
|
resultObject.commitInfo.authorDate = commitInfoNode["AuthorDate"].asString();
|
||||||
|
if(!commitInfoNode["CommittedDate"].isNull())
|
||||||
|
resultObject.commitInfo.committedDate = commitInfoNode["CommittedDate"].asString();
|
||||||
|
if(!commitInfoNode["CommitterEmail"].isNull())
|
||||||
|
resultObject.commitInfo.committerEmail = commitInfoNode["CommitterEmail"].asString();
|
||||||
|
if(!commitInfoNode["CommitterName"].isNull())
|
||||||
|
resultObject.commitInfo.committerName = commitInfoNode["CommitterName"].asString();
|
||||||
|
auto allParentIds = commitInfoNode["ParentIds"]["ParentIds"];
|
||||||
|
for (auto value : allParentIds)
|
||||||
|
resultObject.commitInfo.parentIds.push_back(value.asString());
|
||||||
|
result_.push_back(resultObject);
|
||||||
|
}
|
||||||
|
if(!value["ErrorCode"].isNull())
|
||||||
|
errorCode_ = value["ErrorCode"].asString();
|
||||||
|
if(!value["Success"].isNull())
|
||||||
|
success_ = value["Success"].asString() == "true";
|
||||||
|
if(!value["ErrorMessage"].isNull())
|
||||||
|
errorMessage_ = value["ErrorMessage"].asString();
|
||||||
|
if(!value["Total"].isNull())
|
||||||
|
total_ = std::stol(value["Total"].asString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
long ListRepositoryBranchesResult::getTotal()const
|
||||||
|
{
|
||||||
|
return total_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListRepositoryBranchesResult::getErrorCode()const
|
||||||
|
{
|
||||||
|
return errorCode_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListRepositoryBranchesResult::getErrorMessage()const
|
||||||
|
{
|
||||||
|
return errorMessage_;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ListRepositoryBranchesResult::getSuccess()const
|
||||||
|
{
|
||||||
|
return success_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<ListRepositoryBranchesResult::ResultItem> ListRepositoryBranchesResult::getResult()const
|
||||||
|
{
|
||||||
|
return result_;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -63,9 +63,16 @@ void ListRepositoryMemberResult::parse(const std::string &payload)
|
|||||||
success_ = value["Success"].asString() == "true";
|
success_ = value["Success"].asString() == "true";
|
||||||
if(!value["ErrorMessage"].isNull())
|
if(!value["ErrorMessage"].isNull())
|
||||||
errorMessage_ = value["ErrorMessage"].asString();
|
errorMessage_ = value["ErrorMessage"].asString();
|
||||||
|
if(!value["Total"].isNull())
|
||||||
|
total_ = std::stol(value["Total"].asString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long ListRepositoryMemberResult::getTotal()const
|
||||||
|
{
|
||||||
|
return total_;
|
||||||
|
}
|
||||||
|
|
||||||
std::string ListRepositoryMemberResult::getErrorCode()const
|
std::string ListRepositoryMemberResult::getErrorCode()const
|
||||||
{
|
{
|
||||||
return errorCode_;
|
return errorCode_;
|
||||||
|
|||||||
@@ -112,18 +112,18 @@ void MergeMergeRequestResult::parse(const std::string &payload)
|
|||||||
satisfiedCheckResultsItemObject.checkName = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckName"].asString();
|
satisfiedCheckResultsItemObject.checkName = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckName"].asString();
|
||||||
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckType"].isNull())
|
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckType"].isNull())
|
||||||
satisfiedCheckResultsItemObject.checkType = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckType"].asString();
|
satisfiedCheckResultsItemObject.checkType = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckType"].asString();
|
||||||
auto allExtraUsersNode = allSatisfiedCheckResultsNode["ExtraUsers"]["ExtraUsersItem"];
|
auto allExtraUsersNode = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["ExtraUsers"]["ExtraUsersItem"];
|
||||||
for (auto allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem : allExtraUsersNode)
|
for (auto approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem : allExtraUsersNode)
|
||||||
{
|
{
|
||||||
Result::ApproveCheckResult::SatisfiedCheckResultsItem::ExtraUsersItem extraUsersObject;
|
Result::ApproveCheckResult::SatisfiedCheckResultsItem::ExtraUsersItem extraUsersObject;
|
||||||
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].isNull())
|
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].isNull())
|
||||||
extraUsersObject.id = std::stol(allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].asString());
|
extraUsersObject.id = std::stol(approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].asString());
|
||||||
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].isNull())
|
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].isNull())
|
||||||
extraUsersObject.externUserId = allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].asString();
|
extraUsersObject.externUserId = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].asString();
|
||||||
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].isNull())
|
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].isNull())
|
||||||
extraUsersObject.avatarUrl = allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].asString();
|
extraUsersObject.avatarUrl = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].asString();
|
||||||
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].isNull())
|
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Name"].isNull())
|
||||||
extraUsersObject.name = allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].asString();
|
extraUsersObject.name = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Name"].asString();
|
||||||
satisfiedCheckResultsItemObject.extraUsers.push_back(extraUsersObject);
|
satisfiedCheckResultsItemObject.extraUsers.push_back(extraUsersObject);
|
||||||
}
|
}
|
||||||
auto allSatisfiedItems = value["SatisfiedItems"]["SatisfiedItems"];
|
auto allSatisfiedItems = value["SatisfiedItems"]["SatisfiedItems"];
|
||||||
@@ -144,18 +144,18 @@ void MergeMergeRequestResult::parse(const std::string &payload)
|
|||||||
unsatisfiedCheckResultsItemObject.checkName = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckName"].asString();
|
unsatisfiedCheckResultsItemObject.checkName = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckName"].asString();
|
||||||
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckType"].isNull())
|
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckType"].isNull())
|
||||||
unsatisfiedCheckResultsItemObject.checkType = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckType"].asString();
|
unsatisfiedCheckResultsItemObject.checkType = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckType"].asString();
|
||||||
auto allExtraUsers3Node = allUnsatisfiedCheckResultsNode["ExtraUsers"]["ExtraUsersItem"];
|
auto allExtraUsers3Node = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["ExtraUsers"]["ExtraUsersItem"];
|
||||||
for (auto allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem : allExtraUsers3Node)
|
for (auto approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem : allExtraUsers3Node)
|
||||||
{
|
{
|
||||||
Result::ApproveCheckResult::UnsatisfiedCheckResultsItem::ExtraUsersItem4 extraUsers3Object;
|
Result::ApproveCheckResult::UnsatisfiedCheckResultsItem::ExtraUsersItem4 extraUsers3Object;
|
||||||
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].isNull())
|
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].isNull())
|
||||||
extraUsers3Object.id = std::stol(allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].asString());
|
extraUsers3Object.id = std::stol(approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].asString());
|
||||||
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].isNull())
|
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].isNull())
|
||||||
extraUsers3Object.externUserId = allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].asString();
|
extraUsers3Object.externUserId = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].asString();
|
||||||
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].isNull())
|
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].isNull())
|
||||||
extraUsers3Object.avatarUrl = allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].asString();
|
extraUsers3Object.avatarUrl = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].asString();
|
||||||
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].isNull())
|
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Name"].isNull())
|
||||||
extraUsers3Object.name = allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].asString();
|
extraUsers3Object.name = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Name"].asString();
|
||||||
unsatisfiedCheckResultsItemObject.extraUsers3.push_back(extraUsers3Object);
|
unsatisfiedCheckResultsItemObject.extraUsers3.push_back(extraUsers3Object);
|
||||||
}
|
}
|
||||||
auto allSatisfiedItems1 = value["SatisfiedItems"]["SatisfiedItems"];
|
auto allSatisfiedItems1 = value["SatisfiedItems"]["SatisfiedItems"];
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ set(facebody_public_header_model
|
|||||||
include/alibabacloud/facebody/model/BodyPostureResult.h
|
include/alibabacloud/facebody/model/BodyPostureResult.h
|
||||||
include/alibabacloud/facebody/model/CompareFaceRequest.h
|
include/alibabacloud/facebody/model/CompareFaceRequest.h
|
||||||
include/alibabacloud/facebody/model/CompareFaceResult.h
|
include/alibabacloud/facebody/model/CompareFaceResult.h
|
||||||
|
include/alibabacloud/facebody/model/CountCrowdRequest.h
|
||||||
|
include/alibabacloud/facebody/model/CountCrowdResult.h
|
||||||
include/alibabacloud/facebody/model/CreateFaceDbRequest.h
|
include/alibabacloud/facebody/model/CreateFaceDbRequest.h
|
||||||
include/alibabacloud/facebody/model/CreateFaceDbResult.h
|
include/alibabacloud/facebody/model/CreateFaceDbResult.h
|
||||||
include/alibabacloud/facebody/model/DeleteFaceRequest.h
|
include/alibabacloud/facebody/model/DeleteFaceRequest.h
|
||||||
@@ -71,6 +73,8 @@ set(facebody_public_header_model
|
|||||||
include/alibabacloud/facebody/model/FaceMakeupResult.h
|
include/alibabacloud/facebody/model/FaceMakeupResult.h
|
||||||
include/alibabacloud/facebody/model/FaceTidyupRequest.h
|
include/alibabacloud/facebody/model/FaceTidyupRequest.h
|
||||||
include/alibabacloud/facebody/model/FaceTidyupResult.h
|
include/alibabacloud/facebody/model/FaceTidyupResult.h
|
||||||
|
include/alibabacloud/facebody/model/GenerateHumanAnimeStyleRequest.h
|
||||||
|
include/alibabacloud/facebody/model/GenerateHumanAnimeStyleResult.h
|
||||||
include/alibabacloud/facebody/model/GetFaceEntityRequest.h
|
include/alibabacloud/facebody/model/GetFaceEntityRequest.h
|
||||||
include/alibabacloud/facebody/model/GetFaceEntityResult.h
|
include/alibabacloud/facebody/model/GetFaceEntityResult.h
|
||||||
include/alibabacloud/facebody/model/HandPostureRequest.h
|
include/alibabacloud/facebody/model/HandPostureRequest.h
|
||||||
@@ -110,6 +114,8 @@ set(facebody_src
|
|||||||
src/model/BodyPostureResult.cc
|
src/model/BodyPostureResult.cc
|
||||||
src/model/CompareFaceRequest.cc
|
src/model/CompareFaceRequest.cc
|
||||||
src/model/CompareFaceResult.cc
|
src/model/CompareFaceResult.cc
|
||||||
|
src/model/CountCrowdRequest.cc
|
||||||
|
src/model/CountCrowdResult.cc
|
||||||
src/model/CreateFaceDbRequest.cc
|
src/model/CreateFaceDbRequest.cc
|
||||||
src/model/CreateFaceDbResult.cc
|
src/model/CreateFaceDbResult.cc
|
||||||
src/model/DeleteFaceRequest.cc
|
src/model/DeleteFaceRequest.cc
|
||||||
@@ -150,6 +156,8 @@ set(facebody_src
|
|||||||
src/model/FaceMakeupResult.cc
|
src/model/FaceMakeupResult.cc
|
||||||
src/model/FaceTidyupRequest.cc
|
src/model/FaceTidyupRequest.cc
|
||||||
src/model/FaceTidyupResult.cc
|
src/model/FaceTidyupResult.cc
|
||||||
|
src/model/GenerateHumanAnimeStyleRequest.cc
|
||||||
|
src/model/GenerateHumanAnimeStyleResult.cc
|
||||||
src/model/GetFaceEntityRequest.cc
|
src/model/GetFaceEntityRequest.cc
|
||||||
src/model/GetFaceEntityResult.cc
|
src/model/GetFaceEntityResult.cc
|
||||||
src/model/HandPostureRequest.cc
|
src/model/HandPostureRequest.cc
|
||||||
|
|||||||
@@ -32,6 +32,8 @@
|
|||||||
#include "model/BodyPostureResult.h"
|
#include "model/BodyPostureResult.h"
|
||||||
#include "model/CompareFaceRequest.h"
|
#include "model/CompareFaceRequest.h"
|
||||||
#include "model/CompareFaceResult.h"
|
#include "model/CompareFaceResult.h"
|
||||||
|
#include "model/CountCrowdRequest.h"
|
||||||
|
#include "model/CountCrowdResult.h"
|
||||||
#include "model/CreateFaceDbRequest.h"
|
#include "model/CreateFaceDbRequest.h"
|
||||||
#include "model/CreateFaceDbResult.h"
|
#include "model/CreateFaceDbResult.h"
|
||||||
#include "model/DeleteFaceRequest.h"
|
#include "model/DeleteFaceRequest.h"
|
||||||
@@ -72,6 +74,8 @@
|
|||||||
#include "model/FaceMakeupResult.h"
|
#include "model/FaceMakeupResult.h"
|
||||||
#include "model/FaceTidyupRequest.h"
|
#include "model/FaceTidyupRequest.h"
|
||||||
#include "model/FaceTidyupResult.h"
|
#include "model/FaceTidyupResult.h"
|
||||||
|
#include "model/GenerateHumanAnimeStyleRequest.h"
|
||||||
|
#include "model/GenerateHumanAnimeStyleResult.h"
|
||||||
#include "model/GetFaceEntityRequest.h"
|
#include "model/GetFaceEntityRequest.h"
|
||||||
#include "model/GetFaceEntityResult.h"
|
#include "model/GetFaceEntityResult.h"
|
||||||
#include "model/HandPostureRequest.h"
|
#include "model/HandPostureRequest.h"
|
||||||
@@ -122,6 +126,9 @@ namespace AlibabaCloud
|
|||||||
typedef Outcome<Error, Model::CompareFaceResult> CompareFaceOutcome;
|
typedef Outcome<Error, Model::CompareFaceResult> CompareFaceOutcome;
|
||||||
typedef std::future<CompareFaceOutcome> CompareFaceOutcomeCallable;
|
typedef std::future<CompareFaceOutcome> CompareFaceOutcomeCallable;
|
||||||
typedef std::function<void(const FacebodyClient*, const Model::CompareFaceRequest&, const CompareFaceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CompareFaceAsyncHandler;
|
typedef std::function<void(const FacebodyClient*, const Model::CompareFaceRequest&, const CompareFaceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CompareFaceAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::CountCrowdResult> CountCrowdOutcome;
|
||||||
|
typedef std::future<CountCrowdOutcome> CountCrowdOutcomeCallable;
|
||||||
|
typedef std::function<void(const FacebodyClient*, const Model::CountCrowdRequest&, const CountCrowdOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CountCrowdAsyncHandler;
|
||||||
typedef Outcome<Error, Model::CreateFaceDbResult> CreateFaceDbOutcome;
|
typedef Outcome<Error, Model::CreateFaceDbResult> CreateFaceDbOutcome;
|
||||||
typedef std::future<CreateFaceDbOutcome> CreateFaceDbOutcomeCallable;
|
typedef std::future<CreateFaceDbOutcome> CreateFaceDbOutcomeCallable;
|
||||||
typedef std::function<void(const FacebodyClient*, const Model::CreateFaceDbRequest&, const CreateFaceDbOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateFaceDbAsyncHandler;
|
typedef std::function<void(const FacebodyClient*, const Model::CreateFaceDbRequest&, const CreateFaceDbOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateFaceDbAsyncHandler;
|
||||||
@@ -182,6 +189,9 @@ namespace AlibabaCloud
|
|||||||
typedef Outcome<Error, Model::FaceTidyupResult> FaceTidyupOutcome;
|
typedef Outcome<Error, Model::FaceTidyupResult> FaceTidyupOutcome;
|
||||||
typedef std::future<FaceTidyupOutcome> FaceTidyupOutcomeCallable;
|
typedef std::future<FaceTidyupOutcome> FaceTidyupOutcomeCallable;
|
||||||
typedef std::function<void(const FacebodyClient*, const Model::FaceTidyupRequest&, const FaceTidyupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> FaceTidyupAsyncHandler;
|
typedef std::function<void(const FacebodyClient*, const Model::FaceTidyupRequest&, const FaceTidyupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> FaceTidyupAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::GenerateHumanAnimeStyleResult> GenerateHumanAnimeStyleOutcome;
|
||||||
|
typedef std::future<GenerateHumanAnimeStyleOutcome> GenerateHumanAnimeStyleOutcomeCallable;
|
||||||
|
typedef std::function<void(const FacebodyClient*, const Model::GenerateHumanAnimeStyleRequest&, const GenerateHumanAnimeStyleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GenerateHumanAnimeStyleAsyncHandler;
|
||||||
typedef Outcome<Error, Model::GetFaceEntityResult> GetFaceEntityOutcome;
|
typedef Outcome<Error, Model::GetFaceEntityResult> GetFaceEntityOutcome;
|
||||||
typedef std::future<GetFaceEntityOutcome> GetFaceEntityOutcomeCallable;
|
typedef std::future<GetFaceEntityOutcome> GetFaceEntityOutcomeCallable;
|
||||||
typedef std::function<void(const FacebodyClient*, const Model::GetFaceEntityRequest&, const GetFaceEntityOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetFaceEntityAsyncHandler;
|
typedef std::function<void(const FacebodyClient*, const Model::GetFaceEntityRequest&, const GetFaceEntityOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetFaceEntityAsyncHandler;
|
||||||
@@ -241,6 +251,9 @@ namespace AlibabaCloud
|
|||||||
CompareFaceOutcome compareFace(const Model::CompareFaceRequest &request)const;
|
CompareFaceOutcome compareFace(const Model::CompareFaceRequest &request)const;
|
||||||
void compareFaceAsync(const Model::CompareFaceRequest& request, const CompareFaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
void compareFaceAsync(const Model::CompareFaceRequest& request, const CompareFaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
CompareFaceOutcomeCallable compareFaceCallable(const Model::CompareFaceRequest& request) const;
|
CompareFaceOutcomeCallable compareFaceCallable(const Model::CompareFaceRequest& request) const;
|
||||||
|
CountCrowdOutcome countCrowd(const Model::CountCrowdRequest &request)const;
|
||||||
|
void countCrowdAsync(const Model::CountCrowdRequest& request, const CountCrowdAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
CountCrowdOutcomeCallable countCrowdCallable(const Model::CountCrowdRequest& request) const;
|
||||||
CreateFaceDbOutcome createFaceDb(const Model::CreateFaceDbRequest &request)const;
|
CreateFaceDbOutcome createFaceDb(const Model::CreateFaceDbRequest &request)const;
|
||||||
void createFaceDbAsync(const Model::CreateFaceDbRequest& request, const CreateFaceDbAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
void createFaceDbAsync(const Model::CreateFaceDbRequest& request, const CreateFaceDbAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
CreateFaceDbOutcomeCallable createFaceDbCallable(const Model::CreateFaceDbRequest& request) const;
|
CreateFaceDbOutcomeCallable createFaceDbCallable(const Model::CreateFaceDbRequest& request) const;
|
||||||
@@ -301,6 +314,9 @@ namespace AlibabaCloud
|
|||||||
FaceTidyupOutcome faceTidyup(const Model::FaceTidyupRequest &request)const;
|
FaceTidyupOutcome faceTidyup(const Model::FaceTidyupRequest &request)const;
|
||||||
void faceTidyupAsync(const Model::FaceTidyupRequest& request, const FaceTidyupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
void faceTidyupAsync(const Model::FaceTidyupRequest& request, const FaceTidyupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
FaceTidyupOutcomeCallable faceTidyupCallable(const Model::FaceTidyupRequest& request) const;
|
FaceTidyupOutcomeCallable faceTidyupCallable(const Model::FaceTidyupRequest& request) const;
|
||||||
|
GenerateHumanAnimeStyleOutcome generateHumanAnimeStyle(const Model::GenerateHumanAnimeStyleRequest &request)const;
|
||||||
|
void generateHumanAnimeStyleAsync(const Model::GenerateHumanAnimeStyleRequest& request, const GenerateHumanAnimeStyleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
GenerateHumanAnimeStyleOutcomeCallable generateHumanAnimeStyleCallable(const Model::GenerateHumanAnimeStyleRequest& request) const;
|
||||||
GetFaceEntityOutcome getFaceEntity(const Model::GetFaceEntityRequest &request)const;
|
GetFaceEntityOutcome getFaceEntity(const Model::GetFaceEntityRequest &request)const;
|
||||||
void getFaceEntityAsync(const Model::GetFaceEntityRequest& request, const GetFaceEntityAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
void getFaceEntityAsync(const Model::GetFaceEntityRequest& request, const GetFaceEntityAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
GetFaceEntityOutcomeCallable getFaceEntityCallable(const Model::GetFaceEntityRequest& request) const;
|
GetFaceEntityOutcomeCallable getFaceEntityCallable(const Model::GetFaceEntityRequest& request) const;
|
||||||
|
|||||||
@@ -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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_FACEBODY_MODEL_COUNTCROWDREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_FACEBODY_MODEL_COUNTCROWDREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/facebody/FacebodyExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Facebody
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_FACEBODY_EXPORT CountCrowdRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
CountCrowdRequest();
|
||||||
|
~CountCrowdRequest();
|
||||||
|
|
||||||
|
bool getIsShow()const;
|
||||||
|
void setIsShow(bool isShow);
|
||||||
|
std::string getImageURL()const;
|
||||||
|
void setImageURL(const std::string& imageURL);
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool isShow_;
|
||||||
|
std::string imageURL_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_FACEBODY_MODEL_COUNTCROWDREQUEST_H_
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
/*
|
||||||
|
* 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_FACEBODY_MODEL_COUNTCROWDRESULT_H_
|
||||||
|
#define ALIBABACLOUD_FACEBODY_MODEL_COUNTCROWDRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/facebody/FacebodyExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Facebody
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_FACEBODY_EXPORT CountCrowdResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Data
|
||||||
|
{
|
||||||
|
int peopleNumber;
|
||||||
|
std::string hotMap;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
CountCrowdResult();
|
||||||
|
explicit CountCrowdResult(const std::string &payload);
|
||||||
|
~CountCrowdResult();
|
||||||
|
Data getData()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
Data data_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_FACEBODY_MODEL_COUNTCROWDRESULT_H_
|
||||||
@@ -30,17 +30,25 @@ namespace AlibabaCloud
|
|||||||
{
|
{
|
||||||
class ALIBABACLOUD_FACEBODY_EXPORT ExtractPedestrianFeatureAttributeRequest : public RpcServiceRequest
|
class ALIBABACLOUD_FACEBODY_EXPORT ExtractPedestrianFeatureAttributeRequest : public RpcServiceRequest
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
struct UrlList
|
||||||
|
{
|
||||||
|
std::string url;
|
||||||
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ExtractPedestrianFeatureAttributeRequest();
|
ExtractPedestrianFeatureAttributeRequest();
|
||||||
~ExtractPedestrianFeatureAttributeRequest();
|
~ExtractPedestrianFeatureAttributeRequest();
|
||||||
|
|
||||||
|
std::vector<UrlList> getUrlList()const;
|
||||||
|
void setUrlList(const std::vector<UrlList>& urlList);
|
||||||
std::string getMode()const;
|
std::string getMode()const;
|
||||||
void setMode(const std::string& mode);
|
void setMode(const std::string& mode);
|
||||||
std::string getImageURL()const;
|
std::string getImageURL()const;
|
||||||
void setImageURL(const std::string& imageURL);
|
void setImageURL(const std::string& imageURL);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
std::vector<UrlList> urlList_;
|
||||||
std::string mode_;
|
std::string mode_;
|
||||||
std::string imageURL_;
|
std::string imageURL_;
|
||||||
|
|
||||||
|
|||||||
@@ -34,12 +34,34 @@ namespace AlibabaCloud
|
|||||||
public:
|
public:
|
||||||
struct Data
|
struct Data
|
||||||
{
|
{
|
||||||
|
struct Element
|
||||||
|
{
|
||||||
|
std::string hair;
|
||||||
|
std::string upperType;
|
||||||
|
float upperTypeScore;
|
||||||
|
float qualityScore;
|
||||||
|
std::string lowerColor;
|
||||||
|
std::string gender;
|
||||||
|
std::string feature;
|
||||||
|
float upperColorScore;
|
||||||
|
float lowerColorScore;
|
||||||
|
float genderScore;
|
||||||
|
std::string objType;
|
||||||
|
float lowerTypeScore;
|
||||||
|
float hairScore;
|
||||||
|
std::string upperColor;
|
||||||
|
std::string lowerType;
|
||||||
|
float ageScore;
|
||||||
|
float objTypeScore;
|
||||||
|
std::string age;
|
||||||
|
};
|
||||||
std::string hair;
|
std::string hair;
|
||||||
std::string upperType;
|
std::string upperType;
|
||||||
float upperTypeScore;
|
float upperTypeScore;
|
||||||
float qualityScore;
|
float qualityScore;
|
||||||
std::string lowerColor;
|
std::string lowerColor;
|
||||||
std::string gender;
|
std::string gender;
|
||||||
|
std::vector<Element> elements;
|
||||||
std::string feature;
|
std::string feature;
|
||||||
float upperColorScore;
|
float upperColorScore;
|
||||||
float lowerColorScore;
|
float lowerColorScore;
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_FACEBODY_MODEL_GENERATEHUMANANIMESTYLEREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_FACEBODY_MODEL_GENERATEHUMANANIMESTYLEREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/facebody/FacebodyExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Facebody
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_FACEBODY_EXPORT GenerateHumanAnimeStyleRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
GenerateHumanAnimeStyleRequest();
|
||||||
|
~GenerateHumanAnimeStyleRequest();
|
||||||
|
|
||||||
|
std::string getImageURL()const;
|
||||||
|
void setImageURL(const std::string& imageURL);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string imageURL_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_FACEBODY_MODEL_GENERATEHUMANANIMESTYLEREQUEST_H_
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
* 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_FACEBODY_MODEL_GENERATEHUMANANIMESTYLERESULT_H_
|
||||||
|
#define ALIBABACLOUD_FACEBODY_MODEL_GENERATEHUMANANIMESTYLERESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/facebody/FacebodyExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Facebody
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_FACEBODY_EXPORT GenerateHumanAnimeStyleResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Data
|
||||||
|
{
|
||||||
|
std::string imageURL;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
GenerateHumanAnimeStyleResult();
|
||||||
|
explicit GenerateHumanAnimeStyleResult(const std::string &payload);
|
||||||
|
~GenerateHumanAnimeStyleResult();
|
||||||
|
Data getData()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
Data data_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_FACEBODY_MODEL_GENERATEHUMANANIMESTYLERESULT_H_
|
||||||
@@ -231,6 +231,42 @@ FacebodyClient::CompareFaceOutcomeCallable FacebodyClient::compareFaceCallable(c
|
|||||||
return task->get_future();
|
return task->get_future();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FacebodyClient::CountCrowdOutcome FacebodyClient::countCrowd(const CountCrowdRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return CountCrowdOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return CountCrowdOutcome(CountCrowdResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return CountCrowdOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void FacebodyClient::countCrowdAsync(const CountCrowdRequest& request, const CountCrowdAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, countCrowd(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
FacebodyClient::CountCrowdOutcomeCallable FacebodyClient::countCrowdCallable(const CountCrowdRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<CountCrowdOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->countCrowd(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
FacebodyClient::CreateFaceDbOutcome FacebodyClient::createFaceDb(const CreateFaceDbRequest &request) const
|
FacebodyClient::CreateFaceDbOutcome FacebodyClient::createFaceDb(const CreateFaceDbRequest &request) const
|
||||||
{
|
{
|
||||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
@@ -951,6 +987,42 @@ FacebodyClient::FaceTidyupOutcomeCallable FacebodyClient::faceTidyupCallable(con
|
|||||||
return task->get_future();
|
return task->get_future();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FacebodyClient::GenerateHumanAnimeStyleOutcome FacebodyClient::generateHumanAnimeStyle(const GenerateHumanAnimeStyleRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return GenerateHumanAnimeStyleOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return GenerateHumanAnimeStyleOutcome(GenerateHumanAnimeStyleResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return GenerateHumanAnimeStyleOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void FacebodyClient::generateHumanAnimeStyleAsync(const GenerateHumanAnimeStyleRequest& request, const GenerateHumanAnimeStyleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, generateHumanAnimeStyle(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
FacebodyClient::GenerateHumanAnimeStyleOutcomeCallable FacebodyClient::generateHumanAnimeStyleCallable(const GenerateHumanAnimeStyleRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<GenerateHumanAnimeStyleOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->generateHumanAnimeStyle(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
FacebodyClient::GetFaceEntityOutcome FacebodyClient::getFaceEntity(const GetFaceEntityRequest &request) const
|
FacebodyClient::GetFaceEntityOutcome FacebodyClient::getFaceEntity(const GetFaceEntityRequest &request) const
|
||||||
{
|
{
|
||||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
|||||||
@@ -46,20 +46,20 @@ void BodyPostureResult::parse(const std::string &payload)
|
|||||||
Data::Output outputObject;
|
Data::Output outputObject;
|
||||||
if(!dataNodeOutputsOutput["HumanCount"].isNull())
|
if(!dataNodeOutputsOutput["HumanCount"].isNull())
|
||||||
outputObject.humanCount = std::stoi(dataNodeOutputsOutput["HumanCount"].asString());
|
outputObject.humanCount = std::stoi(dataNodeOutputsOutput["HumanCount"].asString());
|
||||||
auto allResultsNode = allOutputsNode["Results"]["Result"];
|
auto allResultsNode = dataNodeOutputsOutput["Results"]["Result"];
|
||||||
for (auto allOutputsNodeResultsResult : allResultsNode)
|
for (auto dataNodeOutputsOutputResultsResult : allResultsNode)
|
||||||
{
|
{
|
||||||
Data::Output::Result resultsObject;
|
Data::Output::Result resultsObject;
|
||||||
auto allBodiesNode = allResultsNode["Bodies"]["Body"];
|
auto allBodiesNode = dataNodeOutputsOutputResultsResult["Bodies"]["Body"];
|
||||||
for (auto allResultsNodeBodiesBody : allBodiesNode)
|
for (auto dataNodeOutputsOutputResultsResultBodiesBody : allBodiesNode)
|
||||||
{
|
{
|
||||||
Data::Output::Result::Body bodiesObject;
|
Data::Output::Result::Body bodiesObject;
|
||||||
if(!allResultsNodeBodiesBody["Confident"].isNull())
|
if(!dataNodeOutputsOutputResultsResultBodiesBody["Confident"].isNull())
|
||||||
bodiesObject.confident = std::stof(allResultsNodeBodiesBody["Confident"].asString());
|
bodiesObject.confident = std::stof(dataNodeOutputsOutputResultsResultBodiesBody["Confident"].asString());
|
||||||
if(!allResultsNodeBodiesBody["Label"].isNull())
|
if(!dataNodeOutputsOutputResultsResultBodiesBody["Label"].isNull())
|
||||||
bodiesObject.label = allResultsNodeBodiesBody["Label"].asString();
|
bodiesObject.label = dataNodeOutputsOutputResultsResultBodiesBody["Label"].asString();
|
||||||
auto allPositionsNode = allBodiesNode["Positions"]["Position"];
|
auto allPositionsNode = dataNodeOutputsOutputResultsResultBodiesBody["Positions"]["Position"];
|
||||||
for (auto allBodiesNodePositionsPosition : allPositionsNode)
|
for (auto dataNodeOutputsOutputResultsResultBodiesBodyPositionsPosition : allPositionsNode)
|
||||||
{
|
{
|
||||||
Data::Output::Result::Body::Position positionsObject;
|
Data::Output::Result::Body::Position positionsObject;
|
||||||
auto allPoints = value["Points"]["Point"];
|
auto allPoints = value["Points"]["Point"];
|
||||||
|
|||||||
51
facebody/src/model/CountCrowdRequest.cc
Normal file
51
facebody/src/model/CountCrowdRequest.cc
Normal 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/facebody/model/CountCrowdRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Facebody::Model::CountCrowdRequest;
|
||||||
|
|
||||||
|
CountCrowdRequest::CountCrowdRequest() :
|
||||||
|
RpcServiceRequest("facebody", "2019-12-30", "CountCrowd")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
CountCrowdRequest::~CountCrowdRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
bool CountCrowdRequest::getIsShow()const
|
||||||
|
{
|
||||||
|
return isShow_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CountCrowdRequest::setIsShow(bool isShow)
|
||||||
|
{
|
||||||
|
isShow_ = isShow;
|
||||||
|
setBodyParameter("IsShow", isShow ? "true" : "false");
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string CountCrowdRequest::getImageURL()const
|
||||||
|
{
|
||||||
|
return imageURL_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CountCrowdRequest::setImageURL(const std::string& imageURL)
|
||||||
|
{
|
||||||
|
imageURL_ = imageURL;
|
||||||
|
setBodyParameter("ImageURL", imageURL);
|
||||||
|
}
|
||||||
|
|
||||||
54
facebody/src/model/CountCrowdResult.cc
Normal file
54
facebody/src/model/CountCrowdResult.cc
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
/*
|
||||||
|
* 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/facebody/model/CountCrowdResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Facebody;
|
||||||
|
using namespace AlibabaCloud::Facebody::Model;
|
||||||
|
|
||||||
|
CountCrowdResult::CountCrowdResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
CountCrowdResult::CountCrowdResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
CountCrowdResult::~CountCrowdResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void CountCrowdResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto dataNode = value["Data"];
|
||||||
|
if(!dataNode["PeopleNumber"].isNull())
|
||||||
|
data_.peopleNumber = std::stoi(dataNode["PeopleNumber"].asString());
|
||||||
|
if(!dataNode["HotMap"].isNull())
|
||||||
|
data_.hotMap = dataNode["HotMap"].asString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
CountCrowdResult::Data CountCrowdResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -50,12 +50,12 @@ void DetectIPCPedestrianResult::parse(const std::string &payload)
|
|||||||
imageInfoListItemObject.errorMessage = dataNodeImageInfoListImageInfoListItem["ErrorMessage"].asString();
|
imageInfoListItemObject.errorMessage = dataNodeImageInfoListImageInfoListItem["ErrorMessage"].asString();
|
||||||
if(!dataNodeImageInfoListImageInfoListItem["DataId"].isNull())
|
if(!dataNodeImageInfoListImageInfoListItem["DataId"].isNull())
|
||||||
imageInfoListItemObject.dataId = dataNodeImageInfoListImageInfoListItem["DataId"].asString();
|
imageInfoListItemObject.dataId = dataNodeImageInfoListImageInfoListItem["DataId"].asString();
|
||||||
auto allElementsNode = allImageInfoListNode["Elements"]["Element"];
|
auto allElementsNode = dataNodeImageInfoListImageInfoListItem["Elements"]["Element"];
|
||||||
for (auto allImageInfoListNodeElementsElement : allElementsNode)
|
for (auto dataNodeImageInfoListImageInfoListItemElementsElement : allElementsNode)
|
||||||
{
|
{
|
||||||
Data::ImageInfoListItem::Element elementsObject;
|
Data::ImageInfoListItem::Element elementsObject;
|
||||||
if(!allImageInfoListNodeElementsElement["Score"].isNull())
|
if(!dataNodeImageInfoListImageInfoListItemElementsElement["Score"].isNull())
|
||||||
elementsObject.score = std::stof(allImageInfoListNodeElementsElement["Score"].asString());
|
elementsObject.score = std::stof(dataNodeImageInfoListImageInfoListItemElementsElement["Score"].asString());
|
||||||
auto allBoxes = value["Boxes"]["Box"];
|
auto allBoxes = value["Boxes"]["Box"];
|
||||||
for (auto value : allBoxes)
|
for (auto value : allBoxes)
|
||||||
elementsObject.boxes.push_back(value.asString());
|
elementsObject.boxes.push_back(value.asString());
|
||||||
|
|||||||
@@ -48,24 +48,24 @@ void DetectLivingFaceResult::parse(const std::string &payload)
|
|||||||
elementObject.taskId = dataNodeElementsElement["TaskId"].asString();
|
elementObject.taskId = dataNodeElementsElement["TaskId"].asString();
|
||||||
if(!dataNodeElementsElement["ImageURL"].isNull())
|
if(!dataNodeElementsElement["ImageURL"].isNull())
|
||||||
elementObject.imageURL = dataNodeElementsElement["ImageURL"].asString();
|
elementObject.imageURL = dataNodeElementsElement["ImageURL"].asString();
|
||||||
auto allResultsNode = allElementsNode["Results"]["Result"];
|
auto allResultsNode = dataNodeElementsElement["Results"]["Result"];
|
||||||
for (auto allElementsNodeResultsResult : allResultsNode)
|
for (auto dataNodeElementsElementResultsResult : allResultsNode)
|
||||||
{
|
{
|
||||||
Data::Element::Result resultsObject;
|
Data::Element::Result resultsObject;
|
||||||
if(!allElementsNodeResultsResult["Label"].isNull())
|
if(!dataNodeElementsElementResultsResult["Label"].isNull())
|
||||||
resultsObject.label = allElementsNodeResultsResult["Label"].asString();
|
resultsObject.label = dataNodeElementsElementResultsResult["Label"].asString();
|
||||||
if(!allElementsNodeResultsResult["Suggestion"].isNull())
|
if(!dataNodeElementsElementResultsResult["Suggestion"].isNull())
|
||||||
resultsObject.suggestion = allElementsNodeResultsResult["Suggestion"].asString();
|
resultsObject.suggestion = dataNodeElementsElementResultsResult["Suggestion"].asString();
|
||||||
if(!allElementsNodeResultsResult["Rate"].isNull())
|
if(!dataNodeElementsElementResultsResult["Rate"].isNull())
|
||||||
resultsObject.rate = std::stof(allElementsNodeResultsResult["Rate"].asString());
|
resultsObject.rate = std::stof(dataNodeElementsElementResultsResult["Rate"].asString());
|
||||||
auto allFramesNode = allResultsNode["Frames"]["Frame"];
|
auto allFramesNode = dataNodeElementsElementResultsResult["Frames"]["Frame"];
|
||||||
for (auto allResultsNodeFramesFrame : allFramesNode)
|
for (auto dataNodeElementsElementResultsResultFramesFrame : allFramesNode)
|
||||||
{
|
{
|
||||||
Data::Element::Result::Frame framesObject;
|
Data::Element::Result::Frame framesObject;
|
||||||
if(!allResultsNodeFramesFrame["Rate"].isNull())
|
if(!dataNodeElementsElementResultsResultFramesFrame["Rate"].isNull())
|
||||||
framesObject.rate = std::stof(allResultsNodeFramesFrame["Rate"].asString());
|
framesObject.rate = std::stof(dataNodeElementsElementResultsResultFramesFrame["Rate"].asString());
|
||||||
if(!allResultsNodeFramesFrame["Url"].isNull())
|
if(!dataNodeElementsElementResultsResultFramesFrame["Url"].isNull())
|
||||||
framesObject.url = allResultsNodeFramesFrame["Url"].asString();
|
framesObject.url = dataNodeElementsElementResultsResultFramesFrame["Url"].asString();
|
||||||
resultsObject.frames.push_back(framesObject);
|
resultsObject.frames.push_back(framesObject);
|
||||||
}
|
}
|
||||||
elementObject.results.push_back(resultsObject);
|
elementObject.results.push_back(resultsObject);
|
||||||
|
|||||||
@@ -27,6 +27,21 @@ ExtractPedestrianFeatureAttributeRequest::ExtractPedestrianFeatureAttributeReque
|
|||||||
ExtractPedestrianFeatureAttributeRequest::~ExtractPedestrianFeatureAttributeRequest()
|
ExtractPedestrianFeatureAttributeRequest::~ExtractPedestrianFeatureAttributeRequest()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
std::vector<ExtractPedestrianFeatureAttributeRequest::UrlList> ExtractPedestrianFeatureAttributeRequest::getUrlList()const
|
||||||
|
{
|
||||||
|
return urlList_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ExtractPedestrianFeatureAttributeRequest::setUrlList(const std::vector<UrlList>& urlList)
|
||||||
|
{
|
||||||
|
urlList_ = urlList;
|
||||||
|
for(int dep1 = 0; dep1!= urlList.size(); dep1++) {
|
||||||
|
auto urlListObj = urlList.at(dep1);
|
||||||
|
std::string urlListObjStr = "UrlList." + std::to_string(dep1 + 1);
|
||||||
|
setParameter(urlListObjStr + ".Url", urlListObj.url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::string ExtractPedestrianFeatureAttributeRequest::getMode()const
|
std::string ExtractPedestrianFeatureAttributeRequest::getMode()const
|
||||||
{
|
{
|
||||||
return mode_;
|
return mode_;
|
||||||
|
|||||||
@@ -76,6 +76,48 @@ void ExtractPedestrianFeatureAttributeResult::parse(const std::string &payload)
|
|||||||
data_.age = dataNode["Age"].asString();
|
data_.age = dataNode["Age"].asString();
|
||||||
if(!dataNode["AgeScore"].isNull())
|
if(!dataNode["AgeScore"].isNull())
|
||||||
data_.ageScore = std::stof(dataNode["AgeScore"].asString());
|
data_.ageScore = std::stof(dataNode["AgeScore"].asString());
|
||||||
|
auto allElementsNode = dataNode["Elements"]["Element"];
|
||||||
|
for (auto dataNodeElementsElement : allElementsNode)
|
||||||
|
{
|
||||||
|
Data::Element elementObject;
|
||||||
|
if(!dataNodeElementsElement["ObjType"].isNull())
|
||||||
|
elementObject.objType = dataNodeElementsElement["ObjType"].asString();
|
||||||
|
if(!dataNodeElementsElement["ObjTypeScore"].isNull())
|
||||||
|
elementObject.objTypeScore = std::stof(dataNodeElementsElement["ObjTypeScore"].asString());
|
||||||
|
if(!dataNodeElementsElement["Feature"].isNull())
|
||||||
|
elementObject.feature = dataNodeElementsElement["Feature"].asString();
|
||||||
|
if(!dataNodeElementsElement["QualityScore"].isNull())
|
||||||
|
elementObject.qualityScore = std::stof(dataNodeElementsElement["QualityScore"].asString());
|
||||||
|
if(!dataNodeElementsElement["UpperColor"].isNull())
|
||||||
|
elementObject.upperColor = dataNodeElementsElement["UpperColor"].asString();
|
||||||
|
if(!dataNodeElementsElement["UpperColorScore"].isNull())
|
||||||
|
elementObject.upperColorScore = std::stof(dataNodeElementsElement["UpperColorScore"].asString());
|
||||||
|
if(!dataNodeElementsElement["UpperType"].isNull())
|
||||||
|
elementObject.upperType = dataNodeElementsElement["UpperType"].asString();
|
||||||
|
if(!dataNodeElementsElement["UpperTypeScore"].isNull())
|
||||||
|
elementObject.upperTypeScore = std::stof(dataNodeElementsElement["UpperTypeScore"].asString());
|
||||||
|
if(!dataNodeElementsElement["LowerColor"].isNull())
|
||||||
|
elementObject.lowerColor = dataNodeElementsElement["LowerColor"].asString();
|
||||||
|
if(!dataNodeElementsElement["LowerColorScore"].isNull())
|
||||||
|
elementObject.lowerColorScore = std::stof(dataNodeElementsElement["LowerColorScore"].asString());
|
||||||
|
if(!dataNodeElementsElement["LowerType"].isNull())
|
||||||
|
elementObject.lowerType = dataNodeElementsElement["LowerType"].asString();
|
||||||
|
if(!dataNodeElementsElement["LowerTypeScore"].isNull())
|
||||||
|
elementObject.lowerTypeScore = std::stof(dataNodeElementsElement["LowerTypeScore"].asString());
|
||||||
|
if(!dataNodeElementsElement["Gender"].isNull())
|
||||||
|
elementObject.gender = dataNodeElementsElement["Gender"].asString();
|
||||||
|
if(!dataNodeElementsElement["GenderScore"].isNull())
|
||||||
|
elementObject.genderScore = std::stof(dataNodeElementsElement["GenderScore"].asString());
|
||||||
|
if(!dataNodeElementsElement["Hair"].isNull())
|
||||||
|
elementObject.hair = dataNodeElementsElement["Hair"].asString();
|
||||||
|
if(!dataNodeElementsElement["HairScore"].isNull())
|
||||||
|
elementObject.hairScore = std::stof(dataNodeElementsElement["HairScore"].asString());
|
||||||
|
if(!dataNodeElementsElement["Age"].isNull())
|
||||||
|
elementObject.age = dataNodeElementsElement["Age"].asString();
|
||||||
|
if(!dataNodeElementsElement["AgeScore"].isNull())
|
||||||
|
elementObject.ageScore = std::stof(dataNodeElementsElement["AgeScore"].asString());
|
||||||
|
data_.elements.push_back(elementObject);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
40
facebody/src/model/GenerateHumanAnimeStyleRequest.cc
Normal file
40
facebody/src/model/GenerateHumanAnimeStyleRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <alibabacloud/facebody/model/GenerateHumanAnimeStyleRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Facebody::Model::GenerateHumanAnimeStyleRequest;
|
||||||
|
|
||||||
|
GenerateHumanAnimeStyleRequest::GenerateHumanAnimeStyleRequest() :
|
||||||
|
RpcServiceRequest("facebody", "2019-12-30", "GenerateHumanAnimeStyle")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
GenerateHumanAnimeStyleRequest::~GenerateHumanAnimeStyleRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
std::string GenerateHumanAnimeStyleRequest::getImageURL()const
|
||||||
|
{
|
||||||
|
return imageURL_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GenerateHumanAnimeStyleRequest::setImageURL(const std::string& imageURL)
|
||||||
|
{
|
||||||
|
imageURL_ = imageURL;
|
||||||
|
setBodyParameter("ImageURL", imageURL);
|
||||||
|
}
|
||||||
|
|
||||||
52
facebody/src/model/GenerateHumanAnimeStyleResult.cc
Normal file
52
facebody/src/model/GenerateHumanAnimeStyleResult.cc
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
* 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/facebody/model/GenerateHumanAnimeStyleResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Facebody;
|
||||||
|
using namespace AlibabaCloud::Facebody::Model;
|
||||||
|
|
||||||
|
GenerateHumanAnimeStyleResult::GenerateHumanAnimeStyleResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
GenerateHumanAnimeStyleResult::GenerateHumanAnimeStyleResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
GenerateHumanAnimeStyleResult::~GenerateHumanAnimeStyleResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void GenerateHumanAnimeStyleResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto dataNode = value["Data"];
|
||||||
|
if(!dataNode["ImageURL"].isNull())
|
||||||
|
data_.imageURL = dataNode["ImageURL"].asString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
GenerateHumanAnimeStyleResult::Data GenerateHumanAnimeStyleResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -46,8 +46,8 @@ void HandPostureResult::parse(const std::string &payload)
|
|||||||
Data::Output outputObject;
|
Data::Output outputObject;
|
||||||
if(!dataNodeOutputsOutput["HandCount"].isNull())
|
if(!dataNodeOutputsOutput["HandCount"].isNull())
|
||||||
outputObject.handCount = std::stoi(dataNodeOutputsOutput["HandCount"].asString());
|
outputObject.handCount = std::stoi(dataNodeOutputsOutput["HandCount"].asString());
|
||||||
auto allResultsNode = allOutputsNode["Results"]["Result"];
|
auto allResultsNode = dataNodeOutputsOutput["Results"]["Result"];
|
||||||
for (auto allOutputsNodeResultsResult : allResultsNode)
|
for (auto dataNodeOutputsOutputResultsResult : allResultsNode)
|
||||||
{
|
{
|
||||||
Data::Output::Result resultsObject;
|
Data::Output::Result resultsObject;
|
||||||
auto boxNode = value["Box"];
|
auto boxNode = value["Box"];
|
||||||
@@ -71,8 +71,8 @@ void HandPostureResult::parse(const std::string &payload)
|
|||||||
Data::Output::Result::Hands::KeyPoint keyPointObject;
|
Data::Output::Result::Hands::KeyPoint keyPointObject;
|
||||||
if(!handsNodeKeyPointsKeyPoint["Label"].isNull())
|
if(!handsNodeKeyPointsKeyPoint["Label"].isNull())
|
||||||
keyPointObject.label = handsNodeKeyPointsKeyPoint["Label"].asString();
|
keyPointObject.label = handsNodeKeyPointsKeyPoint["Label"].asString();
|
||||||
auto allPositions1Node = allKeyPointsNode["Positions"]["Position"];
|
auto allPositions1Node = handsNodeKeyPointsKeyPoint["Positions"]["Position"];
|
||||||
for (auto allKeyPointsNodePositionsPosition : allPositions1Node)
|
for (auto handsNodeKeyPointsKeyPointPositionsPosition : allPositions1Node)
|
||||||
{
|
{
|
||||||
Data::Output::Result::Hands::KeyPoint::Position2 positions1Object;
|
Data::Output::Result::Hands::KeyPoint::Position2 positions1Object;
|
||||||
auto allPoints3 = value["Points"]["Point"];
|
auto allPoints3 = value["Points"]["Point"];
|
||||||
|
|||||||
@@ -46,8 +46,8 @@ void RecognizeActionResult::parse(const std::string &payload)
|
|||||||
Data::Element elementObject;
|
Data::Element elementObject;
|
||||||
if(!dataNodeElementsElement["Timestamp"].isNull())
|
if(!dataNodeElementsElement["Timestamp"].isNull())
|
||||||
elementObject.timestamp = std::stoi(dataNodeElementsElement["Timestamp"].asString());
|
elementObject.timestamp = std::stoi(dataNodeElementsElement["Timestamp"].asString());
|
||||||
auto allBoxesNode = allElementsNode["Boxes"]["BoxesItem"];
|
auto allBoxesNode = dataNodeElementsElement["Boxes"]["BoxesItem"];
|
||||||
for (auto allElementsNodeBoxesBoxesItem : allBoxesNode)
|
for (auto dataNodeElementsElementBoxesBoxesItem : allBoxesNode)
|
||||||
{
|
{
|
||||||
Data::Element::BoxesItem boxesObject;
|
Data::Element::BoxesItem boxesObject;
|
||||||
auto allBox = value["Box"]["Box"];
|
auto allBox = value["Box"]["Box"];
|
||||||
|
|||||||
@@ -48,38 +48,38 @@ void RecognizePublicFaceResult::parse(const std::string &payload)
|
|||||||
elementObject.taskId = dataNodeElementsElement["TaskId"].asString();
|
elementObject.taskId = dataNodeElementsElement["TaskId"].asString();
|
||||||
if(!dataNodeElementsElement["ImageURL"].isNull())
|
if(!dataNodeElementsElement["ImageURL"].isNull())
|
||||||
elementObject.imageURL = dataNodeElementsElement["ImageURL"].asString();
|
elementObject.imageURL = dataNodeElementsElement["ImageURL"].asString();
|
||||||
auto allResultsNode = allElementsNode["Results"]["Result"];
|
auto allResultsNode = dataNodeElementsElement["Results"]["Result"];
|
||||||
for (auto allElementsNodeResultsResult : allResultsNode)
|
for (auto dataNodeElementsElementResultsResult : allResultsNode)
|
||||||
{
|
{
|
||||||
Data::Element::Result resultsObject;
|
Data::Element::Result resultsObject;
|
||||||
if(!allElementsNodeResultsResult["Label"].isNull())
|
if(!dataNodeElementsElementResultsResult["Label"].isNull())
|
||||||
resultsObject.label = allElementsNodeResultsResult["Label"].asString();
|
resultsObject.label = dataNodeElementsElementResultsResult["Label"].asString();
|
||||||
if(!allElementsNodeResultsResult["Suggestion"].isNull())
|
if(!dataNodeElementsElementResultsResult["Suggestion"].isNull())
|
||||||
resultsObject.suggestion = allElementsNodeResultsResult["Suggestion"].asString();
|
resultsObject.suggestion = dataNodeElementsElementResultsResult["Suggestion"].asString();
|
||||||
if(!allElementsNodeResultsResult["Rate"].isNull())
|
if(!dataNodeElementsElementResultsResult["Rate"].isNull())
|
||||||
resultsObject.rate = std::stof(allElementsNodeResultsResult["Rate"].asString());
|
resultsObject.rate = std::stof(dataNodeElementsElementResultsResult["Rate"].asString());
|
||||||
auto allSubResultsNode = allResultsNode["SubResults"]["SubResult"];
|
auto allSubResultsNode = dataNodeElementsElementResultsResult["SubResults"]["SubResult"];
|
||||||
for (auto allResultsNodeSubResultsSubResult : allSubResultsNode)
|
for (auto dataNodeElementsElementResultsResultSubResultsSubResult : allSubResultsNode)
|
||||||
{
|
{
|
||||||
Data::Element::Result::SubResult subResultsObject;
|
Data::Element::Result::SubResult subResultsObject;
|
||||||
if(!allResultsNodeSubResultsSubResult["H"].isNull())
|
if(!dataNodeElementsElementResultsResultSubResultsSubResult["H"].isNull())
|
||||||
subResultsObject.h = std::stof(allResultsNodeSubResultsSubResult["H"].asString());
|
subResultsObject.h = std::stof(dataNodeElementsElementResultsResultSubResultsSubResult["H"].asString());
|
||||||
if(!allResultsNodeSubResultsSubResult["W"].isNull())
|
if(!dataNodeElementsElementResultsResultSubResultsSubResult["W"].isNull())
|
||||||
subResultsObject.w = std::stof(allResultsNodeSubResultsSubResult["W"].asString());
|
subResultsObject.w = std::stof(dataNodeElementsElementResultsResultSubResultsSubResult["W"].asString());
|
||||||
if(!allResultsNodeSubResultsSubResult["X"].isNull())
|
if(!dataNodeElementsElementResultsResultSubResultsSubResult["X"].isNull())
|
||||||
subResultsObject.x = std::stof(allResultsNodeSubResultsSubResult["X"].asString());
|
subResultsObject.x = std::stof(dataNodeElementsElementResultsResultSubResultsSubResult["X"].asString());
|
||||||
if(!allResultsNodeSubResultsSubResult["Y"].isNull())
|
if(!dataNodeElementsElementResultsResultSubResultsSubResult["Y"].isNull())
|
||||||
subResultsObject.y = std::stof(allResultsNodeSubResultsSubResult["Y"].asString());
|
subResultsObject.y = std::stof(dataNodeElementsElementResultsResultSubResultsSubResult["Y"].asString());
|
||||||
auto allFacesNode = allSubResultsNode["Faces"]["Face"];
|
auto allFacesNode = dataNodeElementsElementResultsResultSubResultsSubResult["Faces"]["Face"];
|
||||||
for (auto allSubResultsNodeFacesFace : allFacesNode)
|
for (auto dataNodeElementsElementResultsResultSubResultsSubResultFacesFace : allFacesNode)
|
||||||
{
|
{
|
||||||
Data::Element::Result::SubResult::Face facesObject;
|
Data::Element::Result::SubResult::Face facesObject;
|
||||||
if(!allSubResultsNodeFacesFace["Id"].isNull())
|
if(!dataNodeElementsElementResultsResultSubResultsSubResultFacesFace["Id"].isNull())
|
||||||
facesObject.id = allSubResultsNodeFacesFace["Id"].asString();
|
facesObject.id = dataNodeElementsElementResultsResultSubResultsSubResultFacesFace["Id"].asString();
|
||||||
if(!allSubResultsNodeFacesFace["Name"].isNull())
|
if(!dataNodeElementsElementResultsResultSubResultsSubResultFacesFace["Name"].isNull())
|
||||||
facesObject.name = allSubResultsNodeFacesFace["Name"].asString();
|
facesObject.name = dataNodeElementsElementResultsResultSubResultsSubResultFacesFace["Name"].asString();
|
||||||
if(!allSubResultsNodeFacesFace["Rate"].isNull())
|
if(!dataNodeElementsElementResultsResultSubResultsSubResultFacesFace["Rate"].isNull())
|
||||||
facesObject.rate = std::stof(allSubResultsNodeFacesFace["Rate"].asString());
|
facesObject.rate = std::stof(dataNodeElementsElementResultsResultSubResultsSubResultFacesFace["Rate"].asString());
|
||||||
subResultsObject.faces.push_back(facesObject);
|
subResultsObject.faces.push_back(facesObject);
|
||||||
}
|
}
|
||||||
resultsObject.subResults.push_back(subResultsObject);
|
resultsObject.subResults.push_back(subResultsObject);
|
||||||
|
|||||||
@@ -44,18 +44,18 @@ void SearchFaceResult::parse(const std::string &payload)
|
|||||||
for (auto dataNodeMatchListMatchListItem : allMatchListNode)
|
for (auto dataNodeMatchListMatchListItem : allMatchListNode)
|
||||||
{
|
{
|
||||||
Data::MatchListItem matchListItemObject;
|
Data::MatchListItem matchListItemObject;
|
||||||
auto allFaceItemsNode = allMatchListNode["FaceItems"]["FaceItemsItem"];
|
auto allFaceItemsNode = dataNodeMatchListMatchListItem["FaceItems"]["FaceItemsItem"];
|
||||||
for (auto allMatchListNodeFaceItemsFaceItemsItem : allFaceItemsNode)
|
for (auto dataNodeMatchListMatchListItemFaceItemsFaceItemsItem : allFaceItemsNode)
|
||||||
{
|
{
|
||||||
Data::MatchListItem::FaceItemsItem faceItemsObject;
|
Data::MatchListItem::FaceItemsItem faceItemsObject;
|
||||||
if(!allMatchListNodeFaceItemsFaceItemsItem["FaceId"].isNull())
|
if(!dataNodeMatchListMatchListItemFaceItemsFaceItemsItem["FaceId"].isNull())
|
||||||
faceItemsObject.faceId = allMatchListNodeFaceItemsFaceItemsItem["FaceId"].asString();
|
faceItemsObject.faceId = dataNodeMatchListMatchListItemFaceItemsFaceItemsItem["FaceId"].asString();
|
||||||
if(!allMatchListNodeFaceItemsFaceItemsItem["Score"].isNull())
|
if(!dataNodeMatchListMatchListItemFaceItemsFaceItemsItem["Score"].isNull())
|
||||||
faceItemsObject.score = std::stof(allMatchListNodeFaceItemsFaceItemsItem["Score"].asString());
|
faceItemsObject.score = std::stof(dataNodeMatchListMatchListItemFaceItemsFaceItemsItem["Score"].asString());
|
||||||
if(!allMatchListNodeFaceItemsFaceItemsItem["ExtraData"].isNull())
|
if(!dataNodeMatchListMatchListItemFaceItemsFaceItemsItem["ExtraData"].isNull())
|
||||||
faceItemsObject.extraData = allMatchListNodeFaceItemsFaceItemsItem["ExtraData"].asString();
|
faceItemsObject.extraData = dataNodeMatchListMatchListItemFaceItemsFaceItemsItem["ExtraData"].asString();
|
||||||
if(!allMatchListNodeFaceItemsFaceItemsItem["EntityId"].isNull())
|
if(!dataNodeMatchListMatchListItemFaceItemsFaceItemsItem["EntityId"].isNull())
|
||||||
faceItemsObject.entityId = allMatchListNodeFaceItemsFaceItemsItem["EntityId"].asString();
|
faceItemsObject.entityId = dataNodeMatchListMatchListItemFaceItemsFaceItemsItem["EntityId"].asString();
|
||||||
matchListItemObject.faceItems.push_back(faceItemsObject);
|
matchListItemObject.faceItems.push_back(faceItemsObject);
|
||||||
}
|
}
|
||||||
auto locationNode = value["Location"];
|
auto locationNode = value["Location"];
|
||||||
|
|||||||
90
imageaudit/CMakeLists.txt
Normal file
90
imageaudit/CMakeLists.txt
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
||||||
|
|
||||||
|
set(imageaudit_public_header
|
||||||
|
include/alibabacloud/imageaudit/ImageauditClient.h
|
||||||
|
include/alibabacloud/imageaudit/ImageauditExport.h )
|
||||||
|
|
||||||
|
set(imageaudit_public_header_model
|
||||||
|
include/alibabacloud/imageaudit/model/ScanImageRequest.h
|
||||||
|
include/alibabacloud/imageaudit/model/ScanImageResult.h
|
||||||
|
include/alibabacloud/imageaudit/model/ScanTextRequest.h
|
||||||
|
include/alibabacloud/imageaudit/model/ScanTextResult.h )
|
||||||
|
|
||||||
|
set(imageaudit_src
|
||||||
|
src/ImageauditClient.cc
|
||||||
|
src/model/ScanImageRequest.cc
|
||||||
|
src/model/ScanImageResult.cc
|
||||||
|
src/model/ScanTextRequest.cc
|
||||||
|
src/model/ScanTextResult.cc )
|
||||||
|
|
||||||
|
add_library(imageaudit ${LIB_TYPE}
|
||||||
|
${imageaudit_public_header}
|
||||||
|
${imageaudit_public_header_model}
|
||||||
|
${imageaudit_src})
|
||||||
|
|
||||||
|
set_target_properties(imageaudit
|
||||||
|
PROPERTIES
|
||||||
|
LINKER_LANGUAGE CXX
|
||||||
|
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
|
||||||
|
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||||
|
OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}imageaudit
|
||||||
|
)
|
||||||
|
|
||||||
|
if(${LIB_TYPE} STREQUAL "SHARED")
|
||||||
|
set_target_properties(imageaudit
|
||||||
|
PROPERTIES
|
||||||
|
DEFINE_SYMBOL ALIBABACLOUD_IMAGEAUDIT_LIBRARY)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_include_directories(imageaudit
|
||||||
|
PRIVATE include
|
||||||
|
${CMAKE_SOURCE_DIR}/core/include
|
||||||
|
)
|
||||||
|
target_link_libraries(imageaudit
|
||||||
|
core)
|
||||||
|
|
||||||
|
if(CMAKE_HOST_WIN32)
|
||||||
|
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
|
||||||
|
set(jsoncpp_install_dir ${INSTALL_DIR})
|
||||||
|
add_dependencies(imageaudit
|
||||||
|
jsoncpp)
|
||||||
|
target_include_directories(imageaudit
|
||||||
|
PRIVATE ${jsoncpp_install_dir}/include)
|
||||||
|
target_link_libraries(imageaudit
|
||||||
|
${jsoncpp_install_dir}/lib/jsoncpp.lib)
|
||||||
|
set_target_properties(imageaudit
|
||||||
|
PROPERTIES
|
||||||
|
COMPILE_OPTIONS "/bigobj")
|
||||||
|
else()
|
||||||
|
target_include_directories(imageaudit
|
||||||
|
PRIVATE /usr/include/jsoncpp)
|
||||||
|
target_link_libraries(imageaudit
|
||||||
|
jsoncpp)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(FILES ${imageaudit_public_header}
|
||||||
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/imageaudit)
|
||||||
|
install(FILES ${imageaudit_public_header_model}
|
||||||
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/imageaudit/model)
|
||||||
|
install(TARGETS imageaudit
|
||||||
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
|
)
|
||||||
@@ -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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_IMAGEAUDIT_IMAGEAUDITCLIENT_H_
|
||||||
|
#define ALIBABACLOUD_IMAGEAUDIT_IMAGEAUDITCLIENT_H_
|
||||||
|
|
||||||
|
#include <future>
|
||||||
|
#include <alibabacloud/core/AsyncCallerContext.h>
|
||||||
|
#include <alibabacloud/core/EndpointProvider.h>
|
||||||
|
#include <alibabacloud/core/RpcServiceClient.h>
|
||||||
|
#include "ImageauditExport.h"
|
||||||
|
#include "model/ScanImageRequest.h"
|
||||||
|
#include "model/ScanImageResult.h"
|
||||||
|
#include "model/ScanTextRequest.h"
|
||||||
|
#include "model/ScanTextResult.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Imageaudit
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_IMAGEAUDIT_EXPORT ImageauditClient : public RpcServiceClient
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef Outcome<Error, Model::ScanImageResult> ScanImageOutcome;
|
||||||
|
typedef std::future<ScanImageOutcome> ScanImageOutcomeCallable;
|
||||||
|
typedef std::function<void(const ImageauditClient*, const Model::ScanImageRequest&, const ScanImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ScanImageAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::ScanTextResult> ScanTextOutcome;
|
||||||
|
typedef std::future<ScanTextOutcome> ScanTextOutcomeCallable;
|
||||||
|
typedef std::function<void(const ImageauditClient*, const Model::ScanTextRequest&, const ScanTextOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ScanTextAsyncHandler;
|
||||||
|
|
||||||
|
ImageauditClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||||
|
ImageauditClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||||
|
ImageauditClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||||
|
~ImageauditClient();
|
||||||
|
ScanImageOutcome scanImage(const Model::ScanImageRequest &request)const;
|
||||||
|
void scanImageAsync(const Model::ScanImageRequest& request, const ScanImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
ScanImageOutcomeCallable scanImageCallable(const Model::ScanImageRequest& request) const;
|
||||||
|
ScanTextOutcome scanText(const Model::ScanTextRequest &request)const;
|
||||||
|
void scanTextAsync(const Model::ScanTextRequest& request, const ScanTextAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
ScanTextOutcomeCallable scanTextCallable(const Model::ScanTextRequest& request) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // !ALIBABACLOUD_IMAGEAUDIT_IMAGEAUDITCLIENT_H_
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* 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_IMAGEAUDIT_IMAGEAUDITEXPORT_H_
|
||||||
|
#define ALIBABACLOUD_IMAGEAUDIT_IMAGEAUDITEXPORT_H_
|
||||||
|
|
||||||
|
#include <alibabacloud/core/Global.h>
|
||||||
|
|
||||||
|
#if defined(ALIBABACLOUD_SHARED)
|
||||||
|
# if defined(ALIBABACLOUD_IMAGEAUDIT_LIBRARY)
|
||||||
|
# define ALIBABACLOUD_IMAGEAUDIT_EXPORT ALIBABACLOUD_DECL_EXPORT
|
||||||
|
# else
|
||||||
|
# define ALIBABACLOUD_IMAGEAUDIT_EXPORT ALIBABACLOUD_DECL_IMPORT
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# define ALIBABACLOUD_IMAGEAUDIT_EXPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // !ALIBABACLOUD_IMAGEAUDIT_IMAGEAUDITEXPORT_H_
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_IMAGEAUDIT_MODEL_SCANIMAGEREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_IMAGEAUDIT_MODEL_SCANIMAGEREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/imageaudit/ImageauditExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Imageaudit
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_IMAGEAUDIT_EXPORT ScanImageRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Task
|
||||||
|
{
|
||||||
|
std::string dataId;
|
||||||
|
std::string imageURL;
|
||||||
|
int maxFrames;
|
||||||
|
int interval;
|
||||||
|
long imageTimeMillisecond;
|
||||||
|
};
|
||||||
|
|
||||||
|
public:
|
||||||
|
ScanImageRequest();
|
||||||
|
~ScanImageRequest();
|
||||||
|
|
||||||
|
std::vector<std::string> getScene()const;
|
||||||
|
void setScene(const std::vector<std::string>& scene);
|
||||||
|
std::vector<Task> getTask()const;
|
||||||
|
void setTask(const std::vector<Task>& task);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::vector<std::string> scene_;
|
||||||
|
std::vector<Task> task_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_IMAGEAUDIT_MODEL_SCANIMAGEREQUEST_H_
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
/*
|
||||||
|
* 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_IMAGEAUDIT_MODEL_SCANIMAGERESULT_H_
|
||||||
|
#define ALIBABACLOUD_IMAGEAUDIT_MODEL_SCANIMAGERESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/imageaudit/ImageauditExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Imageaudit
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_IMAGEAUDIT_EXPORT ScanImageResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Data
|
||||||
|
{
|
||||||
|
struct Result
|
||||||
|
{
|
||||||
|
struct SubResult
|
||||||
|
{
|
||||||
|
struct Frame
|
||||||
|
{
|
||||||
|
float rate;
|
||||||
|
std::string uRL;
|
||||||
|
};
|
||||||
|
struct HintWordsInfo
|
||||||
|
{
|
||||||
|
std::string context;
|
||||||
|
};
|
||||||
|
struct ProgramCodeData
|
||||||
|
{
|
||||||
|
float x;
|
||||||
|
float y;
|
||||||
|
float height;
|
||||||
|
float width;
|
||||||
|
};
|
||||||
|
struct LogoData
|
||||||
|
{
|
||||||
|
std::string type;
|
||||||
|
float x;
|
||||||
|
float y;
|
||||||
|
float height;
|
||||||
|
float width;
|
||||||
|
std::string name;
|
||||||
|
};
|
||||||
|
struct SfaceData
|
||||||
|
{
|
||||||
|
struct Face
|
||||||
|
{
|
||||||
|
float rate;
|
||||||
|
std::string id;
|
||||||
|
std::string name;
|
||||||
|
};
|
||||||
|
float x;
|
||||||
|
float y;
|
||||||
|
float height;
|
||||||
|
float width;
|
||||||
|
std::vector<SfaceData::Face> faces;
|
||||||
|
};
|
||||||
|
std::vector<SubResult::Frame> frames;
|
||||||
|
std::string suggestion;
|
||||||
|
std::vector<SubResult::SfaceData> sfaceDataList;
|
||||||
|
float rate;
|
||||||
|
std::vector<std::string> oCRDataList;
|
||||||
|
std::vector<SubResult::HintWordsInfo> hintWordsInfoList;
|
||||||
|
std::string label;
|
||||||
|
std::vector<SubResult::LogoData> logoDataList;
|
||||||
|
std::string scene;
|
||||||
|
std::vector<SubResult::ProgramCodeData> programCodeDataList;
|
||||||
|
};
|
||||||
|
std::string dataId;
|
||||||
|
std::string taskId;
|
||||||
|
std::string imageURL;
|
||||||
|
std::vector<Result::SubResult> subResults;
|
||||||
|
};
|
||||||
|
std::vector<Result> results;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
ScanImageResult();
|
||||||
|
explicit ScanImageResult(const std::string &payload);
|
||||||
|
~ScanImageResult();
|
||||||
|
Data getData()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
Data data_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_IMAGEAUDIT_MODEL_SCANIMAGERESULT_H_
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_IMAGEAUDIT_MODEL_SCANTEXTREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_IMAGEAUDIT_MODEL_SCANTEXTREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/imageaudit/ImageauditExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Imageaudit
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_IMAGEAUDIT_EXPORT ScanTextRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Labels
|
||||||
|
{
|
||||||
|
std::string label;
|
||||||
|
};
|
||||||
|
struct Tasks
|
||||||
|
{
|
||||||
|
std::string content;
|
||||||
|
};
|
||||||
|
|
||||||
|
public:
|
||||||
|
ScanTextRequest();
|
||||||
|
~ScanTextRequest();
|
||||||
|
|
||||||
|
std::vector<Labels> getLabels()const;
|
||||||
|
void setLabels(const std::vector<Labels>& labels);
|
||||||
|
std::vector<Tasks> getTasks()const;
|
||||||
|
void setTasks(const std::vector<Tasks>& tasks);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::vector<Labels> labels_;
|
||||||
|
std::vector<Tasks> tasks_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_IMAGEAUDIT_MODEL_SCANTEXTREQUEST_H_
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
/*
|
||||||
|
* 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_IMAGEAUDIT_MODEL_SCANTEXTRESULT_H_
|
||||||
|
#define ALIBABACLOUD_IMAGEAUDIT_MODEL_SCANTEXTRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/imageaudit/ImageauditExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Imageaudit
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_IMAGEAUDIT_EXPORT ScanTextResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Data
|
||||||
|
{
|
||||||
|
struct Element
|
||||||
|
{
|
||||||
|
struct Result
|
||||||
|
{
|
||||||
|
struct Detail
|
||||||
|
{
|
||||||
|
struct Context
|
||||||
|
{
|
||||||
|
std::string context;
|
||||||
|
};
|
||||||
|
std::string label;
|
||||||
|
std::vector<Detail::Context> contexts;
|
||||||
|
};
|
||||||
|
std::string suggestion;
|
||||||
|
std::vector<Result::Detail> details;
|
||||||
|
float rate;
|
||||||
|
std::string label;
|
||||||
|
};
|
||||||
|
std::string taskId;
|
||||||
|
std::vector<Element::Result> results;
|
||||||
|
};
|
||||||
|
std::vector<Element> elements;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
ScanTextResult();
|
||||||
|
explicit ScanTextResult(const std::string &payload);
|
||||||
|
~ScanTextResult();
|
||||||
|
Data getData()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
Data data_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_IMAGEAUDIT_MODEL_SCANTEXTRESULT_H_
|
||||||
125
imageaudit/src/ImageauditClient.cc
Normal file
125
imageaudit/src/ImageauditClient.cc
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
/*
|
||||||
|
* 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/imageaudit/ImageauditClient.h>
|
||||||
|
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud;
|
||||||
|
using namespace AlibabaCloud::Location;
|
||||||
|
using namespace AlibabaCloud::Imageaudit;
|
||||||
|
using namespace AlibabaCloud::Imageaudit::Model;
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
const std::string SERVICE_NAME = "imageaudit";
|
||||||
|
}
|
||||||
|
|
||||||
|
ImageauditClient::ImageauditClient(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, "imageaudit");
|
||||||
|
}
|
||||||
|
|
||||||
|
ImageauditClient::ImageauditClient(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, "imageaudit");
|
||||||
|
}
|
||||||
|
|
||||||
|
ImageauditClient::ImageauditClient(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, "imageaudit");
|
||||||
|
}
|
||||||
|
|
||||||
|
ImageauditClient::~ImageauditClient()
|
||||||
|
{}
|
||||||
|
|
||||||
|
ImageauditClient::ScanImageOutcome ImageauditClient::scanImage(const ScanImageRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return ScanImageOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return ScanImageOutcome(ScanImageResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return ScanImageOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImageauditClient::scanImageAsync(const ScanImageRequest& request, const ScanImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, scanImage(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
ImageauditClient::ScanImageOutcomeCallable ImageauditClient::scanImageCallable(const ScanImageRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<ScanImageOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->scanImage(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
|
ImageauditClient::ScanTextOutcome ImageauditClient::scanText(const ScanTextRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return ScanTextOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return ScanTextOutcome(ScanTextResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return ScanTextOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImageauditClient::scanTextAsync(const ScanTextRequest& request, const ScanTextAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, scanText(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
ImageauditClient::ScanTextOutcomeCallable ImageauditClient::scanTextCallable(const ScanTextRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<ScanTextOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->scanText(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
61
imageaudit/src/model/ScanImageRequest.cc
Normal file
61
imageaudit/src/model/ScanImageRequest.cc
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* 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/imageaudit/model/ScanImageRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Imageaudit::Model::ScanImageRequest;
|
||||||
|
|
||||||
|
ScanImageRequest::ScanImageRequest() :
|
||||||
|
RpcServiceRequest("imageaudit", "2019-12-30", "ScanImage")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
ScanImageRequest::~ScanImageRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
std::vector<std::string> ScanImageRequest::getScene()const
|
||||||
|
{
|
||||||
|
return scene_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScanImageRequest::setScene(const std::vector<std::string>& scene)
|
||||||
|
{
|
||||||
|
scene_ = scene;
|
||||||
|
for(int dep1 = 0; dep1!= scene.size(); dep1++) {
|
||||||
|
setBodyParameter("Scene."+ std::to_string(dep1), scene.at(dep1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<ScanImageRequest::Task> ScanImageRequest::getTask()const
|
||||||
|
{
|
||||||
|
return task_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScanImageRequest::setTask(const std::vector<Task>& task)
|
||||||
|
{
|
||||||
|
task_ = task;
|
||||||
|
for(int dep1 = 0; dep1!= task.size(); dep1++) {
|
||||||
|
auto taskObj = task.at(dep1);
|
||||||
|
std::string taskObjStr = "Task." + std::to_string(dep1 + 1);
|
||||||
|
setParameter(taskObjStr + ".DataId", taskObj.dataId);
|
||||||
|
setParameter(taskObjStr + ".ImageURL", taskObj.imageURL);
|
||||||
|
setParameter(taskObjStr + ".MaxFrames", std::to_string(taskObj.maxFrames));
|
||||||
|
setParameter(taskObjStr + ".Interval", std::to_string(taskObj.interval));
|
||||||
|
setParameter(taskObjStr + ".ImageTimeMillisecond", std::to_string(taskObj.imageTimeMillisecond));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
155
imageaudit/src/model/ScanImageResult.cc
Normal file
155
imageaudit/src/model/ScanImageResult.cc
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
/*
|
||||||
|
* 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/imageaudit/model/ScanImageResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Imageaudit;
|
||||||
|
using namespace AlibabaCloud::Imageaudit::Model;
|
||||||
|
|
||||||
|
ScanImageResult::ScanImageResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
ScanImageResult::ScanImageResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
ScanImageResult::~ScanImageResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void ScanImageResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto dataNode = value["Data"];
|
||||||
|
auto allResultsNode = dataNode["Results"]["Result"];
|
||||||
|
for (auto dataNodeResultsResult : allResultsNode)
|
||||||
|
{
|
||||||
|
Data::Result resultObject;
|
||||||
|
if(!dataNodeResultsResult["DataId"].isNull())
|
||||||
|
resultObject.dataId = dataNodeResultsResult["DataId"].asString();
|
||||||
|
if(!dataNodeResultsResult["TaskId"].isNull())
|
||||||
|
resultObject.taskId = dataNodeResultsResult["TaskId"].asString();
|
||||||
|
if(!dataNodeResultsResult["ImageURL"].isNull())
|
||||||
|
resultObject.imageURL = dataNodeResultsResult["ImageURL"].asString();
|
||||||
|
auto allSubResultsNode = dataNodeResultsResult["SubResults"]["SubResult"];
|
||||||
|
for (auto dataNodeResultsResultSubResultsSubResult : allSubResultsNode)
|
||||||
|
{
|
||||||
|
Data::Result::SubResult subResultsObject;
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResult["Label"].isNull())
|
||||||
|
subResultsObject.label = dataNodeResultsResultSubResultsSubResult["Label"].asString();
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResult["Suggestion"].isNull())
|
||||||
|
subResultsObject.suggestion = dataNodeResultsResultSubResultsSubResult["Suggestion"].asString();
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResult["Rate"].isNull())
|
||||||
|
subResultsObject.rate = std::stof(dataNodeResultsResultSubResultsSubResult["Rate"].asString());
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResult["Scene"].isNull())
|
||||||
|
subResultsObject.scene = dataNodeResultsResultSubResultsSubResult["Scene"].asString();
|
||||||
|
auto allFramesNode = dataNodeResultsResultSubResultsSubResult["Frames"]["Frame"];
|
||||||
|
for (auto dataNodeResultsResultSubResultsSubResultFramesFrame : allFramesNode)
|
||||||
|
{
|
||||||
|
Data::Result::SubResult::Frame framesObject;
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResultFramesFrame["Rate"].isNull())
|
||||||
|
framesObject.rate = std::stof(dataNodeResultsResultSubResultsSubResultFramesFrame["Rate"].asString());
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResultFramesFrame["URL"].isNull())
|
||||||
|
framesObject.uRL = dataNodeResultsResultSubResultsSubResultFramesFrame["URL"].asString();
|
||||||
|
subResultsObject.frames.push_back(framesObject);
|
||||||
|
}
|
||||||
|
auto allHintWordsInfoListNode = dataNodeResultsResultSubResultsSubResult["HintWordsInfoList"]["HintWordsInfo"];
|
||||||
|
for (auto dataNodeResultsResultSubResultsSubResultHintWordsInfoListHintWordsInfo : allHintWordsInfoListNode)
|
||||||
|
{
|
||||||
|
Data::Result::SubResult::HintWordsInfo hintWordsInfoListObject;
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResultHintWordsInfoListHintWordsInfo["Context"].isNull())
|
||||||
|
hintWordsInfoListObject.context = dataNodeResultsResultSubResultsSubResultHintWordsInfoListHintWordsInfo["Context"].asString();
|
||||||
|
subResultsObject.hintWordsInfoList.push_back(hintWordsInfoListObject);
|
||||||
|
}
|
||||||
|
auto allProgramCodeDataListNode = dataNodeResultsResultSubResultsSubResult["ProgramCodeDataList"]["ProgramCodeData"];
|
||||||
|
for (auto dataNodeResultsResultSubResultsSubResultProgramCodeDataListProgramCodeData : allProgramCodeDataListNode)
|
||||||
|
{
|
||||||
|
Data::Result::SubResult::ProgramCodeData programCodeDataListObject;
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResultProgramCodeDataListProgramCodeData["X"].isNull())
|
||||||
|
programCodeDataListObject.x = std::stof(dataNodeResultsResultSubResultsSubResultProgramCodeDataListProgramCodeData["X"].asString());
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResultProgramCodeDataListProgramCodeData["Y"].isNull())
|
||||||
|
programCodeDataListObject.y = std::stof(dataNodeResultsResultSubResultsSubResultProgramCodeDataListProgramCodeData["Y"].asString());
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResultProgramCodeDataListProgramCodeData["Width"].isNull())
|
||||||
|
programCodeDataListObject.width = std::stof(dataNodeResultsResultSubResultsSubResultProgramCodeDataListProgramCodeData["Width"].asString());
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResultProgramCodeDataListProgramCodeData["Height"].isNull())
|
||||||
|
programCodeDataListObject.height = std::stof(dataNodeResultsResultSubResultsSubResultProgramCodeDataListProgramCodeData["Height"].asString());
|
||||||
|
subResultsObject.programCodeDataList.push_back(programCodeDataListObject);
|
||||||
|
}
|
||||||
|
auto allLogoDataListNode = dataNodeResultsResultSubResultsSubResult["LogoDataList"]["LogoData"];
|
||||||
|
for (auto dataNodeResultsResultSubResultsSubResultLogoDataListLogoData : allLogoDataListNode)
|
||||||
|
{
|
||||||
|
Data::Result::SubResult::LogoData logoDataListObject;
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResultLogoDataListLogoData["Type"].isNull())
|
||||||
|
logoDataListObject.type = dataNodeResultsResultSubResultsSubResultLogoDataListLogoData["Type"].asString();
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResultLogoDataListLogoData["Name"].isNull())
|
||||||
|
logoDataListObject.name = dataNodeResultsResultSubResultsSubResultLogoDataListLogoData["Name"].asString();
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResultLogoDataListLogoData["X"].isNull())
|
||||||
|
logoDataListObject.x = std::stof(dataNodeResultsResultSubResultsSubResultLogoDataListLogoData["X"].asString());
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResultLogoDataListLogoData["Y"].isNull())
|
||||||
|
logoDataListObject.y = std::stof(dataNodeResultsResultSubResultsSubResultLogoDataListLogoData["Y"].asString());
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResultLogoDataListLogoData["Width"].isNull())
|
||||||
|
logoDataListObject.width = std::stof(dataNodeResultsResultSubResultsSubResultLogoDataListLogoData["Width"].asString());
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResultLogoDataListLogoData["Height"].isNull())
|
||||||
|
logoDataListObject.height = std::stof(dataNodeResultsResultSubResultsSubResultLogoDataListLogoData["Height"].asString());
|
||||||
|
subResultsObject.logoDataList.push_back(logoDataListObject);
|
||||||
|
}
|
||||||
|
auto allSfaceDataListNode = dataNodeResultsResultSubResultsSubResult["SfaceDataList"]["SfaceData"];
|
||||||
|
for (auto dataNodeResultsResultSubResultsSubResultSfaceDataListSfaceData : allSfaceDataListNode)
|
||||||
|
{
|
||||||
|
Data::Result::SubResult::SfaceData sfaceDataListObject;
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResultSfaceDataListSfaceData["X"].isNull())
|
||||||
|
sfaceDataListObject.x = std::stof(dataNodeResultsResultSubResultsSubResultSfaceDataListSfaceData["X"].asString());
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResultSfaceDataListSfaceData["Y"].isNull())
|
||||||
|
sfaceDataListObject.y = std::stof(dataNodeResultsResultSubResultsSubResultSfaceDataListSfaceData["Y"].asString());
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResultSfaceDataListSfaceData["Width"].isNull())
|
||||||
|
sfaceDataListObject.width = std::stof(dataNodeResultsResultSubResultsSubResultSfaceDataListSfaceData["Width"].asString());
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResultSfaceDataListSfaceData["Height"].isNull())
|
||||||
|
sfaceDataListObject.height = std::stof(dataNodeResultsResultSubResultsSubResultSfaceDataListSfaceData["Height"].asString());
|
||||||
|
auto allFacesNode = dataNodeResultsResultSubResultsSubResultSfaceDataListSfaceData["Faces"]["Face"];
|
||||||
|
for (auto dataNodeResultsResultSubResultsSubResultSfaceDataListSfaceDataFacesFace : allFacesNode)
|
||||||
|
{
|
||||||
|
Data::Result::SubResult::SfaceData::Face facesObject;
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResultSfaceDataListSfaceDataFacesFace["Name"].isNull())
|
||||||
|
facesObject.name = dataNodeResultsResultSubResultsSubResultSfaceDataListSfaceDataFacesFace["Name"].asString();
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResultSfaceDataListSfaceDataFacesFace["Rate"].isNull())
|
||||||
|
facesObject.rate = std::stof(dataNodeResultsResultSubResultsSubResultSfaceDataListSfaceDataFacesFace["Rate"].asString());
|
||||||
|
if(!dataNodeResultsResultSubResultsSubResultSfaceDataListSfaceDataFacesFace["Id"].isNull())
|
||||||
|
facesObject.id = dataNodeResultsResultSubResultsSubResultSfaceDataListSfaceDataFacesFace["Id"].asString();
|
||||||
|
sfaceDataListObject.faces.push_back(facesObject);
|
||||||
|
}
|
||||||
|
subResultsObject.sfaceDataList.push_back(sfaceDataListObject);
|
||||||
|
}
|
||||||
|
auto allOCRDataList = value["OCRDataList"]["OCRData"];
|
||||||
|
for (auto value : allOCRDataList)
|
||||||
|
subResultsObject.oCRDataList.push_back(value.asString());
|
||||||
|
resultObject.subResults.push_back(subResultsObject);
|
||||||
|
}
|
||||||
|
data_.results.push_back(resultObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ScanImageResult::Data ScanImageResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
59
imageaudit/src/model/ScanTextRequest.cc
Normal file
59
imageaudit/src/model/ScanTextRequest.cc
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
/*
|
||||||
|
* 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/imageaudit/model/ScanTextRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Imageaudit::Model::ScanTextRequest;
|
||||||
|
|
||||||
|
ScanTextRequest::ScanTextRequest() :
|
||||||
|
RpcServiceRequest("imageaudit", "2019-12-30", "ScanText")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
ScanTextRequest::~ScanTextRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
std::vector<ScanTextRequest::Labels> ScanTextRequest::getLabels()const
|
||||||
|
{
|
||||||
|
return labels_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScanTextRequest::setLabels(const std::vector<Labels>& labels)
|
||||||
|
{
|
||||||
|
labels_ = labels;
|
||||||
|
for(int dep1 = 0; dep1!= labels.size(); dep1++) {
|
||||||
|
auto labelsObj = labels.at(dep1);
|
||||||
|
std::string labelsObjStr = "Labels." + std::to_string(dep1 + 1);
|
||||||
|
setParameter(labelsObjStr + ".Label", labelsObj.label);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<ScanTextRequest::Tasks> ScanTextRequest::getTasks()const
|
||||||
|
{
|
||||||
|
return tasks_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScanTextRequest::setTasks(const std::vector<Tasks>& tasks)
|
||||||
|
{
|
||||||
|
tasks_ = tasks;
|
||||||
|
for(int dep1 = 0; dep1!= tasks.size(); dep1++) {
|
||||||
|
auto tasksObj = tasks.at(dep1);
|
||||||
|
std::string tasksObjStr = "Tasks." + std::to_string(dep1 + 1);
|
||||||
|
setParameter(tasksObjStr + ".Content", tasksObj.content);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
86
imageaudit/src/model/ScanTextResult.cc
Normal file
86
imageaudit/src/model/ScanTextResult.cc
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <alibabacloud/imageaudit/model/ScanTextResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Imageaudit;
|
||||||
|
using namespace AlibabaCloud::Imageaudit::Model;
|
||||||
|
|
||||||
|
ScanTextResult::ScanTextResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
ScanTextResult::ScanTextResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
ScanTextResult::~ScanTextResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void ScanTextResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto dataNode = value["Data"];
|
||||||
|
auto allElementsNode = dataNode["Elements"]["Element"];
|
||||||
|
for (auto dataNodeElementsElement : allElementsNode)
|
||||||
|
{
|
||||||
|
Data::Element elementObject;
|
||||||
|
if(!dataNodeElementsElement["TaskId"].isNull())
|
||||||
|
elementObject.taskId = dataNodeElementsElement["TaskId"].asString();
|
||||||
|
auto allResultsNode = dataNodeElementsElement["Results"]["Result"];
|
||||||
|
for (auto dataNodeElementsElementResultsResult : allResultsNode)
|
||||||
|
{
|
||||||
|
Data::Element::Result resultsObject;
|
||||||
|
if(!dataNodeElementsElementResultsResult["Label"].isNull())
|
||||||
|
resultsObject.label = dataNodeElementsElementResultsResult["Label"].asString();
|
||||||
|
if(!dataNodeElementsElementResultsResult["Suggestion"].isNull())
|
||||||
|
resultsObject.suggestion = dataNodeElementsElementResultsResult["Suggestion"].asString();
|
||||||
|
if(!dataNodeElementsElementResultsResult["Rate"].isNull())
|
||||||
|
resultsObject.rate = std::stof(dataNodeElementsElementResultsResult["Rate"].asString());
|
||||||
|
auto allDetailsNode = dataNodeElementsElementResultsResult["Details"]["Detail"];
|
||||||
|
for (auto dataNodeElementsElementResultsResultDetailsDetail : allDetailsNode)
|
||||||
|
{
|
||||||
|
Data::Element::Result::Detail detailsObject;
|
||||||
|
if(!dataNodeElementsElementResultsResultDetailsDetail["Label"].isNull())
|
||||||
|
detailsObject.label = dataNodeElementsElementResultsResultDetailsDetail["Label"].asString();
|
||||||
|
auto allContextsNode = dataNodeElementsElementResultsResultDetailsDetail["Contexts"]["Context"];
|
||||||
|
for (auto dataNodeElementsElementResultsResultDetailsDetailContextsContext : allContextsNode)
|
||||||
|
{
|
||||||
|
Data::Element::Result::Detail::Context contextsObject;
|
||||||
|
if(!dataNodeElementsElementResultsResultDetailsDetailContextsContext["Context"].isNull())
|
||||||
|
contextsObject.context = dataNodeElementsElementResultsResultDetailsDetailContextsContext["Context"].asString();
|
||||||
|
detailsObject.contexts.push_back(contextsObject);
|
||||||
|
}
|
||||||
|
resultsObject.details.push_back(detailsObject);
|
||||||
|
}
|
||||||
|
elementObject.results.push_back(resultsObject);
|
||||||
|
}
|
||||||
|
data_.elements.push_back(elementObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ScanTextResult::Data ScanTextResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -31,6 +31,8 @@ set(imageenhan_public_header_model
|
|||||||
include/alibabacloud/imageenhan/model/ChangeImageSizeResult.h
|
include/alibabacloud/imageenhan/model/ChangeImageSizeResult.h
|
||||||
include/alibabacloud/imageenhan/model/EnhanceImageColorRequest.h
|
include/alibabacloud/imageenhan/model/EnhanceImageColorRequest.h
|
||||||
include/alibabacloud/imageenhan/model/EnhanceImageColorResult.h
|
include/alibabacloud/imageenhan/model/EnhanceImageColorResult.h
|
||||||
|
include/alibabacloud/imageenhan/model/ErasePersonRequest.h
|
||||||
|
include/alibabacloud/imageenhan/model/ErasePersonResult.h
|
||||||
include/alibabacloud/imageenhan/model/ExtendImageStyleRequest.h
|
include/alibabacloud/imageenhan/model/ExtendImageStyleRequest.h
|
||||||
include/alibabacloud/imageenhan/model/ExtendImageStyleResult.h
|
include/alibabacloud/imageenhan/model/ExtendImageStyleResult.h
|
||||||
include/alibabacloud/imageenhan/model/GenerateDynamicImageRequest.h
|
include/alibabacloud/imageenhan/model/GenerateDynamicImageRequest.h
|
||||||
@@ -68,6 +70,8 @@ set(imageenhan_src
|
|||||||
src/model/ChangeImageSizeResult.cc
|
src/model/ChangeImageSizeResult.cc
|
||||||
src/model/EnhanceImageColorRequest.cc
|
src/model/EnhanceImageColorRequest.cc
|
||||||
src/model/EnhanceImageColorResult.cc
|
src/model/EnhanceImageColorResult.cc
|
||||||
|
src/model/ErasePersonRequest.cc
|
||||||
|
src/model/ErasePersonResult.cc
|
||||||
src/model/ExtendImageStyleRequest.cc
|
src/model/ExtendImageStyleRequest.cc
|
||||||
src/model/ExtendImageStyleResult.cc
|
src/model/ExtendImageStyleResult.cc
|
||||||
src/model/GenerateDynamicImageRequest.cc
|
src/model/GenerateDynamicImageRequest.cc
|
||||||
|
|||||||
@@ -32,6 +32,8 @@
|
|||||||
#include "model/ChangeImageSizeResult.h"
|
#include "model/ChangeImageSizeResult.h"
|
||||||
#include "model/EnhanceImageColorRequest.h"
|
#include "model/EnhanceImageColorRequest.h"
|
||||||
#include "model/EnhanceImageColorResult.h"
|
#include "model/EnhanceImageColorResult.h"
|
||||||
|
#include "model/ErasePersonRequest.h"
|
||||||
|
#include "model/ErasePersonResult.h"
|
||||||
#include "model/ExtendImageStyleRequest.h"
|
#include "model/ExtendImageStyleRequest.h"
|
||||||
#include "model/ExtendImageStyleResult.h"
|
#include "model/ExtendImageStyleResult.h"
|
||||||
#include "model/GenerateDynamicImageRequest.h"
|
#include "model/GenerateDynamicImageRequest.h"
|
||||||
@@ -80,6 +82,9 @@ namespace AlibabaCloud
|
|||||||
typedef Outcome<Error, Model::EnhanceImageColorResult> EnhanceImageColorOutcome;
|
typedef Outcome<Error, Model::EnhanceImageColorResult> EnhanceImageColorOutcome;
|
||||||
typedef std::future<EnhanceImageColorOutcome> EnhanceImageColorOutcomeCallable;
|
typedef std::future<EnhanceImageColorOutcome> EnhanceImageColorOutcomeCallable;
|
||||||
typedef std::function<void(const ImageenhanClient*, const Model::EnhanceImageColorRequest&, const EnhanceImageColorOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> EnhanceImageColorAsyncHandler;
|
typedef std::function<void(const ImageenhanClient*, const Model::EnhanceImageColorRequest&, const EnhanceImageColorOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> EnhanceImageColorAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::ErasePersonResult> ErasePersonOutcome;
|
||||||
|
typedef std::future<ErasePersonOutcome> ErasePersonOutcomeCallable;
|
||||||
|
typedef std::function<void(const ImageenhanClient*, const Model::ErasePersonRequest&, const ErasePersonOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ErasePersonAsyncHandler;
|
||||||
typedef Outcome<Error, Model::ExtendImageStyleResult> ExtendImageStyleOutcome;
|
typedef Outcome<Error, Model::ExtendImageStyleResult> ExtendImageStyleOutcome;
|
||||||
typedef std::future<ExtendImageStyleOutcome> ExtendImageStyleOutcomeCallable;
|
typedef std::future<ExtendImageStyleOutcome> ExtendImageStyleOutcomeCallable;
|
||||||
typedef std::function<void(const ImageenhanClient*, const Model::ExtendImageStyleRequest&, const ExtendImageStyleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ExtendImageStyleAsyncHandler;
|
typedef std::function<void(const ImageenhanClient*, const Model::ExtendImageStyleRequest&, const ExtendImageStyleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ExtendImageStyleAsyncHandler;
|
||||||
@@ -136,6 +141,9 @@ namespace AlibabaCloud
|
|||||||
EnhanceImageColorOutcome enhanceImageColor(const Model::EnhanceImageColorRequest &request)const;
|
EnhanceImageColorOutcome enhanceImageColor(const Model::EnhanceImageColorRequest &request)const;
|
||||||
void enhanceImageColorAsync(const Model::EnhanceImageColorRequest& request, const EnhanceImageColorAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
void enhanceImageColorAsync(const Model::EnhanceImageColorRequest& request, const EnhanceImageColorAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
EnhanceImageColorOutcomeCallable enhanceImageColorCallable(const Model::EnhanceImageColorRequest& request) const;
|
EnhanceImageColorOutcomeCallable enhanceImageColorCallable(const Model::EnhanceImageColorRequest& request) const;
|
||||||
|
ErasePersonOutcome erasePerson(const Model::ErasePersonRequest &request)const;
|
||||||
|
void erasePersonAsync(const Model::ErasePersonRequest& request, const ErasePersonAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
ErasePersonOutcomeCallable erasePersonCallable(const Model::ErasePersonRequest& request) const;
|
||||||
ExtendImageStyleOutcome extendImageStyle(const Model::ExtendImageStyleRequest &request)const;
|
ExtendImageStyleOutcome extendImageStyle(const Model::ExtendImageStyleRequest &request)const;
|
||||||
void extendImageStyleAsync(const Model::ExtendImageStyleRequest& request, const ExtendImageStyleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
void extendImageStyleAsync(const Model::ExtendImageStyleRequest& request, const ExtendImageStyleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
ExtendImageStyleOutcomeCallable extendImageStyleCallable(const Model::ExtendImageStyleRequest& request) const;
|
ExtendImageStyleOutcomeCallable extendImageStyleCallable(const Model::ExtendImageStyleRequest& request) const;
|
||||||
|
|||||||
@@ -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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_IMAGEENHAN_MODEL_ERASEPERSONREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_IMAGEENHAN_MODEL_ERASEPERSONREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/imageenhan/ImageenhanExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Imageenhan
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_IMAGEENHAN_EXPORT ErasePersonRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
ErasePersonRequest();
|
||||||
|
~ErasePersonRequest();
|
||||||
|
|
||||||
|
std::string getImageURL()const;
|
||||||
|
void setImageURL(const std::string& imageURL);
|
||||||
|
std::string getUserMask()const;
|
||||||
|
void setUserMask(const std::string& userMask);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string imageURL_;
|
||||||
|
std::string userMask_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_IMAGEENHAN_MODEL_ERASEPERSONREQUEST_H_
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
* 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_IMAGEENHAN_MODEL_ERASEPERSONRESULT_H_
|
||||||
|
#define ALIBABACLOUD_IMAGEENHAN_MODEL_ERASEPERSONRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/imageenhan/ImageenhanExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Imageenhan
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_IMAGEENHAN_EXPORT ErasePersonResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Data
|
||||||
|
{
|
||||||
|
std::string imageUrl;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
ErasePersonResult();
|
||||||
|
explicit ErasePersonResult(const std::string &payload);
|
||||||
|
~ErasePersonResult();
|
||||||
|
Data getData()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
Data data_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_IMAGEENHAN_MODEL_ERASEPERSONRESULT_H_
|
||||||
@@ -231,6 +231,42 @@ ImageenhanClient::EnhanceImageColorOutcomeCallable ImageenhanClient::enhanceImag
|
|||||||
return task->get_future();
|
return task->get_future();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImageenhanClient::ErasePersonOutcome ImageenhanClient::erasePerson(const ErasePersonRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return ErasePersonOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return ErasePersonOutcome(ErasePersonResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return ErasePersonOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImageenhanClient::erasePersonAsync(const ErasePersonRequest& request, const ErasePersonAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, erasePerson(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
ImageenhanClient::ErasePersonOutcomeCallable ImageenhanClient::erasePersonCallable(const ErasePersonRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<ErasePersonOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->erasePerson(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
ImageenhanClient::ExtendImageStyleOutcome ImageenhanClient::extendImageStyle(const ExtendImageStyleRequest &request) const
|
ImageenhanClient::ExtendImageStyleOutcome ImageenhanClient::extendImageStyle(const ExtendImageStyleRequest &request) const
|
||||||
{
|
{
|
||||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
|||||||
51
imageenhan/src/model/ErasePersonRequest.cc
Normal file
51
imageenhan/src/model/ErasePersonRequest.cc
Normal 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/imageenhan/model/ErasePersonRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Imageenhan::Model::ErasePersonRequest;
|
||||||
|
|
||||||
|
ErasePersonRequest::ErasePersonRequest() :
|
||||||
|
RpcServiceRequest("imageenhan", "2019-09-30", "ErasePerson")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
ErasePersonRequest::~ErasePersonRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
std::string ErasePersonRequest::getImageURL()const
|
||||||
|
{
|
||||||
|
return imageURL_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ErasePersonRequest::setImageURL(const std::string& imageURL)
|
||||||
|
{
|
||||||
|
imageURL_ = imageURL;
|
||||||
|
setBodyParameter("ImageURL", imageURL);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ErasePersonRequest::getUserMask()const
|
||||||
|
{
|
||||||
|
return userMask_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ErasePersonRequest::setUserMask(const std::string& userMask)
|
||||||
|
{
|
||||||
|
userMask_ = userMask;
|
||||||
|
setBodyParameter("UserMask", userMask);
|
||||||
|
}
|
||||||
|
|
||||||
52
imageenhan/src/model/ErasePersonResult.cc
Normal file
52
imageenhan/src/model/ErasePersonResult.cc
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
* 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/imageenhan/model/ErasePersonResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Imageenhan;
|
||||||
|
using namespace AlibabaCloud::Imageenhan::Model;
|
||||||
|
|
||||||
|
ErasePersonResult::ErasePersonResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
ErasePersonResult::ErasePersonResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
ErasePersonResult::~ErasePersonResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void ErasePersonResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto dataNode = value["Data"];
|
||||||
|
if(!dataNode["ImageUrl"].isNull())
|
||||||
|
data_.imageUrl = dataNode["ImageUrl"].asString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ErasePersonResult::Data ErasePersonResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -47,6 +47,10 @@ set(imageseg_public_header_model
|
|||||||
include/alibabacloud/imageseg/model/SegmentFurnitureResult.h
|
include/alibabacloud/imageseg/model/SegmentFurnitureResult.h
|
||||||
include/alibabacloud/imageseg/model/SegmentHDBodyRequest.h
|
include/alibabacloud/imageseg/model/SegmentHDBodyRequest.h
|
||||||
include/alibabacloud/imageseg/model/SegmentHDBodyResult.h
|
include/alibabacloud/imageseg/model/SegmentHDBodyResult.h
|
||||||
|
include/alibabacloud/imageseg/model/SegmentHDCommonImageRequest.h
|
||||||
|
include/alibabacloud/imageseg/model/SegmentHDCommonImageResult.h
|
||||||
|
include/alibabacloud/imageseg/model/SegmentHDSkyRequest.h
|
||||||
|
include/alibabacloud/imageseg/model/SegmentHDSkyResult.h
|
||||||
include/alibabacloud/imageseg/model/SegmentHairRequest.h
|
include/alibabacloud/imageseg/model/SegmentHairRequest.h
|
||||||
include/alibabacloud/imageseg/model/SegmentHairResult.h
|
include/alibabacloud/imageseg/model/SegmentHairResult.h
|
||||||
include/alibabacloud/imageseg/model/SegmentHeadRequest.h
|
include/alibabacloud/imageseg/model/SegmentHeadRequest.h
|
||||||
@@ -90,6 +94,10 @@ set(imageseg_src
|
|||||||
src/model/SegmentFurnitureResult.cc
|
src/model/SegmentFurnitureResult.cc
|
||||||
src/model/SegmentHDBodyRequest.cc
|
src/model/SegmentHDBodyRequest.cc
|
||||||
src/model/SegmentHDBodyResult.cc
|
src/model/SegmentHDBodyResult.cc
|
||||||
|
src/model/SegmentHDCommonImageRequest.cc
|
||||||
|
src/model/SegmentHDCommonImageResult.cc
|
||||||
|
src/model/SegmentHDSkyRequest.cc
|
||||||
|
src/model/SegmentHDSkyResult.cc
|
||||||
src/model/SegmentHairRequest.cc
|
src/model/SegmentHairRequest.cc
|
||||||
src/model/SegmentHairResult.cc
|
src/model/SegmentHairResult.cc
|
||||||
src/model/SegmentHeadRequest.cc
|
src/model/SegmentHeadRequest.cc
|
||||||
|
|||||||
@@ -48,6 +48,10 @@
|
|||||||
#include "model/SegmentFurnitureResult.h"
|
#include "model/SegmentFurnitureResult.h"
|
||||||
#include "model/SegmentHDBodyRequest.h"
|
#include "model/SegmentHDBodyRequest.h"
|
||||||
#include "model/SegmentHDBodyResult.h"
|
#include "model/SegmentHDBodyResult.h"
|
||||||
|
#include "model/SegmentHDCommonImageRequest.h"
|
||||||
|
#include "model/SegmentHDCommonImageResult.h"
|
||||||
|
#include "model/SegmentHDSkyRequest.h"
|
||||||
|
#include "model/SegmentHDSkyResult.h"
|
||||||
#include "model/SegmentHairRequest.h"
|
#include "model/SegmentHairRequest.h"
|
||||||
#include "model/SegmentHairResult.h"
|
#include "model/SegmentHairResult.h"
|
||||||
#include "model/SegmentHeadRequest.h"
|
#include "model/SegmentHeadRequest.h"
|
||||||
@@ -110,6 +114,12 @@ namespace AlibabaCloud
|
|||||||
typedef Outcome<Error, Model::SegmentHDBodyResult> SegmentHDBodyOutcome;
|
typedef Outcome<Error, Model::SegmentHDBodyResult> SegmentHDBodyOutcome;
|
||||||
typedef std::future<SegmentHDBodyOutcome> SegmentHDBodyOutcomeCallable;
|
typedef std::future<SegmentHDBodyOutcome> SegmentHDBodyOutcomeCallable;
|
||||||
typedef std::function<void(const ImagesegClient*, const Model::SegmentHDBodyRequest&, const SegmentHDBodyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SegmentHDBodyAsyncHandler;
|
typedef std::function<void(const ImagesegClient*, const Model::SegmentHDBodyRequest&, const SegmentHDBodyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SegmentHDBodyAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::SegmentHDCommonImageResult> SegmentHDCommonImageOutcome;
|
||||||
|
typedef std::future<SegmentHDCommonImageOutcome> SegmentHDCommonImageOutcomeCallable;
|
||||||
|
typedef std::function<void(const ImagesegClient*, const Model::SegmentHDCommonImageRequest&, const SegmentHDCommonImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SegmentHDCommonImageAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::SegmentHDSkyResult> SegmentHDSkyOutcome;
|
||||||
|
typedef std::future<SegmentHDSkyOutcome> SegmentHDSkyOutcomeCallable;
|
||||||
|
typedef std::function<void(const ImagesegClient*, const Model::SegmentHDSkyRequest&, const SegmentHDSkyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SegmentHDSkyAsyncHandler;
|
||||||
typedef Outcome<Error, Model::SegmentHairResult> SegmentHairOutcome;
|
typedef Outcome<Error, Model::SegmentHairResult> SegmentHairOutcome;
|
||||||
typedef std::future<SegmentHairOutcome> SegmentHairOutcomeCallable;
|
typedef std::future<SegmentHairOutcome> SegmentHairOutcomeCallable;
|
||||||
typedef std::function<void(const ImagesegClient*, const Model::SegmentHairRequest&, const SegmentHairOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SegmentHairAsyncHandler;
|
typedef std::function<void(const ImagesegClient*, const Model::SegmentHairRequest&, const SegmentHairOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SegmentHairAsyncHandler;
|
||||||
@@ -175,6 +185,12 @@ namespace AlibabaCloud
|
|||||||
SegmentHDBodyOutcome segmentHDBody(const Model::SegmentHDBodyRequest &request)const;
|
SegmentHDBodyOutcome segmentHDBody(const Model::SegmentHDBodyRequest &request)const;
|
||||||
void segmentHDBodyAsync(const Model::SegmentHDBodyRequest& request, const SegmentHDBodyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
void segmentHDBodyAsync(const Model::SegmentHDBodyRequest& request, const SegmentHDBodyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
SegmentHDBodyOutcomeCallable segmentHDBodyCallable(const Model::SegmentHDBodyRequest& request) const;
|
SegmentHDBodyOutcomeCallable segmentHDBodyCallable(const Model::SegmentHDBodyRequest& request) const;
|
||||||
|
SegmentHDCommonImageOutcome segmentHDCommonImage(const Model::SegmentHDCommonImageRequest &request)const;
|
||||||
|
void segmentHDCommonImageAsync(const Model::SegmentHDCommonImageRequest& request, const SegmentHDCommonImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
SegmentHDCommonImageOutcomeCallable segmentHDCommonImageCallable(const Model::SegmentHDCommonImageRequest& request) const;
|
||||||
|
SegmentHDSkyOutcome segmentHDSky(const Model::SegmentHDSkyRequest &request)const;
|
||||||
|
void segmentHDSkyAsync(const Model::SegmentHDSkyRequest& request, const SegmentHDSkyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
SegmentHDSkyOutcomeCallable segmentHDSkyCallable(const Model::SegmentHDSkyRequest& request) const;
|
||||||
SegmentHairOutcome segmentHair(const Model::SegmentHairRequest &request)const;
|
SegmentHairOutcome segmentHair(const Model::SegmentHairRequest &request)const;
|
||||||
void segmentHairAsync(const Model::SegmentHairRequest& request, const SegmentHairAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
void segmentHairAsync(const Model::SegmentHairRequest& request, const SegmentHairAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
SegmentHairOutcomeCallable segmentHairCallable(const Model::SegmentHairRequest& request) const;
|
SegmentHairOutcomeCallable segmentHairCallable(const Model::SegmentHairRequest& request) const;
|
||||||
|
|||||||
@@ -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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTHDCOMMONIMAGEREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTHDCOMMONIMAGEREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/imageseg/ImagesegExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Imageseg
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_IMAGESEG_EXPORT SegmentHDCommonImageRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
SegmentHDCommonImageRequest();
|
||||||
|
~SegmentHDCommonImageRequest();
|
||||||
|
|
||||||
|
bool getAsync()const;
|
||||||
|
void setAsync(bool async);
|
||||||
|
std::string getImageUrl()const;
|
||||||
|
void setImageUrl(const std::string& imageUrl);
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool async_;
|
||||||
|
std::string imageUrl_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTHDCOMMONIMAGEREQUEST_H_
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
* 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_IMAGESEG_MODEL_SEGMENTHDCOMMONIMAGERESULT_H_
|
||||||
|
#define ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTHDCOMMONIMAGERESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/imageseg/ImagesegExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Imageseg
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_IMAGESEG_EXPORT SegmentHDCommonImageResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Data
|
||||||
|
{
|
||||||
|
std::string imageUrl;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
SegmentHDCommonImageResult();
|
||||||
|
explicit SegmentHDCommonImageResult(const std::string &payload);
|
||||||
|
~SegmentHDCommonImageResult();
|
||||||
|
Data getData()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
Data data_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTHDCOMMONIMAGERESULT_H_
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTHDSKYREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTHDSKYREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/imageseg/ImagesegExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Imageseg
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_IMAGESEG_EXPORT SegmentHDSkyRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
SegmentHDSkyRequest();
|
||||||
|
~SegmentHDSkyRequest();
|
||||||
|
|
||||||
|
std::string getImageURL()const;
|
||||||
|
void setImageURL(const std::string& imageURL);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string imageURL_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTHDSKYREQUEST_H_
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
* 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_IMAGESEG_MODEL_SEGMENTHDSKYRESULT_H_
|
||||||
|
#define ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTHDSKYRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/imageseg/ImagesegExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Imageseg
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_IMAGESEG_EXPORT SegmentHDSkyResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Data
|
||||||
|
{
|
||||||
|
std::string imageURL;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
SegmentHDSkyResult();
|
||||||
|
explicit SegmentHDSkyResult(const std::string &payload);
|
||||||
|
~SegmentHDSkyResult();
|
||||||
|
Data getData()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
Data data_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_IMAGESEG_MODEL_SEGMENTHDSKYRESULT_H_
|
||||||
@@ -519,6 +519,78 @@ ImagesegClient::SegmentHDBodyOutcomeCallable ImagesegClient::segmentHDBodyCallab
|
|||||||
return task->get_future();
|
return task->get_future();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImagesegClient::SegmentHDCommonImageOutcome ImagesegClient::segmentHDCommonImage(const SegmentHDCommonImageRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return SegmentHDCommonImageOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return SegmentHDCommonImageOutcome(SegmentHDCommonImageResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return SegmentHDCommonImageOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImagesegClient::segmentHDCommonImageAsync(const SegmentHDCommonImageRequest& request, const SegmentHDCommonImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, segmentHDCommonImage(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
ImagesegClient::SegmentHDCommonImageOutcomeCallable ImagesegClient::segmentHDCommonImageCallable(const SegmentHDCommonImageRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<SegmentHDCommonImageOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->segmentHDCommonImage(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
|
ImagesegClient::SegmentHDSkyOutcome ImagesegClient::segmentHDSky(const SegmentHDSkyRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return SegmentHDSkyOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return SegmentHDSkyOutcome(SegmentHDSkyResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return SegmentHDSkyOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImagesegClient::segmentHDSkyAsync(const SegmentHDSkyRequest& request, const SegmentHDSkyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, segmentHDSky(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
ImagesegClient::SegmentHDSkyOutcomeCallable ImagesegClient::segmentHDSkyCallable(const SegmentHDSkyRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<SegmentHDSkyOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->segmentHDSky(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
ImagesegClient::SegmentHairOutcome ImagesegClient::segmentHair(const SegmentHairRequest &request) const
|
ImagesegClient::SegmentHairOutcome ImagesegClient::segmentHair(const SegmentHairRequest &request) const
|
||||||
{
|
{
|
||||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
|||||||
51
imageseg/src/model/SegmentHDCommonImageRequest.cc
Normal file
51
imageseg/src/model/SegmentHDCommonImageRequest.cc
Normal 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/imageseg/model/SegmentHDCommonImageRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Imageseg::Model::SegmentHDCommonImageRequest;
|
||||||
|
|
||||||
|
SegmentHDCommonImageRequest::SegmentHDCommonImageRequest() :
|
||||||
|
RpcServiceRequest("imageseg", "2019-12-30", "SegmentHDCommonImage")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
SegmentHDCommonImageRequest::~SegmentHDCommonImageRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
bool SegmentHDCommonImageRequest::getAsync()const
|
||||||
|
{
|
||||||
|
return async_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SegmentHDCommonImageRequest::setAsync(bool async)
|
||||||
|
{
|
||||||
|
async_ = async;
|
||||||
|
setBodyParameter("Async", async ? "true" : "false");
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string SegmentHDCommonImageRequest::getImageUrl()const
|
||||||
|
{
|
||||||
|
return imageUrl_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SegmentHDCommonImageRequest::setImageUrl(const std::string& imageUrl)
|
||||||
|
{
|
||||||
|
imageUrl_ = imageUrl;
|
||||||
|
setBodyParameter("ImageUrl", imageUrl);
|
||||||
|
}
|
||||||
|
|
||||||
52
imageseg/src/model/SegmentHDCommonImageResult.cc
Normal file
52
imageseg/src/model/SegmentHDCommonImageResult.cc
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
* 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/imageseg/model/SegmentHDCommonImageResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Imageseg;
|
||||||
|
using namespace AlibabaCloud::Imageseg::Model;
|
||||||
|
|
||||||
|
SegmentHDCommonImageResult::SegmentHDCommonImageResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
SegmentHDCommonImageResult::SegmentHDCommonImageResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
SegmentHDCommonImageResult::~SegmentHDCommonImageResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void SegmentHDCommonImageResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto dataNode = value["Data"];
|
||||||
|
if(!dataNode["ImageUrl"].isNull())
|
||||||
|
data_.imageUrl = dataNode["ImageUrl"].asString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
SegmentHDCommonImageResult::Data SegmentHDCommonImageResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
40
imageseg/src/model/SegmentHDSkyRequest.cc
Normal file
40
imageseg/src/model/SegmentHDSkyRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <alibabacloud/imageseg/model/SegmentHDSkyRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Imageseg::Model::SegmentHDSkyRequest;
|
||||||
|
|
||||||
|
SegmentHDSkyRequest::SegmentHDSkyRequest() :
|
||||||
|
RpcServiceRequest("imageseg", "2019-12-30", "SegmentHDSky")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
SegmentHDSkyRequest::~SegmentHDSkyRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
std::string SegmentHDSkyRequest::getImageURL()const
|
||||||
|
{
|
||||||
|
return imageURL_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SegmentHDSkyRequest::setImageURL(const std::string& imageURL)
|
||||||
|
{
|
||||||
|
imageURL_ = imageURL;
|
||||||
|
setBodyParameter("ImageURL", imageURL);
|
||||||
|
}
|
||||||
|
|
||||||
52
imageseg/src/model/SegmentHDSkyResult.cc
Normal file
52
imageseg/src/model/SegmentHDSkyResult.cc
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
* 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/imageseg/model/SegmentHDSkyResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Imageseg;
|
||||||
|
using namespace AlibabaCloud::Imageseg::Model;
|
||||||
|
|
||||||
|
SegmentHDSkyResult::SegmentHDSkyResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
SegmentHDSkyResult::SegmentHDSkyResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
SegmentHDSkyResult::~SegmentHDSkyResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void SegmentHDSkyResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto dataNode = value["Data"];
|
||||||
|
if(!dataNode["ImageURL"].isNull())
|
||||||
|
data_.imageURL = dataNode["ImageURL"].asString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
SegmentHDSkyResult::Data SegmentHDSkyResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -45,6 +45,17 @@ namespace AlibabaCloud
|
|||||||
std::string district;
|
std::string district;
|
||||||
std::string province;
|
std::string province;
|
||||||
};
|
};
|
||||||
|
struct Tag
|
||||||
|
{
|
||||||
|
std::string artist;
|
||||||
|
std::string composer;
|
||||||
|
std::string performer;
|
||||||
|
std::string language;
|
||||||
|
std::string creationTime;
|
||||||
|
std::string album;
|
||||||
|
std::string title;
|
||||||
|
std::string albumArtist;
|
||||||
|
};
|
||||||
Address address;
|
Address address;
|
||||||
int numberStreams;
|
int numberStreams;
|
||||||
std::string size;
|
std::string size;
|
||||||
@@ -53,6 +64,7 @@ namespace AlibabaCloud
|
|||||||
std::string creationTime;
|
std::string creationTime;
|
||||||
std::string formatName;
|
std::string formatName;
|
||||||
std::string duration;
|
std::string duration;
|
||||||
|
Tag tag;
|
||||||
std::string bitrate;
|
std::string bitrate;
|
||||||
int numberPrograms;
|
int numberPrograms;
|
||||||
std::string location;
|
std::string location;
|
||||||
|
|||||||
@@ -45,12 +45,12 @@ void DetectQRCodesResult::parse(const std::string &payload)
|
|||||||
SuccessDetailsItem successDetailsObject;
|
SuccessDetailsItem successDetailsObject;
|
||||||
if(!valueSuccessDetailsSuccessDetailsItem["SrcUri"].isNull())
|
if(!valueSuccessDetailsSuccessDetailsItem["SrcUri"].isNull())
|
||||||
successDetailsObject.srcUri = valueSuccessDetailsSuccessDetailsItem["SrcUri"].asString();
|
successDetailsObject.srcUri = valueSuccessDetailsSuccessDetailsItem["SrcUri"].asString();
|
||||||
auto allQRCodesNode = allSuccessDetailsNode["QRCodes"]["QRCodesItem"];
|
auto allQRCodesNode = valueSuccessDetailsSuccessDetailsItem["QRCodes"]["QRCodesItem"];
|
||||||
for (auto allSuccessDetailsNodeQRCodesQRCodesItem : allQRCodesNode)
|
for (auto valueSuccessDetailsSuccessDetailsItemQRCodesQRCodesItem : allQRCodesNode)
|
||||||
{
|
{
|
||||||
SuccessDetailsItem::QRCodesItem qRCodesObject;
|
SuccessDetailsItem::QRCodesItem qRCodesObject;
|
||||||
if(!allSuccessDetailsNodeQRCodesQRCodesItem["Content"].isNull())
|
if(!valueSuccessDetailsSuccessDetailsItemQRCodesQRCodesItem["Content"].isNull())
|
||||||
qRCodesObject.content = allSuccessDetailsNodeQRCodesQRCodesItem["Content"].asString();
|
qRCodesObject.content = valueSuccessDetailsSuccessDetailsItemQRCodesQRCodesItem["Content"].asString();
|
||||||
auto qRCodesRectangleNode = value["QRCodesRectangle"];
|
auto qRCodesRectangleNode = value["QRCodesRectangle"];
|
||||||
if(!qRCodesRectangleNode["Left"].isNull())
|
if(!qRCodesRectangleNode["Left"].isNull())
|
||||||
qRCodesObject.qRCodesRectangle.left = qRCodesRectangleNode["Left"].asString();
|
qRCodesObject.qRCodesRectangle.left = qRCodesRectangleNode["Left"].asString();
|
||||||
|
|||||||
@@ -127,14 +127,14 @@ void FindImagesResult::parse(const std::string &payload)
|
|||||||
imagesObject.croppingSuggestionFailReason = valueImagesImagesItem["CroppingSuggestionFailReason"].asString();
|
imagesObject.croppingSuggestionFailReason = valueImagesImagesItem["CroppingSuggestionFailReason"].asString();
|
||||||
if(!valueImagesImagesItem["CroppingSuggestionModifyTime"].isNull())
|
if(!valueImagesImagesItem["CroppingSuggestionModifyTime"].isNull())
|
||||||
imagesObject.croppingSuggestionModifyTime = valueImagesImagesItem["CroppingSuggestionModifyTime"].asString();
|
imagesObject.croppingSuggestionModifyTime = valueImagesImagesItem["CroppingSuggestionModifyTime"].asString();
|
||||||
auto allCroppingSuggestionNode = allImagesNode["CroppingSuggestion"]["CroppingSuggestionItem"];
|
auto allCroppingSuggestionNode = valueImagesImagesItem["CroppingSuggestion"]["CroppingSuggestionItem"];
|
||||||
for (auto allImagesNodeCroppingSuggestionCroppingSuggestionItem : allCroppingSuggestionNode)
|
for (auto valueImagesImagesItemCroppingSuggestionCroppingSuggestionItem : allCroppingSuggestionNode)
|
||||||
{
|
{
|
||||||
ImagesItem::CroppingSuggestionItem croppingSuggestionObject;
|
ImagesItem::CroppingSuggestionItem croppingSuggestionObject;
|
||||||
if(!allImagesNodeCroppingSuggestionCroppingSuggestionItem["AspectRatio"].isNull())
|
if(!valueImagesImagesItemCroppingSuggestionCroppingSuggestionItem["AspectRatio"].isNull())
|
||||||
croppingSuggestionObject.aspectRatio = allImagesNodeCroppingSuggestionCroppingSuggestionItem["AspectRatio"].asString();
|
croppingSuggestionObject.aspectRatio = valueImagesImagesItemCroppingSuggestionCroppingSuggestionItem["AspectRatio"].asString();
|
||||||
if(!allImagesNodeCroppingSuggestionCroppingSuggestionItem["Score"].isNull())
|
if(!valueImagesImagesItemCroppingSuggestionCroppingSuggestionItem["Score"].isNull())
|
||||||
croppingSuggestionObject.score = std::stof(allImagesNodeCroppingSuggestionCroppingSuggestionItem["Score"].asString());
|
croppingSuggestionObject.score = std::stof(valueImagesImagesItemCroppingSuggestionCroppingSuggestionItem["Score"].asString());
|
||||||
auto croppingBoundaryNode = value["CroppingBoundary"];
|
auto croppingBoundaryNode = value["CroppingBoundary"];
|
||||||
if(!croppingBoundaryNode["Width"].isNull())
|
if(!croppingBoundaryNode["Width"].isNull())
|
||||||
croppingSuggestionObject.croppingBoundary.width = std::stoi(croppingBoundaryNode["Width"].asString());
|
croppingSuggestionObject.croppingBoundary.width = std::stoi(croppingBoundaryNode["Width"].asString());
|
||||||
@@ -146,30 +146,30 @@ void FindImagesResult::parse(const std::string &payload)
|
|||||||
croppingSuggestionObject.croppingBoundary.top = std::stoi(croppingBoundaryNode["Top"].asString());
|
croppingSuggestionObject.croppingBoundary.top = std::stoi(croppingBoundaryNode["Top"].asString());
|
||||||
imagesObject.croppingSuggestion.push_back(croppingSuggestionObject);
|
imagesObject.croppingSuggestion.push_back(croppingSuggestionObject);
|
||||||
}
|
}
|
||||||
auto allFacesNode = allImagesNode["Faces"]["FacesItem"];
|
auto allFacesNode = valueImagesImagesItem["Faces"]["FacesItem"];
|
||||||
for (auto allImagesNodeFacesFacesItem : allFacesNode)
|
for (auto valueImagesImagesItemFacesFacesItem : allFacesNode)
|
||||||
{
|
{
|
||||||
ImagesItem::FacesItem facesObject;
|
ImagesItem::FacesItem facesObject;
|
||||||
if(!allImagesNodeFacesFacesItem["Age"].isNull())
|
if(!valueImagesImagesItemFacesFacesItem["Age"].isNull())
|
||||||
facesObject.age = std::stoi(allImagesNodeFacesFacesItem["Age"].asString());
|
facesObject.age = std::stoi(valueImagesImagesItemFacesFacesItem["Age"].asString());
|
||||||
if(!allImagesNodeFacesFacesItem["GenderConfidence"].isNull())
|
if(!valueImagesImagesItemFacesFacesItem["GenderConfidence"].isNull())
|
||||||
facesObject.genderConfidence = std::stof(allImagesNodeFacesFacesItem["GenderConfidence"].asString());
|
facesObject.genderConfidence = std::stof(valueImagesImagesItemFacesFacesItem["GenderConfidence"].asString());
|
||||||
if(!allImagesNodeFacesFacesItem["Attractive"].isNull())
|
if(!valueImagesImagesItemFacesFacesItem["Attractive"].isNull())
|
||||||
facesObject.attractive = std::stof(allImagesNodeFacesFacesItem["Attractive"].asString());
|
facesObject.attractive = std::stof(valueImagesImagesItemFacesFacesItem["Attractive"].asString());
|
||||||
if(!allImagesNodeFacesFacesItem["Gender"].isNull())
|
if(!valueImagesImagesItemFacesFacesItem["Gender"].isNull())
|
||||||
facesObject.gender = allImagesNodeFacesFacesItem["Gender"].asString();
|
facesObject.gender = valueImagesImagesItemFacesFacesItem["Gender"].asString();
|
||||||
if(!allImagesNodeFacesFacesItem["FaceConfidence"].isNull())
|
if(!valueImagesImagesItemFacesFacesItem["FaceConfidence"].isNull())
|
||||||
facesObject.faceConfidence = std::stof(allImagesNodeFacesFacesItem["FaceConfidence"].asString());
|
facesObject.faceConfidence = std::stof(valueImagesImagesItemFacesFacesItem["FaceConfidence"].asString());
|
||||||
if(!allImagesNodeFacesFacesItem["Emotion"].isNull())
|
if(!valueImagesImagesItemFacesFacesItem["Emotion"].isNull())
|
||||||
facesObject.emotion = allImagesNodeFacesFacesItem["Emotion"].asString();
|
facesObject.emotion = valueImagesImagesItemFacesFacesItem["Emotion"].asString();
|
||||||
if(!allImagesNodeFacesFacesItem["FaceId"].isNull())
|
if(!valueImagesImagesItemFacesFacesItem["FaceId"].isNull())
|
||||||
facesObject.faceId = allImagesNodeFacesFacesItem["FaceId"].asString();
|
facesObject.faceId = valueImagesImagesItemFacesFacesItem["FaceId"].asString();
|
||||||
if(!allImagesNodeFacesFacesItem["EmotionConfidence"].isNull())
|
if(!valueImagesImagesItemFacesFacesItem["EmotionConfidence"].isNull())
|
||||||
facesObject.emotionConfidence = std::stof(allImagesNodeFacesFacesItem["EmotionConfidence"].asString());
|
facesObject.emotionConfidence = std::stof(valueImagesImagesItemFacesFacesItem["EmotionConfidence"].asString());
|
||||||
if(!allImagesNodeFacesFacesItem["GroupId"].isNull())
|
if(!valueImagesImagesItemFacesFacesItem["GroupId"].isNull())
|
||||||
facesObject.groupId = allImagesNodeFacesFacesItem["GroupId"].asString();
|
facesObject.groupId = valueImagesImagesItemFacesFacesItem["GroupId"].asString();
|
||||||
if(!allImagesNodeFacesFacesItem["FaceQuality"].isNull())
|
if(!valueImagesImagesItemFacesFacesItem["FaceQuality"].isNull())
|
||||||
facesObject.faceQuality = std::stof(allImagesNodeFacesFacesItem["FaceQuality"].asString());
|
facesObject.faceQuality = std::stof(valueImagesImagesItemFacesFacesItem["FaceQuality"].asString());
|
||||||
auto emotionDetailsNode = value["EmotionDetails"];
|
auto emotionDetailsNode = value["EmotionDetails"];
|
||||||
if(!emotionDetailsNode["SAD"].isNull())
|
if(!emotionDetailsNode["SAD"].isNull())
|
||||||
facesObject.emotionDetails.sAD = std::stof(emotionDetailsNode["SAD"].asString());
|
facesObject.emotionDetails.sAD = std::stof(emotionDetailsNode["SAD"].asString());
|
||||||
@@ -220,28 +220,28 @@ void FindImagesResult::parse(const std::string &payload)
|
|||||||
facesObject.faceAttributes.headPose.yaw = std::stof(headPoseNode["Yaw"].asString());
|
facesObject.faceAttributes.headPose.yaw = std::stof(headPoseNode["Yaw"].asString());
|
||||||
imagesObject.faces.push_back(facesObject);
|
imagesObject.faces.push_back(facesObject);
|
||||||
}
|
}
|
||||||
auto allTagsNode = allImagesNode["Tags"]["TagsItem"];
|
auto allTagsNode = valueImagesImagesItem["Tags"]["TagsItem"];
|
||||||
for (auto allImagesNodeTagsTagsItem : allTagsNode)
|
for (auto valueImagesImagesItemTagsTagsItem : allTagsNode)
|
||||||
{
|
{
|
||||||
ImagesItem::TagsItem tagsObject;
|
ImagesItem::TagsItem tagsObject;
|
||||||
if(!allImagesNodeTagsTagsItem["TagConfidence"].isNull())
|
if(!valueImagesImagesItemTagsTagsItem["TagConfidence"].isNull())
|
||||||
tagsObject.tagConfidence = std::stof(allImagesNodeTagsTagsItem["TagConfidence"].asString());
|
tagsObject.tagConfidence = std::stof(valueImagesImagesItemTagsTagsItem["TagConfidence"].asString());
|
||||||
if(!allImagesNodeTagsTagsItem["TagLevel"].isNull())
|
if(!valueImagesImagesItemTagsTagsItem["TagLevel"].isNull())
|
||||||
tagsObject.tagLevel = std::stoi(allImagesNodeTagsTagsItem["TagLevel"].asString());
|
tagsObject.tagLevel = std::stoi(valueImagesImagesItemTagsTagsItem["TagLevel"].asString());
|
||||||
if(!allImagesNodeTagsTagsItem["TagName"].isNull())
|
if(!valueImagesImagesItemTagsTagsItem["TagName"].isNull())
|
||||||
tagsObject.tagName = allImagesNodeTagsTagsItem["TagName"].asString();
|
tagsObject.tagName = valueImagesImagesItemTagsTagsItem["TagName"].asString();
|
||||||
if(!allImagesNodeTagsTagsItem["ParentTagName"].isNull())
|
if(!valueImagesImagesItemTagsTagsItem["ParentTagName"].isNull())
|
||||||
tagsObject.parentTagName = allImagesNodeTagsTagsItem["ParentTagName"].asString();
|
tagsObject.parentTagName = valueImagesImagesItemTagsTagsItem["ParentTagName"].asString();
|
||||||
imagesObject.tags.push_back(tagsObject);
|
imagesObject.tags.push_back(tagsObject);
|
||||||
}
|
}
|
||||||
auto allOCRNode = allImagesNode["OCR"]["OCRItem"];
|
auto allOCRNode = valueImagesImagesItem["OCR"]["OCRItem"];
|
||||||
for (auto allImagesNodeOCROCRItem : allOCRNode)
|
for (auto valueImagesImagesItemOCROCRItem : allOCRNode)
|
||||||
{
|
{
|
||||||
ImagesItem::OCRItem oCRObject;
|
ImagesItem::OCRItem oCRObject;
|
||||||
if(!allImagesNodeOCROCRItem["OCRContents"].isNull())
|
if(!valueImagesImagesItemOCROCRItem["OCRContents"].isNull())
|
||||||
oCRObject.oCRContents = allImagesNodeOCROCRItem["OCRContents"].asString();
|
oCRObject.oCRContents = valueImagesImagesItemOCROCRItem["OCRContents"].asString();
|
||||||
if(!allImagesNodeOCROCRItem["OCRConfidence"].isNull())
|
if(!valueImagesImagesItemOCROCRItem["OCRConfidence"].isNull())
|
||||||
oCRObject.oCRConfidence = std::stof(allImagesNodeOCROCRItem["OCRConfidence"].asString());
|
oCRObject.oCRConfidence = std::stof(valueImagesImagesItemOCROCRItem["OCRConfidence"].asString());
|
||||||
auto oCRBoundaryNode = value["OCRBoundary"];
|
auto oCRBoundaryNode = value["OCRBoundary"];
|
||||||
if(!oCRBoundaryNode["Left"].isNull())
|
if(!oCRBoundaryNode["Left"].isNull())
|
||||||
oCRObject.oCRBoundary.left = std::stoi(oCRBoundaryNode["Left"].asString());
|
oCRObject.oCRBoundary.left = std::stoi(oCRBoundaryNode["Left"].asString());
|
||||||
@@ -253,18 +253,18 @@ void FindImagesResult::parse(const std::string &payload)
|
|||||||
oCRObject.oCRBoundary.height = std::stoi(oCRBoundaryNode["Height"].asString());
|
oCRObject.oCRBoundary.height = std::stoi(oCRBoundaryNode["Height"].asString());
|
||||||
imagesObject.oCR.push_back(oCRObject);
|
imagesObject.oCR.push_back(oCRObject);
|
||||||
}
|
}
|
||||||
auto allCelebrityNode = allImagesNode["Celebrity"]["CelebrityItem"];
|
auto allCelebrityNode = valueImagesImagesItem["Celebrity"]["CelebrityItem"];
|
||||||
for (auto allImagesNodeCelebrityCelebrityItem : allCelebrityNode)
|
for (auto valueImagesImagesItemCelebrityCelebrityItem : allCelebrityNode)
|
||||||
{
|
{
|
||||||
ImagesItem::CelebrityItem celebrityObject;
|
ImagesItem::CelebrityItem celebrityObject;
|
||||||
if(!allImagesNodeCelebrityCelebrityItem["CelebrityName"].isNull())
|
if(!valueImagesImagesItemCelebrityCelebrityItem["CelebrityName"].isNull())
|
||||||
celebrityObject.celebrityName = allImagesNodeCelebrityCelebrityItem["CelebrityName"].asString();
|
celebrityObject.celebrityName = valueImagesImagesItemCelebrityCelebrityItem["CelebrityName"].asString();
|
||||||
if(!allImagesNodeCelebrityCelebrityItem["CelebrityGender"].isNull())
|
if(!valueImagesImagesItemCelebrityCelebrityItem["CelebrityGender"].isNull())
|
||||||
celebrityObject.celebrityGender = allImagesNodeCelebrityCelebrityItem["CelebrityGender"].asString();
|
celebrityObject.celebrityGender = valueImagesImagesItemCelebrityCelebrityItem["CelebrityGender"].asString();
|
||||||
if(!allImagesNodeCelebrityCelebrityItem["CelebrityConfidence"].isNull())
|
if(!valueImagesImagesItemCelebrityCelebrityItem["CelebrityConfidence"].isNull())
|
||||||
celebrityObject.celebrityConfidence = std::stof(allImagesNodeCelebrityCelebrityItem["CelebrityConfidence"].asString());
|
celebrityObject.celebrityConfidence = std::stof(valueImagesImagesItemCelebrityCelebrityItem["CelebrityConfidence"].asString());
|
||||||
if(!allImagesNodeCelebrityCelebrityItem["CelebrityLibraryName"].isNull())
|
if(!valueImagesImagesItemCelebrityCelebrityItem["CelebrityLibraryName"].isNull())
|
||||||
celebrityObject.celebrityLibraryName = allImagesNodeCelebrityCelebrityItem["CelebrityLibraryName"].asString();
|
celebrityObject.celebrityLibraryName = valueImagesImagesItemCelebrityCelebrityItem["CelebrityLibraryName"].asString();
|
||||||
auto celebrityBoundaryNode = value["CelebrityBoundary"];
|
auto celebrityBoundaryNode = value["CelebrityBoundary"];
|
||||||
if(!celebrityBoundaryNode["Left"].isNull())
|
if(!celebrityBoundaryNode["Left"].isNull())
|
||||||
celebrityObject.celebrityBoundary.left = std::stoi(celebrityBoundaryNode["Left"].asString());
|
celebrityObject.celebrityBoundary.left = std::stoi(celebrityBoundaryNode["Left"].asString());
|
||||||
|
|||||||
@@ -51,18 +51,18 @@ void FindSimilarFacesResult::parse(const std::string &payload)
|
|||||||
facesObject.similarity = std::stof(valueFacesFacesItem["Similarity"].asString());
|
facesObject.similarity = std::stof(valueFacesFacesItem["Similarity"].asString());
|
||||||
if(!valueFacesFacesItem["ExternalId"].isNull())
|
if(!valueFacesFacesItem["ExternalId"].isNull())
|
||||||
facesObject.externalId = valueFacesFacesItem["ExternalId"].asString();
|
facesObject.externalId = valueFacesFacesItem["ExternalId"].asString();
|
||||||
auto allSimilarFacesNode = allFacesNode["SimilarFaces"]["SimilarFacesItem"];
|
auto allSimilarFacesNode = valueFacesFacesItem["SimilarFaces"]["SimilarFacesItem"];
|
||||||
for (auto allFacesNodeSimilarFacesSimilarFacesItem : allSimilarFacesNode)
|
for (auto valueFacesFacesItemSimilarFacesSimilarFacesItem : allSimilarFacesNode)
|
||||||
{
|
{
|
||||||
FacesItem::SimilarFacesItem similarFacesObject;
|
FacesItem::SimilarFacesItem similarFacesObject;
|
||||||
if(!allFacesNodeSimilarFacesSimilarFacesItem["FaceId"].isNull())
|
if(!valueFacesFacesItemSimilarFacesSimilarFacesItem["FaceId"].isNull())
|
||||||
similarFacesObject.faceId = allFacesNodeSimilarFacesSimilarFacesItem["FaceId"].asString();
|
similarFacesObject.faceId = valueFacesFacesItemSimilarFacesSimilarFacesItem["FaceId"].asString();
|
||||||
if(!allFacesNodeSimilarFacesSimilarFacesItem["ImageUri"].isNull())
|
if(!valueFacesFacesItemSimilarFacesSimilarFacesItem["ImageUri"].isNull())
|
||||||
similarFacesObject.imageUri = allFacesNodeSimilarFacesSimilarFacesItem["ImageUri"].asString();
|
similarFacesObject.imageUri = valueFacesFacesItemSimilarFacesSimilarFacesItem["ImageUri"].asString();
|
||||||
if(!allFacesNodeSimilarFacesSimilarFacesItem["Similarity"].isNull())
|
if(!valueFacesFacesItemSimilarFacesSimilarFacesItem["Similarity"].isNull())
|
||||||
similarFacesObject.similarity = std::stof(allFacesNodeSimilarFacesSimilarFacesItem["Similarity"].asString());
|
similarFacesObject.similarity = std::stof(valueFacesFacesItemSimilarFacesSimilarFacesItem["Similarity"].asString());
|
||||||
if(!allFacesNodeSimilarFacesSimilarFacesItem["ExternalId"].isNull())
|
if(!valueFacesFacesItemSimilarFacesSimilarFacesItem["ExternalId"].isNull())
|
||||||
similarFacesObject.externalId = allFacesNodeSimilarFacesSimilarFacesItem["ExternalId"].asString();
|
similarFacesObject.externalId = valueFacesFacesItemSimilarFacesSimilarFacesItem["ExternalId"].asString();
|
||||||
auto faceAttributes1Node = value["FaceAttributes"];
|
auto faceAttributes1Node = value["FaceAttributes"];
|
||||||
auto faceBoundaryNode = faceAttributes1Node["FaceBoundary"];
|
auto faceBoundaryNode = faceAttributes1Node["FaceBoundary"];
|
||||||
if(!faceBoundaryNode["Left"].isNull())
|
if(!faceBoundaryNode["Left"].isNull())
|
||||||
|
|||||||
@@ -74,6 +74,23 @@ void GetMediaMetaResult::parse(const std::string &payload)
|
|||||||
mediaMeta_.mediaFormat.address.district = addressNode["District"].asString();
|
mediaMeta_.mediaFormat.address.district = addressNode["District"].asString();
|
||||||
if(!addressNode["Township"].isNull())
|
if(!addressNode["Township"].isNull())
|
||||||
mediaMeta_.mediaFormat.address.township = addressNode["Township"].asString();
|
mediaMeta_.mediaFormat.address.township = addressNode["Township"].asString();
|
||||||
|
auto tagNode = mediaFormatNode["Tag"];
|
||||||
|
if(!tagNode["Language"].isNull())
|
||||||
|
mediaMeta_.mediaFormat.tag.language = tagNode["Language"].asString();
|
||||||
|
if(!tagNode["CreationTime"].isNull())
|
||||||
|
mediaMeta_.mediaFormat.tag.creationTime = tagNode["CreationTime"].asString();
|
||||||
|
if(!tagNode["Album"].isNull())
|
||||||
|
mediaMeta_.mediaFormat.tag.album = tagNode["Album"].asString();
|
||||||
|
if(!tagNode["AlbumArtist"].isNull())
|
||||||
|
mediaMeta_.mediaFormat.tag.albumArtist = tagNode["AlbumArtist"].asString();
|
||||||
|
if(!tagNode["Artist"].isNull())
|
||||||
|
mediaMeta_.mediaFormat.tag.artist = tagNode["Artist"].asString();
|
||||||
|
if(!tagNode["Composer"].isNull())
|
||||||
|
mediaMeta_.mediaFormat.tag.composer = tagNode["Composer"].asString();
|
||||||
|
if(!tagNode["Title"].isNull())
|
||||||
|
mediaMeta_.mediaFormat.tag.title = tagNode["Title"].asString();
|
||||||
|
if(!tagNode["Performer"].isNull())
|
||||||
|
mediaMeta_.mediaFormat.tag.performer = tagNode["Performer"].asString();
|
||||||
auto mediaStreamsNode = mediaMetaNode["MediaStreams"];
|
auto mediaStreamsNode = mediaMetaNode["MediaStreams"];
|
||||||
auto allVideoStreamsNode = mediaStreamsNode["VideoStreams"]["VideoStream"];
|
auto allVideoStreamsNode = mediaStreamsNode["VideoStreams"]["VideoStream"];
|
||||||
for (auto mediaStreamsNodeVideoStreamsVideoStream : allVideoStreamsNode)
|
for (auto mediaStreamsNodeVideoStreamsVideoStream : allVideoStreamsNode)
|
||||||
|
|||||||
@@ -127,14 +127,14 @@ void ListImagesResult::parse(const std::string &payload)
|
|||||||
imagesObject.croppingSuggestionFailReason = valueImagesImagesItem["CroppingSuggestionFailReason"].asString();
|
imagesObject.croppingSuggestionFailReason = valueImagesImagesItem["CroppingSuggestionFailReason"].asString();
|
||||||
if(!valueImagesImagesItem["CroppingSuggestionModifyTime"].isNull())
|
if(!valueImagesImagesItem["CroppingSuggestionModifyTime"].isNull())
|
||||||
imagesObject.croppingSuggestionModifyTime = valueImagesImagesItem["CroppingSuggestionModifyTime"].asString();
|
imagesObject.croppingSuggestionModifyTime = valueImagesImagesItem["CroppingSuggestionModifyTime"].asString();
|
||||||
auto allCroppingSuggestionNode = allImagesNode["CroppingSuggestion"]["CroppingSuggestionItem"];
|
auto allCroppingSuggestionNode = valueImagesImagesItem["CroppingSuggestion"]["CroppingSuggestionItem"];
|
||||||
for (auto allImagesNodeCroppingSuggestionCroppingSuggestionItem : allCroppingSuggestionNode)
|
for (auto valueImagesImagesItemCroppingSuggestionCroppingSuggestionItem : allCroppingSuggestionNode)
|
||||||
{
|
{
|
||||||
ImagesItem::CroppingSuggestionItem croppingSuggestionObject;
|
ImagesItem::CroppingSuggestionItem croppingSuggestionObject;
|
||||||
if(!allImagesNodeCroppingSuggestionCroppingSuggestionItem["AspectRatio"].isNull())
|
if(!valueImagesImagesItemCroppingSuggestionCroppingSuggestionItem["AspectRatio"].isNull())
|
||||||
croppingSuggestionObject.aspectRatio = allImagesNodeCroppingSuggestionCroppingSuggestionItem["AspectRatio"].asString();
|
croppingSuggestionObject.aspectRatio = valueImagesImagesItemCroppingSuggestionCroppingSuggestionItem["AspectRatio"].asString();
|
||||||
if(!allImagesNodeCroppingSuggestionCroppingSuggestionItem["Score"].isNull())
|
if(!valueImagesImagesItemCroppingSuggestionCroppingSuggestionItem["Score"].isNull())
|
||||||
croppingSuggestionObject.score = std::stof(allImagesNodeCroppingSuggestionCroppingSuggestionItem["Score"].asString());
|
croppingSuggestionObject.score = std::stof(valueImagesImagesItemCroppingSuggestionCroppingSuggestionItem["Score"].asString());
|
||||||
auto croppingBoundaryNode = value["CroppingBoundary"];
|
auto croppingBoundaryNode = value["CroppingBoundary"];
|
||||||
if(!croppingBoundaryNode["Width"].isNull())
|
if(!croppingBoundaryNode["Width"].isNull())
|
||||||
croppingSuggestionObject.croppingBoundary.width = std::stoi(croppingBoundaryNode["Width"].asString());
|
croppingSuggestionObject.croppingBoundary.width = std::stoi(croppingBoundaryNode["Width"].asString());
|
||||||
@@ -146,30 +146,30 @@ void ListImagesResult::parse(const std::string &payload)
|
|||||||
croppingSuggestionObject.croppingBoundary.top = std::stoi(croppingBoundaryNode["Top"].asString());
|
croppingSuggestionObject.croppingBoundary.top = std::stoi(croppingBoundaryNode["Top"].asString());
|
||||||
imagesObject.croppingSuggestion.push_back(croppingSuggestionObject);
|
imagesObject.croppingSuggestion.push_back(croppingSuggestionObject);
|
||||||
}
|
}
|
||||||
auto allFacesNode = allImagesNode["Faces"]["FacesItem"];
|
auto allFacesNode = valueImagesImagesItem["Faces"]["FacesItem"];
|
||||||
for (auto allImagesNodeFacesFacesItem : allFacesNode)
|
for (auto valueImagesImagesItemFacesFacesItem : allFacesNode)
|
||||||
{
|
{
|
||||||
ImagesItem::FacesItem facesObject;
|
ImagesItem::FacesItem facesObject;
|
||||||
if(!allImagesNodeFacesFacesItem["Age"].isNull())
|
if(!valueImagesImagesItemFacesFacesItem["Age"].isNull())
|
||||||
facesObject.age = std::stoi(allImagesNodeFacesFacesItem["Age"].asString());
|
facesObject.age = std::stoi(valueImagesImagesItemFacesFacesItem["Age"].asString());
|
||||||
if(!allImagesNodeFacesFacesItem["GenderConfidence"].isNull())
|
if(!valueImagesImagesItemFacesFacesItem["GenderConfidence"].isNull())
|
||||||
facesObject.genderConfidence = std::stof(allImagesNodeFacesFacesItem["GenderConfidence"].asString());
|
facesObject.genderConfidence = std::stof(valueImagesImagesItemFacesFacesItem["GenderConfidence"].asString());
|
||||||
if(!allImagesNodeFacesFacesItem["Attractive"].isNull())
|
if(!valueImagesImagesItemFacesFacesItem["Attractive"].isNull())
|
||||||
facesObject.attractive = std::stof(allImagesNodeFacesFacesItem["Attractive"].asString());
|
facesObject.attractive = std::stof(valueImagesImagesItemFacesFacesItem["Attractive"].asString());
|
||||||
if(!allImagesNodeFacesFacesItem["Gender"].isNull())
|
if(!valueImagesImagesItemFacesFacesItem["Gender"].isNull())
|
||||||
facesObject.gender = allImagesNodeFacesFacesItem["Gender"].asString();
|
facesObject.gender = valueImagesImagesItemFacesFacesItem["Gender"].asString();
|
||||||
if(!allImagesNodeFacesFacesItem["FaceConfidence"].isNull())
|
if(!valueImagesImagesItemFacesFacesItem["FaceConfidence"].isNull())
|
||||||
facesObject.faceConfidence = std::stof(allImagesNodeFacesFacesItem["FaceConfidence"].asString());
|
facesObject.faceConfidence = std::stof(valueImagesImagesItemFacesFacesItem["FaceConfidence"].asString());
|
||||||
if(!allImagesNodeFacesFacesItem["Emotion"].isNull())
|
if(!valueImagesImagesItemFacesFacesItem["Emotion"].isNull())
|
||||||
facesObject.emotion = allImagesNodeFacesFacesItem["Emotion"].asString();
|
facesObject.emotion = valueImagesImagesItemFacesFacesItem["Emotion"].asString();
|
||||||
if(!allImagesNodeFacesFacesItem["FaceId"].isNull())
|
if(!valueImagesImagesItemFacesFacesItem["FaceId"].isNull())
|
||||||
facesObject.faceId = allImagesNodeFacesFacesItem["FaceId"].asString();
|
facesObject.faceId = valueImagesImagesItemFacesFacesItem["FaceId"].asString();
|
||||||
if(!allImagesNodeFacesFacesItem["EmotionConfidence"].isNull())
|
if(!valueImagesImagesItemFacesFacesItem["EmotionConfidence"].isNull())
|
||||||
facesObject.emotionConfidence = std::stof(allImagesNodeFacesFacesItem["EmotionConfidence"].asString());
|
facesObject.emotionConfidence = std::stof(valueImagesImagesItemFacesFacesItem["EmotionConfidence"].asString());
|
||||||
if(!allImagesNodeFacesFacesItem["GroupId"].isNull())
|
if(!valueImagesImagesItemFacesFacesItem["GroupId"].isNull())
|
||||||
facesObject.groupId = allImagesNodeFacesFacesItem["GroupId"].asString();
|
facesObject.groupId = valueImagesImagesItemFacesFacesItem["GroupId"].asString();
|
||||||
if(!allImagesNodeFacesFacesItem["FaceQuality"].isNull())
|
if(!valueImagesImagesItemFacesFacesItem["FaceQuality"].isNull())
|
||||||
facesObject.faceQuality = std::stof(allImagesNodeFacesFacesItem["FaceQuality"].asString());
|
facesObject.faceQuality = std::stof(valueImagesImagesItemFacesFacesItem["FaceQuality"].asString());
|
||||||
auto emotionDetailsNode = value["EmotionDetails"];
|
auto emotionDetailsNode = value["EmotionDetails"];
|
||||||
if(!emotionDetailsNode["SAD"].isNull())
|
if(!emotionDetailsNode["SAD"].isNull())
|
||||||
facesObject.emotionDetails.sAD = std::stof(emotionDetailsNode["SAD"].asString());
|
facesObject.emotionDetails.sAD = std::stof(emotionDetailsNode["SAD"].asString());
|
||||||
@@ -220,28 +220,28 @@ void ListImagesResult::parse(const std::string &payload)
|
|||||||
facesObject.faceAttributes.headPose.yaw = std::stof(headPoseNode["Yaw"].asString());
|
facesObject.faceAttributes.headPose.yaw = std::stof(headPoseNode["Yaw"].asString());
|
||||||
imagesObject.faces.push_back(facesObject);
|
imagesObject.faces.push_back(facesObject);
|
||||||
}
|
}
|
||||||
auto allTagsNode = allImagesNode["Tags"]["TagsItem"];
|
auto allTagsNode = valueImagesImagesItem["Tags"]["TagsItem"];
|
||||||
for (auto allImagesNodeTagsTagsItem : allTagsNode)
|
for (auto valueImagesImagesItemTagsTagsItem : allTagsNode)
|
||||||
{
|
{
|
||||||
ImagesItem::TagsItem tagsObject;
|
ImagesItem::TagsItem tagsObject;
|
||||||
if(!allImagesNodeTagsTagsItem["TagConfidence"].isNull())
|
if(!valueImagesImagesItemTagsTagsItem["TagConfidence"].isNull())
|
||||||
tagsObject.tagConfidence = std::stof(allImagesNodeTagsTagsItem["TagConfidence"].asString());
|
tagsObject.tagConfidence = std::stof(valueImagesImagesItemTagsTagsItem["TagConfidence"].asString());
|
||||||
if(!allImagesNodeTagsTagsItem["TagLevel"].isNull())
|
if(!valueImagesImagesItemTagsTagsItem["TagLevel"].isNull())
|
||||||
tagsObject.tagLevel = std::stoi(allImagesNodeTagsTagsItem["TagLevel"].asString());
|
tagsObject.tagLevel = std::stoi(valueImagesImagesItemTagsTagsItem["TagLevel"].asString());
|
||||||
if(!allImagesNodeTagsTagsItem["TagName"].isNull())
|
if(!valueImagesImagesItemTagsTagsItem["TagName"].isNull())
|
||||||
tagsObject.tagName = allImagesNodeTagsTagsItem["TagName"].asString();
|
tagsObject.tagName = valueImagesImagesItemTagsTagsItem["TagName"].asString();
|
||||||
if(!allImagesNodeTagsTagsItem["ParentTagName"].isNull())
|
if(!valueImagesImagesItemTagsTagsItem["ParentTagName"].isNull())
|
||||||
tagsObject.parentTagName = allImagesNodeTagsTagsItem["ParentTagName"].asString();
|
tagsObject.parentTagName = valueImagesImagesItemTagsTagsItem["ParentTagName"].asString();
|
||||||
imagesObject.tags.push_back(tagsObject);
|
imagesObject.tags.push_back(tagsObject);
|
||||||
}
|
}
|
||||||
auto allOCRNode = allImagesNode["OCR"]["OCRItem"];
|
auto allOCRNode = valueImagesImagesItem["OCR"]["OCRItem"];
|
||||||
for (auto allImagesNodeOCROCRItem : allOCRNode)
|
for (auto valueImagesImagesItemOCROCRItem : allOCRNode)
|
||||||
{
|
{
|
||||||
ImagesItem::OCRItem oCRObject;
|
ImagesItem::OCRItem oCRObject;
|
||||||
if(!allImagesNodeOCROCRItem["OCRContents"].isNull())
|
if(!valueImagesImagesItemOCROCRItem["OCRContents"].isNull())
|
||||||
oCRObject.oCRContents = allImagesNodeOCROCRItem["OCRContents"].asString();
|
oCRObject.oCRContents = valueImagesImagesItemOCROCRItem["OCRContents"].asString();
|
||||||
if(!allImagesNodeOCROCRItem["OCRConfidence"].isNull())
|
if(!valueImagesImagesItemOCROCRItem["OCRConfidence"].isNull())
|
||||||
oCRObject.oCRConfidence = std::stof(allImagesNodeOCROCRItem["OCRConfidence"].asString());
|
oCRObject.oCRConfidence = std::stof(valueImagesImagesItemOCROCRItem["OCRConfidence"].asString());
|
||||||
auto oCRBoundaryNode = value["OCRBoundary"];
|
auto oCRBoundaryNode = value["OCRBoundary"];
|
||||||
if(!oCRBoundaryNode["Left"].isNull())
|
if(!oCRBoundaryNode["Left"].isNull())
|
||||||
oCRObject.oCRBoundary.left = std::stoi(oCRBoundaryNode["Left"].asString());
|
oCRObject.oCRBoundary.left = std::stoi(oCRBoundaryNode["Left"].asString());
|
||||||
@@ -253,18 +253,18 @@ void ListImagesResult::parse(const std::string &payload)
|
|||||||
oCRObject.oCRBoundary.height = std::stoi(oCRBoundaryNode["Height"].asString());
|
oCRObject.oCRBoundary.height = std::stoi(oCRBoundaryNode["Height"].asString());
|
||||||
imagesObject.oCR.push_back(oCRObject);
|
imagesObject.oCR.push_back(oCRObject);
|
||||||
}
|
}
|
||||||
auto allCelebrityNode = allImagesNode["Celebrity"]["CelebrityItem"];
|
auto allCelebrityNode = valueImagesImagesItem["Celebrity"]["CelebrityItem"];
|
||||||
for (auto allImagesNodeCelebrityCelebrityItem : allCelebrityNode)
|
for (auto valueImagesImagesItemCelebrityCelebrityItem : allCelebrityNode)
|
||||||
{
|
{
|
||||||
ImagesItem::CelebrityItem celebrityObject;
|
ImagesItem::CelebrityItem celebrityObject;
|
||||||
if(!allImagesNodeCelebrityCelebrityItem["CelebrityName"].isNull())
|
if(!valueImagesImagesItemCelebrityCelebrityItem["CelebrityName"].isNull())
|
||||||
celebrityObject.celebrityName = allImagesNodeCelebrityCelebrityItem["CelebrityName"].asString();
|
celebrityObject.celebrityName = valueImagesImagesItemCelebrityCelebrityItem["CelebrityName"].asString();
|
||||||
if(!allImagesNodeCelebrityCelebrityItem["CelebrityGender"].isNull())
|
if(!valueImagesImagesItemCelebrityCelebrityItem["CelebrityGender"].isNull())
|
||||||
celebrityObject.celebrityGender = allImagesNodeCelebrityCelebrityItem["CelebrityGender"].asString();
|
celebrityObject.celebrityGender = valueImagesImagesItemCelebrityCelebrityItem["CelebrityGender"].asString();
|
||||||
if(!allImagesNodeCelebrityCelebrityItem["CelebrityConfidence"].isNull())
|
if(!valueImagesImagesItemCelebrityCelebrityItem["CelebrityConfidence"].isNull())
|
||||||
celebrityObject.celebrityConfidence = std::stof(allImagesNodeCelebrityCelebrityItem["CelebrityConfidence"].asString());
|
celebrityObject.celebrityConfidence = std::stof(valueImagesImagesItemCelebrityCelebrityItem["CelebrityConfidence"].asString());
|
||||||
if(!allImagesNodeCelebrityCelebrityItem["CelebrityLibraryName"].isNull())
|
if(!valueImagesImagesItemCelebrityCelebrityItem["CelebrityLibraryName"].isNull())
|
||||||
celebrityObject.celebrityLibraryName = allImagesNodeCelebrityCelebrityItem["CelebrityLibraryName"].asString();
|
celebrityObject.celebrityLibraryName = valueImagesImagesItemCelebrityCelebrityItem["CelebrityLibraryName"].asString();
|
||||||
auto celebrityBoundaryNode = value["CelebrityBoundary"];
|
auto celebrityBoundaryNode = value["CelebrityBoundary"];
|
||||||
if(!celebrityBoundaryNode["Left"].isNull())
|
if(!celebrityBoundaryNode["Left"].isNull())
|
||||||
celebrityObject.celebrityBoundary.left = std::stoi(celebrityBoundaryNode["Left"].asString());
|
celebrityObject.celebrityBoundary.left = std::stoi(celebrityBoundaryNode["Left"].asString());
|
||||||
|
|||||||
@@ -85,30 +85,30 @@ void ListVideoAudiosResult::parse(const std::string &payload)
|
|||||||
audiosObject.remarksD = valueAudiosAudiosItem["RemarksD"].asString();
|
audiosObject.remarksD = valueAudiosAudiosItem["RemarksD"].asString();
|
||||||
if(!valueAudiosAudiosItem["ExternalId"].isNull())
|
if(!valueAudiosAudiosItem["ExternalId"].isNull())
|
||||||
audiosObject.externalId = valueAudiosAudiosItem["ExternalId"].asString();
|
audiosObject.externalId = valueAudiosAudiosItem["ExternalId"].asString();
|
||||||
auto allAudioTextsNode = allAudiosNode["AudioTexts"]["AudioTextsItem"];
|
auto allAudioTextsNode = valueAudiosAudiosItem["AudioTexts"]["AudioTextsItem"];
|
||||||
for (auto allAudiosNodeAudioTextsAudioTextsItem : allAudioTextsNode)
|
for (auto valueAudiosAudiosItemAudioTextsAudioTextsItem : allAudioTextsNode)
|
||||||
{
|
{
|
||||||
AudiosItem::AudioTextsItem audioTextsObject;
|
AudiosItem::AudioTextsItem audioTextsObject;
|
||||||
if(!allAudiosNodeAudioTextsAudioTextsItem["Text"].isNull())
|
if(!valueAudiosAudiosItemAudioTextsAudioTextsItem["Text"].isNull())
|
||||||
audioTextsObject.text = allAudiosNodeAudioTextsAudioTextsItem["Text"].asString();
|
audioTextsObject.text = valueAudiosAudiosItemAudioTextsAudioTextsItem["Text"].asString();
|
||||||
if(!allAudiosNodeAudioTextsAudioTextsItem["BeginTime"].isNull())
|
if(!valueAudiosAudiosItemAudioTextsAudioTextsItem["BeginTime"].isNull())
|
||||||
audioTextsObject.beginTime = std::stof(allAudiosNodeAudioTextsAudioTextsItem["BeginTime"].asString());
|
audioTextsObject.beginTime = std::stof(valueAudiosAudiosItemAudioTextsAudioTextsItem["BeginTime"].asString());
|
||||||
if(!allAudiosNodeAudioTextsAudioTextsItem["EndTime"].isNull())
|
if(!valueAudiosAudiosItemAudioTextsAudioTextsItem["EndTime"].isNull())
|
||||||
audioTextsObject.endTime = std::stof(allAudiosNodeAudioTextsAudioTextsItem["EndTime"].asString());
|
audioTextsObject.endTime = std::stof(valueAudiosAudiosItemAudioTextsAudioTextsItem["EndTime"].asString());
|
||||||
if(!allAudiosNodeAudioTextsAudioTextsItem["SilenceDuration"].isNull())
|
if(!valueAudiosAudiosItemAudioTextsAudioTextsItem["SilenceDuration"].isNull())
|
||||||
audioTextsObject.silenceDuration = std::stof(allAudiosNodeAudioTextsAudioTextsItem["SilenceDuration"].asString());
|
audioTextsObject.silenceDuration = std::stof(valueAudiosAudiosItemAudioTextsAudioTextsItem["SilenceDuration"].asString());
|
||||||
if(!allAudiosNodeAudioTextsAudioTextsItem["EmotionValue"].isNull())
|
if(!valueAudiosAudiosItemAudioTextsAudioTextsItem["EmotionValue"].isNull())
|
||||||
audioTextsObject.emotionValue = std::stof(allAudiosNodeAudioTextsAudioTextsItem["EmotionValue"].asString());
|
audioTextsObject.emotionValue = std::stof(valueAudiosAudiosItemAudioTextsAudioTextsItem["EmotionValue"].asString());
|
||||||
if(!allAudiosNodeAudioTextsAudioTextsItem["ChannelId"].isNull())
|
if(!valueAudiosAudiosItemAudioTextsAudioTextsItem["ChannelId"].isNull())
|
||||||
audioTextsObject.channelId = std::stoi(allAudiosNodeAudioTextsAudioTextsItem["ChannelId"].asString());
|
audioTextsObject.channelId = std::stoi(valueAudiosAudiosItemAudioTextsAudioTextsItem["ChannelId"].asString());
|
||||||
if(!allAudiosNodeAudioTextsAudioTextsItem["SpeechRate"].isNull())
|
if(!valueAudiosAudiosItemAudioTextsAudioTextsItem["SpeechRate"].isNull())
|
||||||
audioTextsObject.speechRate = std::stoi(allAudiosNodeAudioTextsAudioTextsItem["SpeechRate"].asString());
|
audioTextsObject.speechRate = std::stoi(valueAudiosAudiosItemAudioTextsAudioTextsItem["SpeechRate"].asString());
|
||||||
if(!allAudiosNodeAudioTextsAudioTextsItem["Confidence"].isNull())
|
if(!valueAudiosAudiosItemAudioTextsAudioTextsItem["Confidence"].isNull())
|
||||||
audioTextsObject.confidence = std::stof(allAudiosNodeAudioTextsAudioTextsItem["Confidence"].asString());
|
audioTextsObject.confidence = std::stof(valueAudiosAudiosItemAudioTextsAudioTextsItem["Confidence"].asString());
|
||||||
if(!allAudiosNodeAudioTextsAudioTextsItem["Person"].isNull())
|
if(!valueAudiosAudiosItemAudioTextsAudioTextsItem["Person"].isNull())
|
||||||
audioTextsObject.person = allAudiosNodeAudioTextsAudioTextsItem["Person"].asString();
|
audioTextsObject.person = valueAudiosAudiosItemAudioTextsAudioTextsItem["Person"].asString();
|
||||||
if(!allAudiosNodeAudioTextsAudioTextsItem["Library"].isNull())
|
if(!valueAudiosAudiosItemAudioTextsAudioTextsItem["Library"].isNull())
|
||||||
audioTextsObject.library = allAudiosNodeAudioTextsAudioTextsItem["Library"].asString();
|
audioTextsObject.library = valueAudiosAudiosItemAudioTextsAudioTextsItem["Library"].asString();
|
||||||
audiosObject.audioTexts.push_back(audioTextsObject);
|
audiosObject.audioTexts.push_back(audioTextsObject);
|
||||||
}
|
}
|
||||||
audios_.push_back(audiosObject);
|
audios_.push_back(audiosObject);
|
||||||
|
|||||||
@@ -105,30 +105,30 @@ void ListVideoFramesResult::parse(const std::string &payload)
|
|||||||
framesObject.remarksD = valueFramesFramesItem["RemarksD"].asString();
|
framesObject.remarksD = valueFramesFramesItem["RemarksD"].asString();
|
||||||
if(!valueFramesFramesItem["ExternalId"].isNull())
|
if(!valueFramesFramesItem["ExternalId"].isNull())
|
||||||
framesObject.externalId = valueFramesFramesItem["ExternalId"].asString();
|
framesObject.externalId = valueFramesFramesItem["ExternalId"].asString();
|
||||||
auto allFacesNode = allFramesNode["Faces"]["FacesItem"];
|
auto allFacesNode = valueFramesFramesItem["Faces"]["FacesItem"];
|
||||||
for (auto allFramesNodeFacesFacesItem : allFacesNode)
|
for (auto valueFramesFramesItemFacesFacesItem : allFacesNode)
|
||||||
{
|
{
|
||||||
FramesItem::FacesItem facesObject;
|
FramesItem::FacesItem facesObject;
|
||||||
if(!allFramesNodeFacesFacesItem["Age"].isNull())
|
if(!valueFramesFramesItemFacesFacesItem["Age"].isNull())
|
||||||
facesObject.age = std::stoi(allFramesNodeFacesFacesItem["Age"].asString());
|
facesObject.age = std::stoi(valueFramesFramesItemFacesFacesItem["Age"].asString());
|
||||||
if(!allFramesNodeFacesFacesItem["GenderConfidence"].isNull())
|
if(!valueFramesFramesItemFacesFacesItem["GenderConfidence"].isNull())
|
||||||
facesObject.genderConfidence = std::stof(allFramesNodeFacesFacesItem["GenderConfidence"].asString());
|
facesObject.genderConfidence = std::stof(valueFramesFramesItemFacesFacesItem["GenderConfidence"].asString());
|
||||||
if(!allFramesNodeFacesFacesItem["Attractive"].isNull())
|
if(!valueFramesFramesItemFacesFacesItem["Attractive"].isNull())
|
||||||
facesObject.attractive = std::stof(allFramesNodeFacesFacesItem["Attractive"].asString());
|
facesObject.attractive = std::stof(valueFramesFramesItemFacesFacesItem["Attractive"].asString());
|
||||||
if(!allFramesNodeFacesFacesItem["Gender"].isNull())
|
if(!valueFramesFramesItemFacesFacesItem["Gender"].isNull())
|
||||||
facesObject.gender = allFramesNodeFacesFacesItem["Gender"].asString();
|
facesObject.gender = valueFramesFramesItemFacesFacesItem["Gender"].asString();
|
||||||
if(!allFramesNodeFacesFacesItem["FaceConfidence"].isNull())
|
if(!valueFramesFramesItemFacesFacesItem["FaceConfidence"].isNull())
|
||||||
facesObject.faceConfidence = std::stof(allFramesNodeFacesFacesItem["FaceConfidence"].asString());
|
facesObject.faceConfidence = std::stof(valueFramesFramesItemFacesFacesItem["FaceConfidence"].asString());
|
||||||
if(!allFramesNodeFacesFacesItem["Emotion"].isNull())
|
if(!valueFramesFramesItemFacesFacesItem["Emotion"].isNull())
|
||||||
facesObject.emotion = allFramesNodeFacesFacesItem["Emotion"].asString();
|
facesObject.emotion = valueFramesFramesItemFacesFacesItem["Emotion"].asString();
|
||||||
if(!allFramesNodeFacesFacesItem["FaceId"].isNull())
|
if(!valueFramesFramesItemFacesFacesItem["FaceId"].isNull())
|
||||||
facesObject.faceId = allFramesNodeFacesFacesItem["FaceId"].asString();
|
facesObject.faceId = valueFramesFramesItemFacesFacesItem["FaceId"].asString();
|
||||||
if(!allFramesNodeFacesFacesItem["EmotionConfidence"].isNull())
|
if(!valueFramesFramesItemFacesFacesItem["EmotionConfidence"].isNull())
|
||||||
facesObject.emotionConfidence = std::stof(allFramesNodeFacesFacesItem["EmotionConfidence"].asString());
|
facesObject.emotionConfidence = std::stof(valueFramesFramesItemFacesFacesItem["EmotionConfidence"].asString());
|
||||||
if(!allFramesNodeFacesFacesItem["GroupId"].isNull())
|
if(!valueFramesFramesItemFacesFacesItem["GroupId"].isNull())
|
||||||
facesObject.groupId = allFramesNodeFacesFacesItem["GroupId"].asString();
|
facesObject.groupId = valueFramesFramesItemFacesFacesItem["GroupId"].asString();
|
||||||
if(!allFramesNodeFacesFacesItem["FaceQuality"].isNull())
|
if(!valueFramesFramesItemFacesFacesItem["FaceQuality"].isNull())
|
||||||
facesObject.faceQuality = std::stof(allFramesNodeFacesFacesItem["FaceQuality"].asString());
|
facesObject.faceQuality = std::stof(valueFramesFramesItemFacesFacesItem["FaceQuality"].asString());
|
||||||
auto emotionDetailsNode = value["EmotionDetails"];
|
auto emotionDetailsNode = value["EmotionDetails"];
|
||||||
if(!emotionDetailsNode["SAD"].isNull())
|
if(!emotionDetailsNode["SAD"].isNull())
|
||||||
facesObject.emotionDetails.sAD = std::stof(emotionDetailsNode["SAD"].asString());
|
facesObject.emotionDetails.sAD = std::stof(emotionDetailsNode["SAD"].asString());
|
||||||
@@ -179,28 +179,28 @@ void ListVideoFramesResult::parse(const std::string &payload)
|
|||||||
facesObject.faceAttributes.headPose.yaw = std::stof(headPoseNode["Yaw"].asString());
|
facesObject.faceAttributes.headPose.yaw = std::stof(headPoseNode["Yaw"].asString());
|
||||||
framesObject.faces.push_back(facesObject);
|
framesObject.faces.push_back(facesObject);
|
||||||
}
|
}
|
||||||
auto allTagsNode = allFramesNode["Tags"]["TagsItem"];
|
auto allTagsNode = valueFramesFramesItem["Tags"]["TagsItem"];
|
||||||
for (auto allFramesNodeTagsTagsItem : allTagsNode)
|
for (auto valueFramesFramesItemTagsTagsItem : allTagsNode)
|
||||||
{
|
{
|
||||||
FramesItem::TagsItem tagsObject;
|
FramesItem::TagsItem tagsObject;
|
||||||
if(!allFramesNodeTagsTagsItem["TagConfidence"].isNull())
|
if(!valueFramesFramesItemTagsTagsItem["TagConfidence"].isNull())
|
||||||
tagsObject.tagConfidence = std::stof(allFramesNodeTagsTagsItem["TagConfidence"].asString());
|
tagsObject.tagConfidence = std::stof(valueFramesFramesItemTagsTagsItem["TagConfidence"].asString());
|
||||||
if(!allFramesNodeTagsTagsItem["TagLevel"].isNull())
|
if(!valueFramesFramesItemTagsTagsItem["TagLevel"].isNull())
|
||||||
tagsObject.tagLevel = std::stoi(allFramesNodeTagsTagsItem["TagLevel"].asString());
|
tagsObject.tagLevel = std::stoi(valueFramesFramesItemTagsTagsItem["TagLevel"].asString());
|
||||||
if(!allFramesNodeTagsTagsItem["TagName"].isNull())
|
if(!valueFramesFramesItemTagsTagsItem["TagName"].isNull())
|
||||||
tagsObject.tagName = allFramesNodeTagsTagsItem["TagName"].asString();
|
tagsObject.tagName = valueFramesFramesItemTagsTagsItem["TagName"].asString();
|
||||||
if(!allFramesNodeTagsTagsItem["ParentTagName"].isNull())
|
if(!valueFramesFramesItemTagsTagsItem["ParentTagName"].isNull())
|
||||||
tagsObject.parentTagName = allFramesNodeTagsTagsItem["ParentTagName"].asString();
|
tagsObject.parentTagName = valueFramesFramesItemTagsTagsItem["ParentTagName"].asString();
|
||||||
framesObject.tags.push_back(tagsObject);
|
framesObject.tags.push_back(tagsObject);
|
||||||
}
|
}
|
||||||
auto allOCRNode = allFramesNode["OCR"]["OCRItem"];
|
auto allOCRNode = valueFramesFramesItem["OCR"]["OCRItem"];
|
||||||
for (auto allFramesNodeOCROCRItem : allOCRNode)
|
for (auto valueFramesFramesItemOCROCRItem : allOCRNode)
|
||||||
{
|
{
|
||||||
FramesItem::OCRItem oCRObject;
|
FramesItem::OCRItem oCRObject;
|
||||||
if(!allFramesNodeOCROCRItem["OCRContents"].isNull())
|
if(!valueFramesFramesItemOCROCRItem["OCRContents"].isNull())
|
||||||
oCRObject.oCRContents = allFramesNodeOCROCRItem["OCRContents"].asString();
|
oCRObject.oCRContents = valueFramesFramesItemOCROCRItem["OCRContents"].asString();
|
||||||
if(!allFramesNodeOCROCRItem["OCRConfidence"].isNull())
|
if(!valueFramesFramesItemOCROCRItem["OCRConfidence"].isNull())
|
||||||
oCRObject.oCRConfidence = std::stof(allFramesNodeOCROCRItem["OCRConfidence"].asString());
|
oCRObject.oCRConfidence = std::stof(valueFramesFramesItemOCROCRItem["OCRConfidence"].asString());
|
||||||
auto oCRBoundaryNode = value["OCRBoundary"];
|
auto oCRBoundaryNode = value["OCRBoundary"];
|
||||||
if(!oCRBoundaryNode["Left"].isNull())
|
if(!oCRBoundaryNode["Left"].isNull())
|
||||||
oCRObject.oCRBoundary.left = std::stoi(oCRBoundaryNode["Left"].asString());
|
oCRObject.oCRBoundary.left = std::stoi(oCRBoundaryNode["Left"].asString());
|
||||||
@@ -212,18 +212,18 @@ void ListVideoFramesResult::parse(const std::string &payload)
|
|||||||
oCRObject.oCRBoundary.height = std::stoi(oCRBoundaryNode["Height"].asString());
|
oCRObject.oCRBoundary.height = std::stoi(oCRBoundaryNode["Height"].asString());
|
||||||
framesObject.oCR.push_back(oCRObject);
|
framesObject.oCR.push_back(oCRObject);
|
||||||
}
|
}
|
||||||
auto allCelebrityNode = allFramesNode["Celebrity"]["CelebrityItem"];
|
auto allCelebrityNode = valueFramesFramesItem["Celebrity"]["CelebrityItem"];
|
||||||
for (auto allFramesNodeCelebrityCelebrityItem : allCelebrityNode)
|
for (auto valueFramesFramesItemCelebrityCelebrityItem : allCelebrityNode)
|
||||||
{
|
{
|
||||||
FramesItem::CelebrityItem celebrityObject;
|
FramesItem::CelebrityItem celebrityObject;
|
||||||
if(!allFramesNodeCelebrityCelebrityItem["CelebrityName"].isNull())
|
if(!valueFramesFramesItemCelebrityCelebrityItem["CelebrityName"].isNull())
|
||||||
celebrityObject.celebrityName = allFramesNodeCelebrityCelebrityItem["CelebrityName"].asString();
|
celebrityObject.celebrityName = valueFramesFramesItemCelebrityCelebrityItem["CelebrityName"].asString();
|
||||||
if(!allFramesNodeCelebrityCelebrityItem["CelebrityGender"].isNull())
|
if(!valueFramesFramesItemCelebrityCelebrityItem["CelebrityGender"].isNull())
|
||||||
celebrityObject.celebrityGender = allFramesNodeCelebrityCelebrityItem["CelebrityGender"].asString();
|
celebrityObject.celebrityGender = valueFramesFramesItemCelebrityCelebrityItem["CelebrityGender"].asString();
|
||||||
if(!allFramesNodeCelebrityCelebrityItem["CelebrityConfidence"].isNull())
|
if(!valueFramesFramesItemCelebrityCelebrityItem["CelebrityConfidence"].isNull())
|
||||||
celebrityObject.celebrityConfidence = std::stof(allFramesNodeCelebrityCelebrityItem["CelebrityConfidence"].asString());
|
celebrityObject.celebrityConfidence = std::stof(valueFramesFramesItemCelebrityCelebrityItem["CelebrityConfidence"].asString());
|
||||||
if(!allFramesNodeCelebrityCelebrityItem["CelebrityLibraryName"].isNull())
|
if(!valueFramesFramesItemCelebrityCelebrityItem["CelebrityLibraryName"].isNull())
|
||||||
celebrityObject.celebrityLibraryName = allFramesNodeCelebrityCelebrityItem["CelebrityLibraryName"].asString();
|
celebrityObject.celebrityLibraryName = valueFramesFramesItemCelebrityCelebrityItem["CelebrityLibraryName"].asString();
|
||||||
auto celebrityBoundaryNode = value["CelebrityBoundary"];
|
auto celebrityBoundaryNode = value["CelebrityBoundary"];
|
||||||
if(!celebrityBoundaryNode["Left"].isNull())
|
if(!celebrityBoundaryNode["Left"].isNull())
|
||||||
celebrityObject.celebrityBoundary.left = std::stoi(celebrityBoundaryNode["Left"].asString());
|
celebrityObject.celebrityBoundary.left = std::stoi(celebrityBoundaryNode["Left"].asString());
|
||||||
|
|||||||
@@ -95,46 +95,46 @@ void ListVideosResult::parse(const std::string &payload)
|
|||||||
videosObject.remarksD = valueVideosVideosItem["RemarksD"].asString();
|
videosObject.remarksD = valueVideosVideosItem["RemarksD"].asString();
|
||||||
if(!valueVideosVideosItem["ExternalId"].isNull())
|
if(!valueVideosVideosItem["ExternalId"].isNull())
|
||||||
videosObject.externalId = valueVideosVideosItem["ExternalId"].asString();
|
videosObject.externalId = valueVideosVideosItem["ExternalId"].asString();
|
||||||
auto allVideoTagsNode = allVideosNode["VideoTags"]["VideoTagsItem"];
|
auto allVideoTagsNode = valueVideosVideosItem["VideoTags"]["VideoTagsItem"];
|
||||||
for (auto allVideosNodeVideoTagsVideoTagsItem : allVideoTagsNode)
|
for (auto valueVideosVideosItemVideoTagsVideoTagsItem : allVideoTagsNode)
|
||||||
{
|
{
|
||||||
VideosItem::VideoTagsItem videoTagsObject;
|
VideosItem::VideoTagsItem videoTagsObject;
|
||||||
if(!allVideosNodeVideoTagsVideoTagsItem["TagName"].isNull())
|
if(!valueVideosVideosItemVideoTagsVideoTagsItem["TagName"].isNull())
|
||||||
videoTagsObject.tagName = allVideosNodeVideoTagsVideoTagsItem["TagName"].asString();
|
videoTagsObject.tagName = valueVideosVideosItemVideoTagsVideoTagsItem["TagName"].asString();
|
||||||
if(!allVideosNodeVideoTagsVideoTagsItem["ParentTagName"].isNull())
|
if(!valueVideosVideosItemVideoTagsVideoTagsItem["ParentTagName"].isNull())
|
||||||
videoTagsObject.parentTagName = allVideosNodeVideoTagsVideoTagsItem["ParentTagName"].asString();
|
videoTagsObject.parentTagName = valueVideosVideosItemVideoTagsVideoTagsItem["ParentTagName"].asString();
|
||||||
if(!allVideosNodeVideoTagsVideoTagsItem["TagConfidence"].isNull())
|
if(!valueVideosVideosItemVideoTagsVideoTagsItem["TagConfidence"].isNull())
|
||||||
videoTagsObject.tagConfidence = std::stof(allVideosNodeVideoTagsVideoTagsItem["TagConfidence"].asString());
|
videoTagsObject.tagConfidence = std::stof(valueVideosVideosItemVideoTagsVideoTagsItem["TagConfidence"].asString());
|
||||||
if(!allVideosNodeVideoTagsVideoTagsItem["TagLevel"].isNull())
|
if(!valueVideosVideosItemVideoTagsVideoTagsItem["TagLevel"].isNull())
|
||||||
videoTagsObject.tagLevel = std::stoi(allVideosNodeVideoTagsVideoTagsItem["TagLevel"].asString());
|
videoTagsObject.tagLevel = std::stoi(valueVideosVideosItemVideoTagsVideoTagsItem["TagLevel"].asString());
|
||||||
videosObject.videoTags.push_back(videoTagsObject);
|
videosObject.videoTags.push_back(videoTagsObject);
|
||||||
}
|
}
|
||||||
auto allCelebrityNode = allVideosNode["Celebrity"]["CelebrityItem"];
|
auto allCelebrityNode = valueVideosVideosItem["Celebrity"]["CelebrityItem"];
|
||||||
for (auto allVideosNodeCelebrityCelebrityItem : allCelebrityNode)
|
for (auto valueVideosVideosItemCelebrityCelebrityItem : allCelebrityNode)
|
||||||
{
|
{
|
||||||
VideosItem::CelebrityItem celebrityObject;
|
VideosItem::CelebrityItem celebrityObject;
|
||||||
if(!allVideosNodeCelebrityCelebrityItem["CelebrityName"].isNull())
|
if(!valueVideosVideosItemCelebrityCelebrityItem["CelebrityName"].isNull())
|
||||||
celebrityObject.celebrityName = allVideosNodeCelebrityCelebrityItem["CelebrityName"].asString();
|
celebrityObject.celebrityName = valueVideosVideosItemCelebrityCelebrityItem["CelebrityName"].asString();
|
||||||
if(!allVideosNodeCelebrityCelebrityItem["CelebrityNum"].isNull())
|
if(!valueVideosVideosItemCelebrityCelebrityItem["CelebrityNum"].isNull())
|
||||||
celebrityObject.celebrityNum = std::stoi(allVideosNodeCelebrityCelebrityItem["CelebrityNum"].asString());
|
celebrityObject.celebrityNum = std::stoi(valueVideosVideosItemCelebrityCelebrityItem["CelebrityNum"].asString());
|
||||||
if(!allVideosNodeCelebrityCelebrityItem["CelebrityLibraryName"].isNull())
|
if(!valueVideosVideosItemCelebrityCelebrityItem["CelebrityLibraryName"].isNull())
|
||||||
celebrityObject.celebrityLibraryName = allVideosNodeCelebrityCelebrityItem["CelebrityLibraryName"].asString();
|
celebrityObject.celebrityLibraryName = valueVideosVideosItemCelebrityCelebrityItem["CelebrityLibraryName"].asString();
|
||||||
videosObject.celebrity.push_back(celebrityObject);
|
videosObject.celebrity.push_back(celebrityObject);
|
||||||
}
|
}
|
||||||
auto allPersonsNode = allVideosNode["Persons"]["PersonsItem"];
|
auto allPersonsNode = valueVideosVideosItem["Persons"]["PersonsItem"];
|
||||||
for (auto allVideosNodePersonsPersonsItem : allPersonsNode)
|
for (auto valueVideosVideosItemPersonsPersonsItem : allPersonsNode)
|
||||||
{
|
{
|
||||||
VideosItem::PersonsItem personsObject;
|
VideosItem::PersonsItem personsObject;
|
||||||
if(!allVideosNodePersonsPersonsItem["PersonId"].isNull())
|
if(!valueVideosVideosItemPersonsPersonsItem["PersonId"].isNull())
|
||||||
personsObject.personId = allVideosNodePersonsPersonsItem["PersonId"].asString();
|
personsObject.personId = valueVideosVideosItemPersonsPersonsItem["PersonId"].asString();
|
||||||
if(!allVideosNodePersonsPersonsItem["Age"].isNull())
|
if(!valueVideosVideosItemPersonsPersonsItem["Age"].isNull())
|
||||||
personsObject.age = std::stoi(allVideosNodePersonsPersonsItem["Age"].asString());
|
personsObject.age = std::stoi(valueVideosVideosItemPersonsPersonsItem["Age"].asString());
|
||||||
if(!allVideosNodePersonsPersonsItem["AgeConfidence"].isNull())
|
if(!valueVideosVideosItemPersonsPersonsItem["AgeConfidence"].isNull())
|
||||||
personsObject.ageConfidence = std::stof(allVideosNodePersonsPersonsItem["AgeConfidence"].asString());
|
personsObject.ageConfidence = std::stof(valueVideosVideosItemPersonsPersonsItem["AgeConfidence"].asString());
|
||||||
if(!allVideosNodePersonsPersonsItem["Gender"].isNull())
|
if(!valueVideosVideosItemPersonsPersonsItem["Gender"].isNull())
|
||||||
personsObject.gender = allVideosNodePersonsPersonsItem["Gender"].asString();
|
personsObject.gender = valueVideosVideosItemPersonsPersonsItem["Gender"].asString();
|
||||||
if(!allVideosNodePersonsPersonsItem["GenderConfidence"].isNull())
|
if(!valueVideosVideosItemPersonsPersonsItem["GenderConfidence"].isNull())
|
||||||
personsObject.genderConfidence = std::stof(allVideosNodePersonsPersonsItem["GenderConfidence"].asString());
|
personsObject.genderConfidence = std::stof(valueVideosVideosItemPersonsPersonsItem["GenderConfidence"].asString());
|
||||||
videosObject.persons.push_back(personsObject);
|
videosObject.persons.push_back(personsObject);
|
||||||
}
|
}
|
||||||
videos_.push_back(videosObject);
|
videos_.push_back(videosObject);
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ set(ocr_public_header
|
|||||||
include/alibabacloud/ocr/OcrExport.h )
|
include/alibabacloud/ocr/OcrExport.h )
|
||||||
|
|
||||||
set(ocr_public_header_model
|
set(ocr_public_header_model
|
||||||
|
include/alibabacloud/ocr/model/DetectCardScreenshotRequest.h
|
||||||
|
include/alibabacloud/ocr/model/DetectCardScreenshotResult.h
|
||||||
include/alibabacloud/ocr/model/GetAsyncJobResultRequest.h
|
include/alibabacloud/ocr/model/GetAsyncJobResultRequest.h
|
||||||
include/alibabacloud/ocr/model/GetAsyncJobResultResult.h
|
include/alibabacloud/ocr/model/GetAsyncJobResultResult.h
|
||||||
include/alibabacloud/ocr/model/RecognizeAccountPageRequest.h
|
include/alibabacloud/ocr/model/RecognizeAccountPageRequest.h
|
||||||
@@ -45,6 +47,8 @@ set(ocr_public_header_model
|
|||||||
include/alibabacloud/ocr/model/RecognizeLicensePlateResult.h
|
include/alibabacloud/ocr/model/RecognizeLicensePlateResult.h
|
||||||
include/alibabacloud/ocr/model/RecognizePassportMRZRequest.h
|
include/alibabacloud/ocr/model/RecognizePassportMRZRequest.h
|
||||||
include/alibabacloud/ocr/model/RecognizePassportMRZResult.h
|
include/alibabacloud/ocr/model/RecognizePassportMRZResult.h
|
||||||
|
include/alibabacloud/ocr/model/RecognizePoiNameRequest.h
|
||||||
|
include/alibabacloud/ocr/model/RecognizePoiNameResult.h
|
||||||
include/alibabacloud/ocr/model/RecognizeQrCodeRequest.h
|
include/alibabacloud/ocr/model/RecognizeQrCodeRequest.h
|
||||||
include/alibabacloud/ocr/model/RecognizeQrCodeResult.h
|
include/alibabacloud/ocr/model/RecognizeQrCodeResult.h
|
||||||
include/alibabacloud/ocr/model/RecognizeStampRequest.h
|
include/alibabacloud/ocr/model/RecognizeStampRequest.h
|
||||||
@@ -68,6 +72,8 @@ set(ocr_public_header_model
|
|||||||
|
|
||||||
set(ocr_src
|
set(ocr_src
|
||||||
src/OcrClient.cc
|
src/OcrClient.cc
|
||||||
|
src/model/DetectCardScreenshotRequest.cc
|
||||||
|
src/model/DetectCardScreenshotResult.cc
|
||||||
src/model/GetAsyncJobResultRequest.cc
|
src/model/GetAsyncJobResultRequest.cc
|
||||||
src/model/GetAsyncJobResultResult.cc
|
src/model/GetAsyncJobResultResult.cc
|
||||||
src/model/RecognizeAccountPageRequest.cc
|
src/model/RecognizeAccountPageRequest.cc
|
||||||
@@ -92,6 +98,8 @@ set(ocr_src
|
|||||||
src/model/RecognizeLicensePlateResult.cc
|
src/model/RecognizeLicensePlateResult.cc
|
||||||
src/model/RecognizePassportMRZRequest.cc
|
src/model/RecognizePassportMRZRequest.cc
|
||||||
src/model/RecognizePassportMRZResult.cc
|
src/model/RecognizePassportMRZResult.cc
|
||||||
|
src/model/RecognizePoiNameRequest.cc
|
||||||
|
src/model/RecognizePoiNameResult.cc
|
||||||
src/model/RecognizeQrCodeRequest.cc
|
src/model/RecognizeQrCodeRequest.cc
|
||||||
src/model/RecognizeQrCodeResult.cc
|
src/model/RecognizeQrCodeResult.cc
|
||||||
src/model/RecognizeStampRequest.cc
|
src/model/RecognizeStampRequest.cc
|
||||||
|
|||||||
@@ -22,6 +22,8 @@
|
|||||||
#include <alibabacloud/core/EndpointProvider.h>
|
#include <alibabacloud/core/EndpointProvider.h>
|
||||||
#include <alibabacloud/core/RpcServiceClient.h>
|
#include <alibabacloud/core/RpcServiceClient.h>
|
||||||
#include "OcrExport.h"
|
#include "OcrExport.h"
|
||||||
|
#include "model/DetectCardScreenshotRequest.h"
|
||||||
|
#include "model/DetectCardScreenshotResult.h"
|
||||||
#include "model/GetAsyncJobResultRequest.h"
|
#include "model/GetAsyncJobResultRequest.h"
|
||||||
#include "model/GetAsyncJobResultResult.h"
|
#include "model/GetAsyncJobResultResult.h"
|
||||||
#include "model/RecognizeAccountPageRequest.h"
|
#include "model/RecognizeAccountPageRequest.h"
|
||||||
@@ -46,6 +48,8 @@
|
|||||||
#include "model/RecognizeLicensePlateResult.h"
|
#include "model/RecognizeLicensePlateResult.h"
|
||||||
#include "model/RecognizePassportMRZRequest.h"
|
#include "model/RecognizePassportMRZRequest.h"
|
||||||
#include "model/RecognizePassportMRZResult.h"
|
#include "model/RecognizePassportMRZResult.h"
|
||||||
|
#include "model/RecognizePoiNameRequest.h"
|
||||||
|
#include "model/RecognizePoiNameResult.h"
|
||||||
#include "model/RecognizeQrCodeRequest.h"
|
#include "model/RecognizeQrCodeRequest.h"
|
||||||
#include "model/RecognizeQrCodeResult.h"
|
#include "model/RecognizeQrCodeResult.h"
|
||||||
#include "model/RecognizeStampRequest.h"
|
#include "model/RecognizeStampRequest.h"
|
||||||
@@ -75,6 +79,9 @@ namespace AlibabaCloud
|
|||||||
class ALIBABACLOUD_OCR_EXPORT OcrClient : public RpcServiceClient
|
class ALIBABACLOUD_OCR_EXPORT OcrClient : public RpcServiceClient
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
typedef Outcome<Error, Model::DetectCardScreenshotResult> DetectCardScreenshotOutcome;
|
||||||
|
typedef std::future<DetectCardScreenshotOutcome> DetectCardScreenshotOutcomeCallable;
|
||||||
|
typedef std::function<void(const OcrClient*, const Model::DetectCardScreenshotRequest&, const DetectCardScreenshotOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectCardScreenshotAsyncHandler;
|
||||||
typedef Outcome<Error, Model::GetAsyncJobResultResult> GetAsyncJobResultOutcome;
|
typedef Outcome<Error, Model::GetAsyncJobResultResult> GetAsyncJobResultOutcome;
|
||||||
typedef std::future<GetAsyncJobResultOutcome> GetAsyncJobResultOutcomeCallable;
|
typedef std::future<GetAsyncJobResultOutcome> GetAsyncJobResultOutcomeCallable;
|
||||||
typedef std::function<void(const OcrClient*, const Model::GetAsyncJobResultRequest&, const GetAsyncJobResultOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetAsyncJobResultAsyncHandler;
|
typedef std::function<void(const OcrClient*, const Model::GetAsyncJobResultRequest&, const GetAsyncJobResultOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetAsyncJobResultAsyncHandler;
|
||||||
@@ -111,6 +118,9 @@ namespace AlibabaCloud
|
|||||||
typedef Outcome<Error, Model::RecognizePassportMRZResult> RecognizePassportMRZOutcome;
|
typedef Outcome<Error, Model::RecognizePassportMRZResult> RecognizePassportMRZOutcome;
|
||||||
typedef std::future<RecognizePassportMRZOutcome> RecognizePassportMRZOutcomeCallable;
|
typedef std::future<RecognizePassportMRZOutcome> RecognizePassportMRZOutcomeCallable;
|
||||||
typedef std::function<void(const OcrClient*, const Model::RecognizePassportMRZRequest&, const RecognizePassportMRZOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizePassportMRZAsyncHandler;
|
typedef std::function<void(const OcrClient*, const Model::RecognizePassportMRZRequest&, const RecognizePassportMRZOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizePassportMRZAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::RecognizePoiNameResult> RecognizePoiNameOutcome;
|
||||||
|
typedef std::future<RecognizePoiNameOutcome> RecognizePoiNameOutcomeCallable;
|
||||||
|
typedef std::function<void(const OcrClient*, const Model::RecognizePoiNameRequest&, const RecognizePoiNameOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizePoiNameAsyncHandler;
|
||||||
typedef Outcome<Error, Model::RecognizeQrCodeResult> RecognizeQrCodeOutcome;
|
typedef Outcome<Error, Model::RecognizeQrCodeResult> RecognizeQrCodeOutcome;
|
||||||
typedef std::future<RecognizeQrCodeOutcome> RecognizeQrCodeOutcomeCallable;
|
typedef std::future<RecognizeQrCodeOutcome> RecognizeQrCodeOutcomeCallable;
|
||||||
typedef std::function<void(const OcrClient*, const Model::RecognizeQrCodeRequest&, const RecognizeQrCodeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeQrCodeAsyncHandler;
|
typedef std::function<void(const OcrClient*, const Model::RecognizeQrCodeRequest&, const RecognizeQrCodeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeQrCodeAsyncHandler;
|
||||||
@@ -146,6 +156,9 @@ namespace AlibabaCloud
|
|||||||
OcrClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
OcrClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||||
OcrClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
OcrClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||||
~OcrClient();
|
~OcrClient();
|
||||||
|
DetectCardScreenshotOutcome detectCardScreenshot(const Model::DetectCardScreenshotRequest &request)const;
|
||||||
|
void detectCardScreenshotAsync(const Model::DetectCardScreenshotRequest& request, const DetectCardScreenshotAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
DetectCardScreenshotOutcomeCallable detectCardScreenshotCallable(const Model::DetectCardScreenshotRequest& request) const;
|
||||||
GetAsyncJobResultOutcome getAsyncJobResult(const Model::GetAsyncJobResultRequest &request)const;
|
GetAsyncJobResultOutcome getAsyncJobResult(const Model::GetAsyncJobResultRequest &request)const;
|
||||||
void getAsyncJobResultAsync(const Model::GetAsyncJobResultRequest& request, const GetAsyncJobResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
void getAsyncJobResultAsync(const Model::GetAsyncJobResultRequest& request, const GetAsyncJobResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
GetAsyncJobResultOutcomeCallable getAsyncJobResultCallable(const Model::GetAsyncJobResultRequest& request) const;
|
GetAsyncJobResultOutcomeCallable getAsyncJobResultCallable(const Model::GetAsyncJobResultRequest& request) const;
|
||||||
@@ -182,6 +195,9 @@ namespace AlibabaCloud
|
|||||||
RecognizePassportMRZOutcome recognizePassportMRZ(const Model::RecognizePassportMRZRequest &request)const;
|
RecognizePassportMRZOutcome recognizePassportMRZ(const Model::RecognizePassportMRZRequest &request)const;
|
||||||
void recognizePassportMRZAsync(const Model::RecognizePassportMRZRequest& request, const RecognizePassportMRZAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
void recognizePassportMRZAsync(const Model::RecognizePassportMRZRequest& request, const RecognizePassportMRZAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
RecognizePassportMRZOutcomeCallable recognizePassportMRZCallable(const Model::RecognizePassportMRZRequest& request) const;
|
RecognizePassportMRZOutcomeCallable recognizePassportMRZCallable(const Model::RecognizePassportMRZRequest& request) const;
|
||||||
|
RecognizePoiNameOutcome recognizePoiName(const Model::RecognizePoiNameRequest &request)const;
|
||||||
|
void recognizePoiNameAsync(const Model::RecognizePoiNameRequest& request, const RecognizePoiNameAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
RecognizePoiNameOutcomeCallable recognizePoiNameCallable(const Model::RecognizePoiNameRequest& request) const;
|
||||||
RecognizeQrCodeOutcome recognizeQrCode(const Model::RecognizeQrCodeRequest &request)const;
|
RecognizeQrCodeOutcome recognizeQrCode(const Model::RecognizeQrCodeRequest &request)const;
|
||||||
void recognizeQrCodeAsync(const Model::RecognizeQrCodeRequest& request, const RecognizeQrCodeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
void recognizeQrCodeAsync(const Model::RecognizeQrCodeRequest& request, const RecognizeQrCodeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
RecognizeQrCodeOutcomeCallable recognizeQrCodeCallable(const Model::RecognizeQrCodeRequest& request) const;
|
RecognizeQrCodeOutcomeCallable recognizeQrCodeCallable(const Model::RecognizeQrCodeRequest& request) const;
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_OCR_MODEL_DETECTCARDSCREENSHOTREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_OCR_MODEL_DETECTCARDSCREENSHOTREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/ocr/OcrExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Ocr
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OCR_EXPORT DetectCardScreenshotRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
DetectCardScreenshotRequest();
|
||||||
|
~DetectCardScreenshotRequest();
|
||||||
|
|
||||||
|
std::string getImageURL()const;
|
||||||
|
void setImageURL(const std::string& imageURL);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string imageURL_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OCR_MODEL_DETECTCARDSCREENSHOTREQUEST_H_
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_OCR_MODEL_DETECTCARDSCREENSHOTRESULT_H_
|
||||||
|
#define ALIBABACLOUD_OCR_MODEL_DETECTCARDSCREENSHOTRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/ocr/OcrExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Ocr
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OCR_EXPORT DetectCardScreenshotResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Data
|
||||||
|
{
|
||||||
|
struct SpoofResult
|
||||||
|
{
|
||||||
|
struct ResultMap
|
||||||
|
{
|
||||||
|
float screenScore;
|
||||||
|
float screenThreshold;
|
||||||
|
};
|
||||||
|
ResultMap resultMap;
|
||||||
|
bool isSpoof;
|
||||||
|
};
|
||||||
|
SpoofResult spoofResult;
|
||||||
|
bool isBlur;
|
||||||
|
bool isCard;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
DetectCardScreenshotResult();
|
||||||
|
explicit DetectCardScreenshotResult(const std::string &payload);
|
||||||
|
~DetectCardScreenshotResult();
|
||||||
|
Data getData()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
Data data_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OCR_MODEL_DETECTCARDSCREENSHOTRESULT_H_
|
||||||
@@ -73,7 +73,7 @@ namespace AlibabaCloud
|
|||||||
std::string registerNumber;
|
std::string registerNumber;
|
||||||
QRCode qRCode;
|
QRCode qRCode;
|
||||||
std::string type;
|
std::string type;
|
||||||
std::string angle;
|
float angle;
|
||||||
Emblem emblem;
|
Emblem emblem;
|
||||||
std::string business;
|
std::string business;
|
||||||
};
|
};
|
||||||
|
|||||||
48
ocr/include/alibabacloud/ocr/model/RecognizePoiNameRequest.h
Normal file
48
ocr/include/alibabacloud/ocr/model/RecognizePoiNameRequest.h
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_OCR_MODEL_RECOGNIZEPOINAMEREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_OCR_MODEL_RECOGNIZEPOINAMEREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/ocr/OcrExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Ocr
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OCR_EXPORT RecognizePoiNameRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
RecognizePoiNameRequest();
|
||||||
|
~RecognizePoiNameRequest();
|
||||||
|
|
||||||
|
std::string getImageURL()const;
|
||||||
|
void setImageURL(const std::string& imageURL);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string imageURL_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OCR_MODEL_RECOGNIZEPOINAMEREQUEST_H_
|
||||||
73
ocr/include/alibabacloud/ocr/model/RecognizePoiNameResult.h
Normal file
73
ocr/include/alibabacloud/ocr/model/RecognizePoiNameResult.h
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_OCR_MODEL_RECOGNIZEPOINAMERESULT_H_
|
||||||
|
#define ALIBABACLOUD_OCR_MODEL_RECOGNIZEPOINAMERESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/ocr/OcrExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Ocr
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OCR_EXPORT RecognizePoiNameResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Data
|
||||||
|
{
|
||||||
|
struct Summary
|
||||||
|
{
|
||||||
|
std::string brand;
|
||||||
|
float score;
|
||||||
|
};
|
||||||
|
struct SignboardsItem
|
||||||
|
{
|
||||||
|
struct TextsItem
|
||||||
|
{
|
||||||
|
float score;
|
||||||
|
std::string type;
|
||||||
|
std::vector<std::string> points;
|
||||||
|
std::string label;
|
||||||
|
std::string tag;
|
||||||
|
};
|
||||||
|
std::vector<SignboardsItem::TextsItem> texts;
|
||||||
|
};
|
||||||
|
std::vector<SignboardsItem> signboards;
|
||||||
|
Summary summary;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
RecognizePoiNameResult();
|
||||||
|
explicit RecognizePoiNameResult(const std::string &payload);
|
||||||
|
~RecognizePoiNameResult();
|
||||||
|
Data getData()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
Data data_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OCR_MODEL_RECOGNIZEPOINAMERESULT_H_
|
||||||
@@ -51,6 +51,42 @@ OcrClient::OcrClient(const std::string & accessKeyId, const std::string & access
|
|||||||
OcrClient::~OcrClient()
|
OcrClient::~OcrClient()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
OcrClient::DetectCardScreenshotOutcome OcrClient::detectCardScreenshot(const DetectCardScreenshotRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return DetectCardScreenshotOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return DetectCardScreenshotOutcome(DetectCardScreenshotResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return DetectCardScreenshotOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void OcrClient::detectCardScreenshotAsync(const DetectCardScreenshotRequest& request, const DetectCardScreenshotAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, detectCardScreenshot(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
OcrClient::DetectCardScreenshotOutcomeCallable OcrClient::detectCardScreenshotCallable(const DetectCardScreenshotRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<DetectCardScreenshotOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->detectCardScreenshot(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
OcrClient::GetAsyncJobResultOutcome OcrClient::getAsyncJobResult(const GetAsyncJobResultRequest &request) const
|
OcrClient::GetAsyncJobResultOutcome OcrClient::getAsyncJobResult(const GetAsyncJobResultRequest &request) const
|
||||||
{
|
{
|
||||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
@@ -483,6 +519,42 @@ OcrClient::RecognizePassportMRZOutcomeCallable OcrClient::recognizePassportMRZCa
|
|||||||
return task->get_future();
|
return task->get_future();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OcrClient::RecognizePoiNameOutcome OcrClient::recognizePoiName(const RecognizePoiNameRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return RecognizePoiNameOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return RecognizePoiNameOutcome(RecognizePoiNameResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return RecognizePoiNameOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void OcrClient::recognizePoiNameAsync(const RecognizePoiNameRequest& request, const RecognizePoiNameAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, recognizePoiName(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
OcrClient::RecognizePoiNameOutcomeCallable OcrClient::recognizePoiNameCallable(const RecognizePoiNameRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<RecognizePoiNameOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->recognizePoiName(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
OcrClient::RecognizeQrCodeOutcome OcrClient::recognizeQrCode(const RecognizeQrCodeRequest &request) const
|
OcrClient::RecognizeQrCodeOutcome OcrClient::recognizeQrCode(const RecognizeQrCodeRequest &request) const
|
||||||
{
|
{
|
||||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
|||||||
40
ocr/src/model/DetectCardScreenshotRequest.cc
Normal file
40
ocr/src/model/DetectCardScreenshotRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <alibabacloud/ocr/model/DetectCardScreenshotRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Ocr::Model::DetectCardScreenshotRequest;
|
||||||
|
|
||||||
|
DetectCardScreenshotRequest::DetectCardScreenshotRequest() :
|
||||||
|
RpcServiceRequest("ocr", "2019-12-30", "DetectCardScreenshot")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
DetectCardScreenshotRequest::~DetectCardScreenshotRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
std::string DetectCardScreenshotRequest::getImageURL()const
|
||||||
|
{
|
||||||
|
return imageURL_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DetectCardScreenshotRequest::setImageURL(const std::string& imageURL)
|
||||||
|
{
|
||||||
|
imageURL_ = imageURL;
|
||||||
|
setBodyParameter("ImageURL", imageURL);
|
||||||
|
}
|
||||||
|
|
||||||
62
ocr/src/model/DetectCardScreenshotResult.cc
Normal file
62
ocr/src/model/DetectCardScreenshotResult.cc
Normal 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/ocr/model/DetectCardScreenshotResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Ocr;
|
||||||
|
using namespace AlibabaCloud::Ocr::Model;
|
||||||
|
|
||||||
|
DetectCardScreenshotResult::DetectCardScreenshotResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
DetectCardScreenshotResult::DetectCardScreenshotResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
DetectCardScreenshotResult::~DetectCardScreenshotResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void DetectCardScreenshotResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto dataNode = value["Data"];
|
||||||
|
if(!dataNode["IsCard"].isNull())
|
||||||
|
data_.isCard = dataNode["IsCard"].asString() == "true";
|
||||||
|
if(!dataNode["IsBlur"].isNull())
|
||||||
|
data_.isBlur = dataNode["IsBlur"].asString() == "true";
|
||||||
|
auto spoofResultNode = dataNode["SpoofResult"];
|
||||||
|
if(!spoofResultNode["IsSpoof"].isNull())
|
||||||
|
data_.spoofResult.isSpoof = spoofResultNode["IsSpoof"].asString() == "true";
|
||||||
|
auto resultMapNode = spoofResultNode["ResultMap"];
|
||||||
|
if(!resultMapNode["ScreenScore"].isNull())
|
||||||
|
data_.spoofResult.resultMap.screenScore = std::stof(resultMapNode["ScreenScore"].asString());
|
||||||
|
if(!resultMapNode["ScreenThreshold"].isNull())
|
||||||
|
data_.spoofResult.resultMap.screenThreshold = std::stof(resultMapNode["ScreenThreshold"].asString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
DetectCardScreenshotResult::Data DetectCardScreenshotResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ void RecognizeBusinessLicenseResult::parse(const std::string &payload)
|
|||||||
setRequestId(value["RequestId"].asString());
|
setRequestId(value["RequestId"].asString());
|
||||||
auto dataNode = value["Data"];
|
auto dataNode = value["Data"];
|
||||||
if(!dataNode["Angle"].isNull())
|
if(!dataNode["Angle"].isNull())
|
||||||
data_.angle = dataNode["Angle"].asString();
|
data_.angle = std::stof(dataNode["Angle"].asString());
|
||||||
if(!dataNode["RegisterNumber"].isNull())
|
if(!dataNode["RegisterNumber"].isNull())
|
||||||
data_.registerNumber = dataNode["RegisterNumber"].asString();
|
data_.registerNumber = dataNode["RegisterNumber"].asString();
|
||||||
if(!dataNode["Name"].isNull())
|
if(!dataNode["Name"].isNull())
|
||||||
|
|||||||
40
ocr/src/model/RecognizePoiNameRequest.cc
Normal file
40
ocr/src/model/RecognizePoiNameRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <alibabacloud/ocr/model/RecognizePoiNameRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Ocr::Model::RecognizePoiNameRequest;
|
||||||
|
|
||||||
|
RecognizePoiNameRequest::RecognizePoiNameRequest() :
|
||||||
|
RpcServiceRequest("ocr", "2019-12-30", "RecognizePoiName")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
RecognizePoiNameRequest::~RecognizePoiNameRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
std::string RecognizePoiNameRequest::getImageURL()const
|
||||||
|
{
|
||||||
|
return imageURL_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RecognizePoiNameRequest::setImageURL(const std::string& imageURL)
|
||||||
|
{
|
||||||
|
imageURL_ = imageURL;
|
||||||
|
setBodyParameter("ImageURL", imageURL);
|
||||||
|
}
|
||||||
|
|
||||||
78
ocr/src/model/RecognizePoiNameResult.cc
Normal file
78
ocr/src/model/RecognizePoiNameResult.cc
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
/*
|
||||||
|
* 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/ocr/model/RecognizePoiNameResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Ocr;
|
||||||
|
using namespace AlibabaCloud::Ocr::Model;
|
||||||
|
|
||||||
|
RecognizePoiNameResult::RecognizePoiNameResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
RecognizePoiNameResult::RecognizePoiNameResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
RecognizePoiNameResult::~RecognizePoiNameResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void RecognizePoiNameResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto dataNode = value["Data"];
|
||||||
|
auto allSignboardsNode = dataNode["Signboards"]["SignboardsItem"];
|
||||||
|
for (auto dataNodeSignboardsSignboardsItem : allSignboardsNode)
|
||||||
|
{
|
||||||
|
Data::SignboardsItem signboardsItemObject;
|
||||||
|
auto allTextsNode = dataNodeSignboardsSignboardsItem["Texts"]["TextsItem"];
|
||||||
|
for (auto dataNodeSignboardsSignboardsItemTextsTextsItem : allTextsNode)
|
||||||
|
{
|
||||||
|
Data::SignboardsItem::TextsItem textsObject;
|
||||||
|
if(!dataNodeSignboardsSignboardsItemTextsTextsItem["Label"].isNull())
|
||||||
|
textsObject.label = dataNodeSignboardsSignboardsItemTextsTextsItem["Label"].asString();
|
||||||
|
if(!dataNodeSignboardsSignboardsItemTextsTextsItem["Score"].isNull())
|
||||||
|
textsObject.score = std::stof(dataNodeSignboardsSignboardsItemTextsTextsItem["Score"].asString());
|
||||||
|
if(!dataNodeSignboardsSignboardsItemTextsTextsItem["Tag"].isNull())
|
||||||
|
textsObject.tag = dataNodeSignboardsSignboardsItemTextsTextsItem["Tag"].asString();
|
||||||
|
if(!dataNodeSignboardsSignboardsItemTextsTextsItem["Type"].isNull())
|
||||||
|
textsObject.type = dataNodeSignboardsSignboardsItemTextsTextsItem["Type"].asString();
|
||||||
|
auto allPoints = value["Points"]["Points"];
|
||||||
|
for (auto value : allPoints)
|
||||||
|
textsObject.points.push_back(value.asString());
|
||||||
|
signboardsItemObject.texts.push_back(textsObject);
|
||||||
|
}
|
||||||
|
data_.signboards.push_back(signboardsItemObject);
|
||||||
|
}
|
||||||
|
auto summaryNode = dataNode["Summary"];
|
||||||
|
if(!summaryNode["Brand"].isNull())
|
||||||
|
data_.summary.brand = summaryNode["Brand"].asString();
|
||||||
|
if(!summaryNode["Score"].isNull())
|
||||||
|
data_.summary.score = std::stof(summaryNode["Score"].asString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
RecognizePoiNameResult::Data RecognizePoiNameResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -48,16 +48,16 @@ void RecognizeQrCodeResult::parse(const std::string &payload)
|
|||||||
elementObject.taskId = dataNodeElementsElement["TaskId"].asString();
|
elementObject.taskId = dataNodeElementsElement["TaskId"].asString();
|
||||||
if(!dataNodeElementsElement["ImageURL"].isNull())
|
if(!dataNodeElementsElement["ImageURL"].isNull())
|
||||||
elementObject.imageURL = dataNodeElementsElement["ImageURL"].asString();
|
elementObject.imageURL = dataNodeElementsElement["ImageURL"].asString();
|
||||||
auto allResultsNode = allElementsNode["Results"]["Result"];
|
auto allResultsNode = dataNodeElementsElement["Results"]["Result"];
|
||||||
for (auto allElementsNodeResultsResult : allResultsNode)
|
for (auto dataNodeElementsElementResultsResult : allResultsNode)
|
||||||
{
|
{
|
||||||
Data::Element::Result resultsObject;
|
Data::Element::Result resultsObject;
|
||||||
if(!allElementsNodeResultsResult["Label"].isNull())
|
if(!dataNodeElementsElementResultsResult["Label"].isNull())
|
||||||
resultsObject.label = allElementsNodeResultsResult["Label"].asString();
|
resultsObject.label = dataNodeElementsElementResultsResult["Label"].asString();
|
||||||
if(!allElementsNodeResultsResult["Suggestion"].isNull())
|
if(!dataNodeElementsElementResultsResult["Suggestion"].isNull())
|
||||||
resultsObject.suggestion = allElementsNodeResultsResult["Suggestion"].asString();
|
resultsObject.suggestion = dataNodeElementsElementResultsResult["Suggestion"].asString();
|
||||||
if(!allElementsNodeResultsResult["Rate"].isNull())
|
if(!dataNodeElementsElementResultsResult["Rate"].isNull())
|
||||||
resultsObject.rate = std::stof(allElementsNodeResultsResult["Rate"].asString());
|
resultsObject.rate = std::stof(dataNodeElementsElementResultsResult["Rate"].asString());
|
||||||
auto allQrCodesData = value["QrCodesData"]["QrCodeData"];
|
auto allQrCodesData = value["QrCodesData"]["QrCodeData"];
|
||||||
for (auto value : allQrCodesData)
|
for (auto value : allQrCodesData)
|
||||||
resultsObject.qrCodesData.push_back(value.asString());
|
resultsObject.qrCodesData.push_back(value.asString());
|
||||||
|
|||||||
@@ -44,14 +44,14 @@ void RecognizeStampResult::parse(const std::string &payload)
|
|||||||
for (auto dataNodeResultsResultsItem : allResultsNode)
|
for (auto dataNodeResultsResultsItem : allResultsNode)
|
||||||
{
|
{
|
||||||
Data::ResultsItem resultsItemObject;
|
Data::ResultsItem resultsItemObject;
|
||||||
auto allGeneralTextNode = allResultsNode["GeneralText"]["GeneralTextItem"];
|
auto allGeneralTextNode = dataNodeResultsResultsItem["GeneralText"]["GeneralTextItem"];
|
||||||
for (auto allResultsNodeGeneralTextGeneralTextItem : allGeneralTextNode)
|
for (auto dataNodeResultsResultsItemGeneralTextGeneralTextItem : allGeneralTextNode)
|
||||||
{
|
{
|
||||||
Data::ResultsItem::GeneralTextItem generalTextObject;
|
Data::ResultsItem::GeneralTextItem generalTextObject;
|
||||||
if(!allResultsNodeGeneralTextGeneralTextItem["Content"].isNull())
|
if(!dataNodeResultsResultsItemGeneralTextGeneralTextItem["Content"].isNull())
|
||||||
generalTextObject.content = allResultsNodeGeneralTextGeneralTextItem["Content"].asString();
|
generalTextObject.content = dataNodeResultsResultsItemGeneralTextGeneralTextItem["Content"].asString();
|
||||||
if(!allResultsNodeGeneralTextGeneralTextItem["Confidence"].isNull())
|
if(!dataNodeResultsResultsItemGeneralTextGeneralTextItem["Confidence"].isNull())
|
||||||
generalTextObject.confidence = std::stof(allResultsNodeGeneralTextGeneralTextItem["Confidence"].asString());
|
generalTextObject.confidence = std::stof(dataNodeResultsResultsItemGeneralTextGeneralTextItem["Confidence"].asString());
|
||||||
resultsItemObject.generalText.push_back(generalTextObject);
|
resultsItemObject.generalText.push_back(generalTextObject);
|
||||||
}
|
}
|
||||||
auto roiNode = value["Roi"];
|
auto roiNode = value["Roi"];
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user