Add image search api.
This commit is contained in:
@@ -28,7 +28,11 @@ set(websitebuild_public_header_model
|
|||||||
include/alibabacloud/websitebuild/model/OperateAppInstanceForPartnerRequest.h
|
include/alibabacloud/websitebuild/model/OperateAppInstanceForPartnerRequest.h
|
||||||
include/alibabacloud/websitebuild/model/OperateAppInstanceForPartnerResult.h
|
include/alibabacloud/websitebuild/model/OperateAppInstanceForPartnerResult.h
|
||||||
include/alibabacloud/websitebuild/model/OperateAppServiceForPartnerRequest.h
|
include/alibabacloud/websitebuild/model/OperateAppServiceForPartnerRequest.h
|
||||||
include/alibabacloud/websitebuild/model/OperateAppServiceForPartnerResult.h )
|
include/alibabacloud/websitebuild/model/OperateAppServiceForPartnerResult.h
|
||||||
|
include/alibabacloud/websitebuild/model/SearchImageRequest.h
|
||||||
|
include/alibabacloud/websitebuild/model/SearchImageResult.h
|
||||||
|
include/alibabacloud/websitebuild/model/SyncAppInstanceForPartnerRequest.h
|
||||||
|
include/alibabacloud/websitebuild/model/SyncAppInstanceForPartnerResult.h )
|
||||||
|
|
||||||
set(websitebuild_src
|
set(websitebuild_src
|
||||||
src/WebsiteBuildClient.cc
|
src/WebsiteBuildClient.cc
|
||||||
@@ -39,7 +43,11 @@ set(websitebuild_src
|
|||||||
src/model/OperateAppInstanceForPartnerRequest.cc
|
src/model/OperateAppInstanceForPartnerRequest.cc
|
||||||
src/model/OperateAppInstanceForPartnerResult.cc
|
src/model/OperateAppInstanceForPartnerResult.cc
|
||||||
src/model/OperateAppServiceForPartnerRequest.cc
|
src/model/OperateAppServiceForPartnerRequest.cc
|
||||||
src/model/OperateAppServiceForPartnerResult.cc )
|
src/model/OperateAppServiceForPartnerResult.cc
|
||||||
|
src/model/SearchImageRequest.cc
|
||||||
|
src/model/SearchImageResult.cc
|
||||||
|
src/model/SyncAppInstanceForPartnerRequest.cc
|
||||||
|
src/model/SyncAppInstanceForPartnerResult.cc )
|
||||||
|
|
||||||
add_library(websitebuild ${LIB_TYPE}
|
add_library(websitebuild ${LIB_TYPE}
|
||||||
${websitebuild_public_header}
|
${websitebuild_public_header}
|
||||||
|
|||||||
@@ -30,6 +30,10 @@
|
|||||||
#include "model/OperateAppInstanceForPartnerResult.h"
|
#include "model/OperateAppInstanceForPartnerResult.h"
|
||||||
#include "model/OperateAppServiceForPartnerRequest.h"
|
#include "model/OperateAppServiceForPartnerRequest.h"
|
||||||
#include "model/OperateAppServiceForPartnerResult.h"
|
#include "model/OperateAppServiceForPartnerResult.h"
|
||||||
|
#include "model/SearchImageRequest.h"
|
||||||
|
#include "model/SearchImageResult.h"
|
||||||
|
#include "model/SyncAppInstanceForPartnerRequest.h"
|
||||||
|
#include "model/SyncAppInstanceForPartnerResult.h"
|
||||||
|
|
||||||
|
|
||||||
namespace AlibabaCloud
|
namespace AlibabaCloud
|
||||||
@@ -51,6 +55,12 @@ namespace AlibabaCloud
|
|||||||
typedef Outcome<Error, Model::OperateAppServiceForPartnerResult> OperateAppServiceForPartnerOutcome;
|
typedef Outcome<Error, Model::OperateAppServiceForPartnerResult> OperateAppServiceForPartnerOutcome;
|
||||||
typedef std::future<OperateAppServiceForPartnerOutcome> OperateAppServiceForPartnerOutcomeCallable;
|
typedef std::future<OperateAppServiceForPartnerOutcome> OperateAppServiceForPartnerOutcomeCallable;
|
||||||
typedef std::function<void(const WebsiteBuildClient*, const Model::OperateAppServiceForPartnerRequest&, const OperateAppServiceForPartnerOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> OperateAppServiceForPartnerAsyncHandler;
|
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 Credentials &credentials, const ClientConfiguration &configuration);
|
||||||
WebsiteBuildClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, 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;
|
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;
|
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;
|
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:
|
private:
|
||||||
std::shared_ptr<EndpointProvider> endpointProvider_;
|
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||||
|
|||||||
@@ -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_
|
||||||
@@ -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_
|
||||||
@@ -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_
|
||||||
@@ -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_
|
||||||
@@ -195,3 +195,75 @@ WebsiteBuildClient::OperateAppServiceForPartnerOutcomeCallable WebsiteBuildClien
|
|||||||
return task->get_future();
|
return task->get_future();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WebsiteBuildClient::SearchImageOutcome WebsiteBuildClient::searchImage(const SearchImageRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return SearchImageOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return SearchImageOutcome(SearchImageResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return SearchImageOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void WebsiteBuildClient::searchImageAsync(const SearchImageRequest& request, const SearchImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, searchImage(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
WebsiteBuildClient::SearchImageOutcomeCallable WebsiteBuildClient::searchImageCallable(const SearchImageRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<SearchImageOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->searchImage(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
|
WebsiteBuildClient::SyncAppInstanceForPartnerOutcome WebsiteBuildClient::syncAppInstanceForPartner(const SyncAppInstanceForPartnerRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return SyncAppInstanceForPartnerOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return SyncAppInstanceForPartnerOutcome(SyncAppInstanceForPartnerResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return SyncAppInstanceForPartnerOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void WebsiteBuildClient::syncAppInstanceForPartnerAsync(const SyncAppInstanceForPartnerRequest& request, const SyncAppInstanceForPartnerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, syncAppInstanceForPartner(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
WebsiteBuildClient::SyncAppInstanceForPartnerOutcomeCallable WebsiteBuildClient::syncAppInstanceForPartnerCallable(const SyncAppInstanceForPartnerRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<SyncAppInstanceForPartnerOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->syncAppInstanceForPartner(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
164
websitebuild/src/model/SearchImageRequest.cc
Normal file
164
websitebuild/src/model/SearchImageRequest.cc
Normal file
@@ -0,0 +1,164 @@
|
|||||||
|
/*
|
||||||
|
* 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/websitebuild/model/SearchImageRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::WebsiteBuild::Model::SearchImageRequest;
|
||||||
|
|
||||||
|
SearchImageRequest::SearchImageRequest()
|
||||||
|
: RpcServiceRequest("websitebuild", "2025-04-29", "SearchImage") {
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
SearchImageRequest::~SearchImageRequest() {}
|
||||||
|
|
||||||
|
bool SearchImageRequest::getHasPerson() const {
|
||||||
|
return hasPerson_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SearchImageRequest::setHasPerson(bool hasPerson) {
|
||||||
|
hasPerson_ = hasPerson;
|
||||||
|
setParameter(std::string("HasPerson"), hasPerson ? "true" : "false");
|
||||||
|
}
|
||||||
|
|
||||||
|
int SearchImageRequest::getMaxWidth() const {
|
||||||
|
return maxWidth_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SearchImageRequest::setMaxWidth(int maxWidth) {
|
||||||
|
maxWidth_ = maxWidth;
|
||||||
|
setParameter(std::string("MaxWidth"), std::to_string(maxWidth));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string SearchImageRequest::getOssKey() const {
|
||||||
|
return ossKey_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SearchImageRequest::setOssKey(const std::string &ossKey) {
|
||||||
|
ossKey_ = ossKey;
|
||||||
|
setParameter(std::string("OssKey"), ossKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string SearchImageRequest::getImageCategory() const {
|
||||||
|
return imageCategory_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SearchImageRequest::setImageCategory(const std::string &imageCategory) {
|
||||||
|
imageCategory_ = imageCategory;
|
||||||
|
setParameter(std::string("ImageCategory"), imageCategory);
|
||||||
|
}
|
||||||
|
|
||||||
|
int SearchImageRequest::getMaxHeight() const {
|
||||||
|
return maxHeight_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SearchImageRequest::setMaxHeight(int maxHeight) {
|
||||||
|
maxHeight_ = maxHeight;
|
||||||
|
setParameter(std::string("MaxHeight"), std::to_string(maxHeight));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string SearchImageRequest::getImageRatio() const {
|
||||||
|
return imageRatio_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SearchImageRequest::setImageRatio(const std::string &imageRatio) {
|
||||||
|
imageRatio_ = imageRatio;
|
||||||
|
setParameter(std::string("ImageRatio"), imageRatio);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string SearchImageRequest::getNextToken() const {
|
||||||
|
return nextToken_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SearchImageRequest::setNextToken(const std::string &nextToken) {
|
||||||
|
nextToken_ = nextToken;
|
||||||
|
setParameter(std::string("NextToken"), nextToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string SearchImageRequest::getText() const {
|
||||||
|
return text_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SearchImageRequest::setText(const std::string &text) {
|
||||||
|
text_ = text;
|
||||||
|
setParameter(std::string("Text"), text);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string SearchImageRequest::getColorHex() const {
|
||||||
|
return colorHex_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SearchImageRequest::setColorHex(const std::string &colorHex) {
|
||||||
|
colorHex_ = colorHex;
|
||||||
|
setParameter(std::string("ColorHex"), colorHex);
|
||||||
|
}
|
||||||
|
|
||||||
|
int SearchImageRequest::getMinHeight() const {
|
||||||
|
return minHeight_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SearchImageRequest::setMinHeight(int minHeight) {
|
||||||
|
minHeight_ = minHeight;
|
||||||
|
setParameter(std::string("MinHeight"), std::to_string(minHeight));
|
||||||
|
}
|
||||||
|
|
||||||
|
int SearchImageRequest::getStart() const {
|
||||||
|
return start_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SearchImageRequest::setStart(int start) {
|
||||||
|
start_ = start;
|
||||||
|
setParameter(std::string("Start"), std::to_string(start));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<SearchImageRequest::std::string> SearchImageRequest::getTags() const {
|
||||||
|
return tags_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SearchImageRequest::setTags(const std::vector<SearchImageRequest::std::string> &tags) {
|
||||||
|
tags_ = tags;
|
||||||
|
for(int dep1 = 0; dep1 != tags.size(); dep1++) {
|
||||||
|
setParameter(std::string("Tags") + "." + std::to_string(dep1 + 1), tags[dep1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int SearchImageRequest::getSize() const {
|
||||||
|
return size_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SearchImageRequest::setSize(int size) {
|
||||||
|
size_ = size;
|
||||||
|
setParameter(std::string("Size"), std::to_string(size));
|
||||||
|
}
|
||||||
|
|
||||||
|
int SearchImageRequest::getMinWidth() const {
|
||||||
|
return minWidth_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SearchImageRequest::setMinWidth(int minWidth) {
|
||||||
|
minWidth_ = minWidth;
|
||||||
|
setParameter(std::string("MinWidth"), std::to_string(minWidth));
|
||||||
|
}
|
||||||
|
|
||||||
|
int SearchImageRequest::getMaxResults() const {
|
||||||
|
return maxResults_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SearchImageRequest::setMaxResults(int maxResults) {
|
||||||
|
maxResults_ = maxResults;
|
||||||
|
setParameter(std::string("MaxResults"), std::to_string(maxResults));
|
||||||
|
}
|
||||||
|
|
||||||
101
websitebuild/src/model/SearchImageResult.cc
Normal file
101
websitebuild/src/model/SearchImageResult.cc
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
/*
|
||||||
|
* 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/websitebuild/model/SearchImageResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::WebsiteBuild;
|
||||||
|
using namespace AlibabaCloud::WebsiteBuild::Model;
|
||||||
|
|
||||||
|
SearchImageResult::SearchImageResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
SearchImageResult::SearchImageResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
SearchImageResult::~SearchImageResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void SearchImageResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto imageResponseNode = value["ImageResponse"];
|
||||||
|
if(!imageResponseNode["MaxResults"].isNull())
|
||||||
|
imageResponse_.maxResults = std::stoi(imageResponseNode["MaxResults"].asString());
|
||||||
|
if(!imageResponseNode["NextToken"].isNull())
|
||||||
|
imageResponse_.nextToken = imageResponseNode["NextToken"].asString();
|
||||||
|
auto allImageListNode = imageResponseNode["ImageList"]["image"];
|
||||||
|
for (auto imageResponseNodeImageListimage : allImageListNode)
|
||||||
|
{
|
||||||
|
ImageResponse::Image imageObject;
|
||||||
|
if(!imageResponseNodeImageListimage["ImageRatio"].isNull())
|
||||||
|
imageObject.imageRatio = imageResponseNodeImageListimage["ImageRatio"].asString();
|
||||||
|
if(!imageResponseNodeImageListimage["DescriptiveTones"].isNull())
|
||||||
|
imageObject.descriptiveTones = imageResponseNodeImageListimage["DescriptiveTones"].asString();
|
||||||
|
if(!imageResponseNodeImageListimage["OssKey"].isNull())
|
||||||
|
imageObject.ossKey = imageResponseNodeImageListimage["OssKey"].asString();
|
||||||
|
if(!imageResponseNodeImageListimage["ImageCategory"].isNull())
|
||||||
|
imageObject.imageCategory = imageResponseNodeImageListimage["ImageCategory"].asString();
|
||||||
|
if(!imageResponseNodeImageListimage["Height"].isNull())
|
||||||
|
imageObject.height = std::stoi(imageResponseNodeImageListimage["Height"].asString());
|
||||||
|
if(!imageResponseNodeImageListimage["QuantitativePalette"].isNull())
|
||||||
|
imageObject.quantitativePalette = imageResponseNodeImageListimage["QuantitativePalette"].asString();
|
||||||
|
if(!imageResponseNodeImageListimage["ImageUuid"].isNull())
|
||||||
|
imageObject.imageUuid = imageResponseNodeImageListimage["ImageUuid"].asString();
|
||||||
|
if(!imageResponseNodeImageListimage["Width"].isNull())
|
||||||
|
imageObject.width = std::stoi(imageResponseNodeImageListimage["Width"].asString());
|
||||||
|
if(!imageResponseNodeImageListimage["Url"].isNull())
|
||||||
|
imageObject.url = imageResponseNodeImageListimage["Url"].asString();
|
||||||
|
if(!imageResponseNodeImageListimage["TagsFromImage"].isNull())
|
||||||
|
imageObject.tagsFromImage = imageResponseNodeImageListimage["TagsFromImage"].asString();
|
||||||
|
imageResponse_.imageList.push_back(imageObject);
|
||||||
|
}
|
||||||
|
if(!value["ErrorMsg"].isNull())
|
||||||
|
errorMsg_ = value["ErrorMsg"].asString();
|
||||||
|
if(!value["Success"].isNull())
|
||||||
|
success_ = value["Success"].asString();
|
||||||
|
if(!value["ErrorCode"].isNull())
|
||||||
|
errorCode_ = value["ErrorCode"].asString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string SearchImageResult::getErrorMsg()const
|
||||||
|
{
|
||||||
|
return errorMsg_;
|
||||||
|
}
|
||||||
|
|
||||||
|
SearchImageResult::ImageResponse SearchImageResult::getImageResponse()const
|
||||||
|
{
|
||||||
|
return imageResponse_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string SearchImageResult::getErrorCode()const
|
||||||
|
{
|
||||||
|
return errorCode_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string SearchImageResult::getSuccess()const
|
||||||
|
{
|
||||||
|
return success_;
|
||||||
|
}
|
||||||
|
|
||||||
92
websitebuild/src/model/SyncAppInstanceForPartnerRequest.cc
Normal file
92
websitebuild/src/model/SyncAppInstanceForPartnerRequest.cc
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
/*
|
||||||
|
* 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/websitebuild/model/SyncAppInstanceForPartnerRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::WebsiteBuild::Model::SyncAppInstanceForPartnerRequest;
|
||||||
|
|
||||||
|
SyncAppInstanceForPartnerRequest::SyncAppInstanceForPartnerRequest()
|
||||||
|
: RpcServiceRequest("websitebuild", "2025-04-29", "SyncAppInstanceForPartner") {
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
SyncAppInstanceForPartnerRequest::~SyncAppInstanceForPartnerRequest() {}
|
||||||
|
|
||||||
|
SyncAppInstanceForPartnerRequest::AppInstance SyncAppInstanceForPartnerRequest::getAppInstance() const {
|
||||||
|
return appInstance_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SyncAppInstanceForPartnerRequest::setAppInstance(const SyncAppInstanceForPartnerRequest::AppInstance &appInstance) {
|
||||||
|
appInstance_ = appInstance;
|
||||||
|
setParameter(std::string("AppInstance") + ".AppType", appInstance.appType);
|
||||||
|
setParameter(std::string("AppInstance") + ".Profile.DeployArea", appInstance.profile.deployArea);
|
||||||
|
setParameter(std::string("AppInstance") + ".Profile.TemplateEtag", appInstance.profile.templateEtag);
|
||||||
|
setParameter(std::string("AppInstance") + ".Profile.OrderId", appInstance.profile.orderId);
|
||||||
|
setParameter(std::string("AppInstance") + ".Profile.LxInstanceId", appInstance.profile.lxInstanceId);
|
||||||
|
setParameter(std::string("AppInstance") + ".Profile.SiteVersion", appInstance.profile.siteVersion);
|
||||||
|
setParameter(std::string("AppInstance") + ".Profile.TemplateId", appInstance.profile.templateId);
|
||||||
|
setParameter(std::string("AppInstance") + ".SiteHost", appInstance.siteHost);
|
||||||
|
setParameter(std::string("AppInstance") + ".EndTime", appInstance.endTime);
|
||||||
|
setParameter(std::string("AppInstance") + ".StartTime", appInstance.startTime);
|
||||||
|
setParameter(std::string("AppInstance") + ".UserId", appInstance.userId);
|
||||||
|
setParameter(std::string("AppInstance") + ".GmtPublish", appInstance.gmtPublish);
|
||||||
|
setParameter(std::string("AppInstance") + ".Deleted", appInstance.deleted);
|
||||||
|
setParameter(std::string("AppInstance") + ".Domain", appInstance.domain);
|
||||||
|
setParameter(std::string("AppInstance") + ".BizId", appInstance.bizId);
|
||||||
|
setParameter(std::string("AppInstance") + ".Name", appInstance.name);
|
||||||
|
setParameter(std::string("AppInstance") + ".IconUrl", appInstance.iconUrl);
|
||||||
|
setParameter(std::string("AppInstance") + ".GmtDelete", appInstance.gmtDelete);
|
||||||
|
setParameter(std::string("AppInstance") + ".Slug", appInstance.slug);
|
||||||
|
setParameter(std::string("AppInstance") + ".ThumbnailUrl", appInstance.thumbnailUrl);
|
||||||
|
setParameter(std::string("AppInstance") + ".Status", appInstance.status);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string SyncAppInstanceForPartnerRequest::getSourceBizId() const {
|
||||||
|
return sourceBizId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SyncAppInstanceForPartnerRequest::setSourceBizId(const std::string &sourceBizId) {
|
||||||
|
sourceBizId_ = sourceBizId;
|
||||||
|
setParameter(std::string("SourceBizId"), sourceBizId);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string SyncAppInstanceForPartnerRequest::get_Operator() const {
|
||||||
|
return _operator_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SyncAppInstanceForPartnerRequest::set_Operator(const std::string &_operator) {
|
||||||
|
_operator_ = _operator;
|
||||||
|
setParameter(std::string("Operator"), _operator);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string SyncAppInstanceForPartnerRequest::getEventType() const {
|
||||||
|
return eventType_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SyncAppInstanceForPartnerRequest::setEventType(const std::string &eventType) {
|
||||||
|
eventType_ = eventType;
|
||||||
|
setParameter(std::string("EventType"), eventType);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string SyncAppInstanceForPartnerRequest::getSourceType() const {
|
||||||
|
return sourceType_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SyncAppInstanceForPartnerRequest::setSourceType(const std::string &sourceType) {
|
||||||
|
sourceType_ = sourceType;
|
||||||
|
setParameter(std::string("SourceType"), sourceType);
|
||||||
|
}
|
||||||
|
|
||||||
53
websitebuild/src/model/SyncAppInstanceForPartnerResult.cc
Normal file
53
websitebuild/src/model/SyncAppInstanceForPartnerResult.cc
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
* 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/websitebuild/model/SyncAppInstanceForPartnerResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::WebsiteBuild;
|
||||||
|
using namespace AlibabaCloud::WebsiteBuild::Model;
|
||||||
|
|
||||||
|
SyncAppInstanceForPartnerResult::SyncAppInstanceForPartnerResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
SyncAppInstanceForPartnerResult::SyncAppInstanceForPartnerResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
SyncAppInstanceForPartnerResult::~SyncAppInstanceForPartnerResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void SyncAppInstanceForPartnerResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto dataNode = value["Data"];
|
||||||
|
auto appInstanceNode = dataNode["AppInstance"];
|
||||||
|
if(!appInstanceNode["BizId"].isNull())
|
||||||
|
data_.appInstance.bizId = appInstanceNode["BizId"].asString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
SyncAppInstanceForPartnerResult::Data SyncAppInstanceForPartnerResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user