Add image search api.

This commit is contained in:
sdk-team
2025-08-01 10:28:09 +00:00
parent ec161f0408
commit 8241d996ce
12 changed files with 808 additions and 3 deletions

View File

@@ -30,6 +30,10 @@
#include "model/OperateAppInstanceForPartnerResult.h"
#include "model/OperateAppServiceForPartnerRequest.h"
#include "model/OperateAppServiceForPartnerResult.h"
#include "model/SearchImageRequest.h"
#include "model/SearchImageResult.h"
#include "model/SyncAppInstanceForPartnerRequest.h"
#include "model/SyncAppInstanceForPartnerResult.h"
namespace AlibabaCloud
@@ -51,6 +55,12 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::OperateAppServiceForPartnerResult> OperateAppServiceForPartnerOutcome;
typedef std::future<OperateAppServiceForPartnerOutcome> OperateAppServiceForPartnerOutcomeCallable;
typedef std::function<void(const WebsiteBuildClient*, const Model::OperateAppServiceForPartnerRequest&, const OperateAppServiceForPartnerOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> OperateAppServiceForPartnerAsyncHandler;
typedef Outcome<Error, Model::SearchImageResult> SearchImageOutcome;
typedef std::future<SearchImageOutcome> SearchImageOutcomeCallable;
typedef std::function<void(const WebsiteBuildClient*, const Model::SearchImageRequest&, const SearchImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SearchImageAsyncHandler;
typedef Outcome<Error, Model::SyncAppInstanceForPartnerResult> SyncAppInstanceForPartnerOutcome;
typedef std::future<SyncAppInstanceForPartnerOutcome> SyncAppInstanceForPartnerOutcomeCallable;
typedef std::function<void(const WebsiteBuildClient*, const Model::SyncAppInstanceForPartnerRequest&, const SyncAppInstanceForPartnerOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SyncAppInstanceForPartnerAsyncHandler;
WebsiteBuildClient(const Credentials &credentials, const ClientConfiguration &configuration);
WebsiteBuildClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
@@ -68,6 +78,12 @@ namespace AlibabaCloud
OperateAppServiceForPartnerOutcome operateAppServiceForPartner(const Model::OperateAppServiceForPartnerRequest &request)const;
void operateAppServiceForPartnerAsync(const Model::OperateAppServiceForPartnerRequest& request, const OperateAppServiceForPartnerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
OperateAppServiceForPartnerOutcomeCallable operateAppServiceForPartnerCallable(const Model::OperateAppServiceForPartnerRequest& request) const;
SearchImageOutcome searchImage(const Model::SearchImageRequest &request)const;
void searchImageAsync(const Model::SearchImageRequest& request, const SearchImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
SearchImageOutcomeCallable searchImageCallable(const Model::SearchImageRequest& request) const;
SyncAppInstanceForPartnerOutcome syncAppInstanceForPartner(const Model::SyncAppInstanceForPartnerRequest &request)const;
void syncAppInstanceForPartnerAsync(const Model::SyncAppInstanceForPartnerRequest& request, const SyncAppInstanceForPartnerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
SyncAppInstanceForPartnerOutcomeCallable syncAppInstanceForPartnerCallable(const Model::SyncAppInstanceForPartnerRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;

View File

@@ -0,0 +1,84 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_WEBSITEBUILD_MODEL_SEARCHIMAGEREQUEST_H_
#define ALIBABACLOUD_WEBSITEBUILD_MODEL_SEARCHIMAGEREQUEST_H_
#include <alibabacloud/websitebuild/WebsiteBuildExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace WebsiteBuild {
namespace Model {
class ALIBABACLOUD_WEBSITEBUILD_EXPORT SearchImageRequest : public RpcServiceRequest {
public:
SearchImageRequest();
~SearchImageRequest();
bool getHasPerson() const;
void setHasPerson(bool hasPerson);
int getMaxWidth() const;
void setMaxWidth(int maxWidth);
std::string getOssKey() const;
void setOssKey(const std::string &ossKey);
std::string getImageCategory() const;
void setImageCategory(const std::string &imageCategory);
int getMaxHeight() const;
void setMaxHeight(int maxHeight);
std::string getImageRatio() const;
void setImageRatio(const std::string &imageRatio);
std::string getNextToken() const;
void setNextToken(const std::string &nextToken);
std::string getText() const;
void setText(const std::string &text);
std::string getColorHex() const;
void setColorHex(const std::string &colorHex);
int getMinHeight() const;
void setMinHeight(int minHeight);
int getStart() const;
void setStart(int start);
std::vector<std::string> getTags() const;
void setTags(const std::vector<std::string> &tags);
int getSize() const;
void setSize(int size);
int getMinWidth() const;
void setMinWidth(int minWidth);
int getMaxResults() const;
void setMaxResults(int maxResults);
private:
bool hasPerson_;
int maxWidth_;
std::string ossKey_;
std::string imageCategory_;
int maxHeight_;
std::string imageRatio_;
std::string nextToken_;
std::string text_;
std::string colorHex_;
int minHeight_;
int start_;
std::vector<std::string> tags_;
int size_;
int minWidth_;
int maxResults_;
};
} // namespace Model
} // namespace WebsiteBuild
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_WEBSITEBUILD_MODEL_SEARCHIMAGEREQUEST_H_

View File

@@ -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_WEBSITEBUILD_MODEL_SEARCHIMAGERESULT_H_
#define ALIBABACLOUD_WEBSITEBUILD_MODEL_SEARCHIMAGERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/websitebuild/WebsiteBuildExport.h>
namespace AlibabaCloud
{
namespace WebsiteBuild
{
namespace Model
{
class ALIBABACLOUD_WEBSITEBUILD_EXPORT SearchImageResult : public ServiceResult
{
public:
struct ImageResponse
{
struct Image
{
std::string imageRatio;
std::string descriptiveTones;
std::string ossKey;
std::string imageCategory;
int height;
std::string quantitativePalette;
std::string imageUuid;
int width;
std::string url;
std::string tagsFromImage;
};
std::string nextToken;
int maxResults;
std::vector<Image> imageList;
};
SearchImageResult();
explicit SearchImageResult(const std::string &payload);
~SearchImageResult();
std::string getErrorMsg()const;
ImageResponse getImageResponse()const;
std::string getErrorCode()const;
std::string getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string errorMsg_;
ImageResponse imageResponse_;
std::string errorCode_;
std::string success_;
};
}
}
}
#endif // !ALIBABACLOUD_WEBSITEBUILD_MODEL_SEARCHIMAGERESULT_H_

View File

@@ -0,0 +1,80 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_WEBSITEBUILD_MODEL_SYNCAPPINSTANCEFORPARTNERREQUEST_H_
#define ALIBABACLOUD_WEBSITEBUILD_MODEL_SYNCAPPINSTANCEFORPARTNERREQUEST_H_
#include <alibabacloud/websitebuild/WebsiteBuildExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace WebsiteBuild {
namespace Model {
class ALIBABACLOUD_WEBSITEBUILD_EXPORT SyncAppInstanceForPartnerRequest : public RpcServiceRequest {
public:
struct AppInstance {
std::string appType;
struct Profile {
std::string deployArea;
std::string templateEtag;
std::string orderId;
std::string lxInstanceId;
std::string siteVersion;
std::string templateId;
};
Profile profile;
std::string siteHost;
std::string endTime;
std::string startTime;
std::string userId;
std::string gmtPublish;
std::string deleted;
std::string domain;
std::string bizId;
std::string name;
std::string iconUrl;
std::string gmtDelete;
std::string slug;
std::string thumbnailUrl;
std::string status;
};
SyncAppInstanceForPartnerRequest();
~SyncAppInstanceForPartnerRequest();
AppInstance getAppInstance() const;
void setAppInstance(const AppInstance &appInstance);
std::string getSourceBizId() const;
void setSourceBizId(const std::string &sourceBizId);
std::string get_Operator() const;
void set_Operator(const std::string &_operator);
std::string getEventType() const;
void setEventType(const std::string &eventType);
std::string getSourceType() const;
void setSourceType(const std::string &sourceType);
private:
AppInstance appInstance_;
std::string sourceBizId_;
std::string _operator_;
std::string eventType_;
std::string sourceType_;
};
} // namespace Model
} // namespace WebsiteBuild
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_WEBSITEBUILD_MODEL_SYNCAPPINSTANCEFORPARTNERREQUEST_H_

View 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.
*/
#ifndef ALIBABACLOUD_WEBSITEBUILD_MODEL_SYNCAPPINSTANCEFORPARTNERRESULT_H_
#define ALIBABACLOUD_WEBSITEBUILD_MODEL_SYNCAPPINSTANCEFORPARTNERRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/websitebuild/WebsiteBuildExport.h>
namespace AlibabaCloud
{
namespace WebsiteBuild
{
namespace Model
{
class ALIBABACLOUD_WEBSITEBUILD_EXPORT SyncAppInstanceForPartnerResult : public ServiceResult
{
public:
struct Data
{
struct AppInstance
{
std::string bizId;
};
AppInstance appInstance;
};
SyncAppInstanceForPartnerResult();
explicit SyncAppInstanceForPartnerResult(const std::string &payload);
~SyncAppInstanceForPartnerResult();
Data getData()const;
protected:
void parse(const std::string &payload);
private:
Data data_;
};
}
}
}
#endif // !ALIBABACLOUD_WEBSITEBUILD_MODEL_SYNCAPPINSTANCEFORPARTNERRESULT_H_