Skip to content

Commit 8241d99

Browse files
committed
Add image search api.
1 parent ec161f0 commit 8241d99

12 files changed

+808
-3
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.36.2094
1+
1.36.2095

websitebuild/CMakeLists.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ set(websitebuild_public_header_model
2828
include/alibabacloud/websitebuild/model/OperateAppInstanceForPartnerRequest.h
2929
include/alibabacloud/websitebuild/model/OperateAppInstanceForPartnerResult.h
3030
include/alibabacloud/websitebuild/model/OperateAppServiceForPartnerRequest.h
31-
include/alibabacloud/websitebuild/model/OperateAppServiceForPartnerResult.h )
31+
include/alibabacloud/websitebuild/model/OperateAppServiceForPartnerResult.h
32+
include/alibabacloud/websitebuild/model/SearchImageRequest.h
33+
include/alibabacloud/websitebuild/model/SearchImageResult.h
34+
include/alibabacloud/websitebuild/model/SyncAppInstanceForPartnerRequest.h
35+
include/alibabacloud/websitebuild/model/SyncAppInstanceForPartnerResult.h )
3236

3337
set(websitebuild_src
3438
src/WebsiteBuildClient.cc
@@ -39,7 +43,11 @@ set(websitebuild_src
3943
src/model/OperateAppInstanceForPartnerRequest.cc
4044
src/model/OperateAppInstanceForPartnerResult.cc
4145
src/model/OperateAppServiceForPartnerRequest.cc
42-
src/model/OperateAppServiceForPartnerResult.cc )
46+
src/model/OperateAppServiceForPartnerResult.cc
47+
src/model/SearchImageRequest.cc
48+
src/model/SearchImageResult.cc
49+
src/model/SyncAppInstanceForPartnerRequest.cc
50+
src/model/SyncAppInstanceForPartnerResult.cc )
4351

4452
add_library(websitebuild ${LIB_TYPE}
4553
${websitebuild_public_header}

websitebuild/include/alibabacloud/websitebuild/WebsiteBuildClient.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
#include "model/OperateAppInstanceForPartnerResult.h"
3131
#include "model/OperateAppServiceForPartnerRequest.h"
3232
#include "model/OperateAppServiceForPartnerResult.h"
33+
#include "model/SearchImageRequest.h"
34+
#include "model/SearchImageResult.h"
35+
#include "model/SyncAppInstanceForPartnerRequest.h"
36+
#include "model/SyncAppInstanceForPartnerResult.h"
3337

3438

3539
namespace AlibabaCloud
@@ -51,6 +55,12 @@ namespace AlibabaCloud
5155
typedef Outcome<Error, Model::OperateAppServiceForPartnerResult> OperateAppServiceForPartnerOutcome;
5256
typedef std::future<OperateAppServiceForPartnerOutcome> OperateAppServiceForPartnerOutcomeCallable;
5357
typedef std::function<void(const WebsiteBuildClient*, const Model::OperateAppServiceForPartnerRequest&, const OperateAppServiceForPartnerOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> OperateAppServiceForPartnerAsyncHandler;
58+
typedef Outcome<Error, Model::SearchImageResult> SearchImageOutcome;
59+
typedef std::future<SearchImageOutcome> SearchImageOutcomeCallable;
60+
typedef std::function<void(const WebsiteBuildClient*, const Model::SearchImageRequest&, const SearchImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SearchImageAsyncHandler;
61+
typedef Outcome<Error, Model::SyncAppInstanceForPartnerResult> SyncAppInstanceForPartnerOutcome;
62+
typedef std::future<SyncAppInstanceForPartnerOutcome> SyncAppInstanceForPartnerOutcomeCallable;
63+
typedef std::function<void(const WebsiteBuildClient*, const Model::SyncAppInstanceForPartnerRequest&, const SyncAppInstanceForPartnerOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SyncAppInstanceForPartnerAsyncHandler;
5464

5565
WebsiteBuildClient(const Credentials &credentials, const ClientConfiguration &configuration);
5666
WebsiteBuildClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
@@ -68,6 +78,12 @@ namespace AlibabaCloud
6878
OperateAppServiceForPartnerOutcome operateAppServiceForPartner(const Model::OperateAppServiceForPartnerRequest &request)const;
6979
void operateAppServiceForPartnerAsync(const Model::OperateAppServiceForPartnerRequest& request, const OperateAppServiceForPartnerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
7080
OperateAppServiceForPartnerOutcomeCallable operateAppServiceForPartnerCallable(const Model::OperateAppServiceForPartnerRequest& request) const;
81+
SearchImageOutcome searchImage(const Model::SearchImageRequest &request)const;
82+
void searchImageAsync(const Model::SearchImageRequest& request, const SearchImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
83+
SearchImageOutcomeCallable searchImageCallable(const Model::SearchImageRequest& request) const;
84+
SyncAppInstanceForPartnerOutcome syncAppInstanceForPartner(const Model::SyncAppInstanceForPartnerRequest &request)const;
85+
void syncAppInstanceForPartnerAsync(const Model::SyncAppInstanceForPartnerRequest& request, const SyncAppInstanceForPartnerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
86+
SyncAppInstanceForPartnerOutcomeCallable syncAppInstanceForPartnerCallable(const Model::SyncAppInstanceForPartnerRequest& request) const;
7187

7288
private:
7389
std::shared_ptr<EndpointProvider> endpointProvider_;
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
/*
2+
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#ifndef ALIBABACLOUD_WEBSITEBUILD_MODEL_SEARCHIMAGEREQUEST_H_
18+
#define ALIBABACLOUD_WEBSITEBUILD_MODEL_SEARCHIMAGEREQUEST_H_
19+
20+
#include <alibabacloud/websitebuild/WebsiteBuildExport.h>
21+
#include <alibabacloud/core/RpcServiceRequest.h>
22+
#include <string>
23+
#include <vector>
24+
#include <map>
25+
26+
namespace AlibabaCloud {
27+
namespace WebsiteBuild {
28+
namespace Model {
29+
class ALIBABACLOUD_WEBSITEBUILD_EXPORT SearchImageRequest : public RpcServiceRequest {
30+
public:
31+
SearchImageRequest();
32+
~SearchImageRequest();
33+
bool getHasPerson() const;
34+
void setHasPerson(bool hasPerson);
35+
int getMaxWidth() const;
36+
void setMaxWidth(int maxWidth);
37+
std::string getOssKey() const;
38+
void setOssKey(const std::string &ossKey);
39+
std::string getImageCategory() const;
40+
void setImageCategory(const std::string &imageCategory);
41+
int getMaxHeight() const;
42+
void setMaxHeight(int maxHeight);
43+
std::string getImageRatio() const;
44+
void setImageRatio(const std::string &imageRatio);
45+
std::string getNextToken() const;
46+
void setNextToken(const std::string &nextToken);
47+
std::string getText() const;
48+
void setText(const std::string &text);
49+
std::string getColorHex() const;
50+
void setColorHex(const std::string &colorHex);
51+
int getMinHeight() const;
52+
void setMinHeight(int minHeight);
53+
int getStart() const;
54+
void setStart(int start);
55+
std::vector<std::string> getTags() const;
56+
void setTags(const std::vector<std::string> &tags);
57+
int getSize() const;
58+
void setSize(int size);
59+
int getMinWidth() const;
60+
void setMinWidth(int minWidth);
61+
int getMaxResults() const;
62+
void setMaxResults(int maxResults);
63+
64+
private:
65+
bool hasPerson_;
66+
int maxWidth_;
67+
std::string ossKey_;
68+
std::string imageCategory_;
69+
int maxHeight_;
70+
std::string imageRatio_;
71+
std::string nextToken_;
72+
std::string text_;
73+
std::string colorHex_;
74+
int minHeight_;
75+
int start_;
76+
std::vector<std::string> tags_;
77+
int size_;
78+
int minWidth_;
79+
int maxResults_;
80+
};
81+
} // namespace Model
82+
} // namespace WebsiteBuild
83+
} // namespace AlibabaCloud
84+
#endif // !ALIBABACLOUD_WEBSITEBUILD_MODEL_SEARCHIMAGEREQUEST_H_
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
/*
2+
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#ifndef ALIBABACLOUD_WEBSITEBUILD_MODEL_SEARCHIMAGERESULT_H_
18+
#define ALIBABACLOUD_WEBSITEBUILD_MODEL_SEARCHIMAGERESULT_H_
19+
20+
#include <string>
21+
#include <vector>
22+
#include <utility>
23+
#include <alibabacloud/core/ServiceResult.h>
24+
#include <alibabacloud/websitebuild/WebsiteBuildExport.h>
25+
26+
namespace AlibabaCloud
27+
{
28+
namespace WebsiteBuild
29+
{
30+
namespace Model
31+
{
32+
class ALIBABACLOUD_WEBSITEBUILD_EXPORT SearchImageResult : public ServiceResult
33+
{
34+
public:
35+
struct ImageResponse
36+
{
37+
struct Image
38+
{
39+
std::string imageRatio;
40+
std::string descriptiveTones;
41+
std::string ossKey;
42+
std::string imageCategory;
43+
int height;
44+
std::string quantitativePalette;
45+
std::string imageUuid;
46+
int width;
47+
std::string url;
48+
std::string tagsFromImage;
49+
};
50+
std::string nextToken;
51+
int maxResults;
52+
std::vector<Image> imageList;
53+
};
54+
55+
56+
SearchImageResult();
57+
explicit SearchImageResult(const std::string &payload);
58+
~SearchImageResult();
59+
std::string getErrorMsg()const;
60+
ImageResponse getImageResponse()const;
61+
std::string getErrorCode()const;
62+
std::string getSuccess()const;
63+
64+
protected:
65+
void parse(const std::string &payload);
66+
private:
67+
std::string errorMsg_;
68+
ImageResponse imageResponse_;
69+
std::string errorCode_;
70+
std::string success_;
71+
72+
};
73+
}
74+
}
75+
}
76+
#endif // !ALIBABACLOUD_WEBSITEBUILD_MODEL_SEARCHIMAGERESULT_H_
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
/*
2+
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#ifndef ALIBABACLOUD_WEBSITEBUILD_MODEL_SYNCAPPINSTANCEFORPARTNERREQUEST_H_
18+
#define ALIBABACLOUD_WEBSITEBUILD_MODEL_SYNCAPPINSTANCEFORPARTNERREQUEST_H_
19+
20+
#include <alibabacloud/websitebuild/WebsiteBuildExport.h>
21+
#include <alibabacloud/core/RpcServiceRequest.h>
22+
#include <string>
23+
#include <vector>
24+
#include <map>
25+
26+
namespace AlibabaCloud {
27+
namespace WebsiteBuild {
28+
namespace Model {
29+
class ALIBABACLOUD_WEBSITEBUILD_EXPORT SyncAppInstanceForPartnerRequest : public RpcServiceRequest {
30+
public:
31+
struct AppInstance {
32+
std::string appType;
33+
struct Profile {
34+
std::string deployArea;
35+
std::string templateEtag;
36+
std::string orderId;
37+
std::string lxInstanceId;
38+
std::string siteVersion;
39+
std::string templateId;
40+
};
41+
Profile profile;
42+
std::string siteHost;
43+
std::string endTime;
44+
std::string startTime;
45+
std::string userId;
46+
std::string gmtPublish;
47+
std::string deleted;
48+
std::string domain;
49+
std::string bizId;
50+
std::string name;
51+
std::string iconUrl;
52+
std::string gmtDelete;
53+
std::string slug;
54+
std::string thumbnailUrl;
55+
std::string status;
56+
};
57+
SyncAppInstanceForPartnerRequest();
58+
~SyncAppInstanceForPartnerRequest();
59+
AppInstance getAppInstance() const;
60+
void setAppInstance(const AppInstance &appInstance);
61+
std::string getSourceBizId() const;
62+
void setSourceBizId(const std::string &sourceBizId);
63+
std::string get_Operator() const;
64+
void set_Operator(const std::string &_operator);
65+
std::string getEventType() const;
66+
void setEventType(const std::string &eventType);
67+
std::string getSourceType() const;
68+
void setSourceType(const std::string &sourceType);
69+
70+
private:
71+
AppInstance appInstance_;
72+
std::string sourceBizId_;
73+
std::string _operator_;
74+
std::string eventType_;
75+
std::string sourceType_;
76+
};
77+
} // namespace Model
78+
} // namespace WebsiteBuild
79+
} // namespace AlibabaCloud
80+
#endif // !ALIBABACLOUD_WEBSITEBUILD_MODEL_SYNCAPPINSTANCEFORPARTNERREQUEST_H_
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*
2+
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#ifndef ALIBABACLOUD_WEBSITEBUILD_MODEL_SYNCAPPINSTANCEFORPARTNERRESULT_H_
18+
#define ALIBABACLOUD_WEBSITEBUILD_MODEL_SYNCAPPINSTANCEFORPARTNERRESULT_H_
19+
20+
#include <string>
21+
#include <vector>
22+
#include <utility>
23+
#include <alibabacloud/core/ServiceResult.h>
24+
#include <alibabacloud/websitebuild/WebsiteBuildExport.h>
25+
26+
namespace AlibabaCloud
27+
{
28+
namespace WebsiteBuild
29+
{
30+
namespace Model
31+
{
32+
class ALIBABACLOUD_WEBSITEBUILD_EXPORT SyncAppInstanceForPartnerResult : public ServiceResult
33+
{
34+
public:
35+
struct Data
36+
{
37+
struct AppInstance
38+
{
39+
std::string bizId;
40+
};
41+
AppInstance appInstance;
42+
};
43+
44+
45+
SyncAppInstanceForPartnerResult();
46+
explicit SyncAppInstanceForPartnerResult(const std::string &payload);
47+
~SyncAppInstanceForPartnerResult();
48+
Data getData()const;
49+
50+
protected:
51+
void parse(const std::string &payload);
52+
private:
53+
Data data_;
54+
55+
};
56+
}
57+
}
58+
}
59+
#endif // !ALIBABACLOUD_WEBSITEBUILD_MODEL_SYNCAPPINSTANCEFORPARTNERRESULT_H_

0 commit comments

Comments
 (0)