Support API RecognizeImageColor.
This commit is contained in:
110
ivpd/include/alibabacloud/ivpd/IvpdClient.h
Normal file
110
ivpd/include/alibabacloud/ivpd/IvpdClient.h
Normal file
@@ -0,0 +1,110 @@
|
||||
/*
|
||||
* 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_IVPD_IVPDCLIENT_H_
|
||||
#define ALIBABACLOUD_IVPD_IVPDCLIENT_H_
|
||||
|
||||
#include <future>
|
||||
#include <alibabacloud/core/AsyncCallerContext.h>
|
||||
#include <alibabacloud/core/EndpointProvider.h>
|
||||
#include <alibabacloud/core/RpcServiceClient.h>
|
||||
#include "IvpdExport.h"
|
||||
#include "model/ExtendImageStyleRequest.h"
|
||||
#include "model/ExtendImageStyleResult.h"
|
||||
#include "model/DetectImageElementsRequest.h"
|
||||
#include "model/DetectImageElementsResult.h"
|
||||
#include "model/RecognizeImageStyleRequest.h"
|
||||
#include "model/RecognizeImageStyleResult.h"
|
||||
#include "model/ChangeImageSizeRequest.h"
|
||||
#include "model/ChangeImageSizeResult.h"
|
||||
#include "model/SegmentImageRequest.h"
|
||||
#include "model/SegmentImageResult.h"
|
||||
#include "model/MakeSuperResolutionImageRequest.h"
|
||||
#include "model/MakeSuperResolutionImageResult.h"
|
||||
#include "model/RecognizeImageColorRequest.h"
|
||||
#include "model/RecognizeImageColorResult.h"
|
||||
#include "model/RecolorImageRequest.h"
|
||||
#include "model/RecolorImageResult.h"
|
||||
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ivpd
|
||||
{
|
||||
class ALIBABACLOUD_IVPD_EXPORT IvpdClient : public RpcServiceClient
|
||||
{
|
||||
public:
|
||||
typedef Outcome<Error, Model::ExtendImageStyleResult> ExtendImageStyleOutcome;
|
||||
typedef std::future<ExtendImageStyleOutcome> ExtendImageStyleOutcomeCallable;
|
||||
typedef std::function<void(const IvpdClient*, const Model::ExtendImageStyleRequest&, const ExtendImageStyleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ExtendImageStyleAsyncHandler;
|
||||
typedef Outcome<Error, Model::DetectImageElementsResult> DetectImageElementsOutcome;
|
||||
typedef std::future<DetectImageElementsOutcome> DetectImageElementsOutcomeCallable;
|
||||
typedef std::function<void(const IvpdClient*, const Model::DetectImageElementsRequest&, const DetectImageElementsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectImageElementsAsyncHandler;
|
||||
typedef Outcome<Error, Model::RecognizeImageStyleResult> RecognizeImageStyleOutcome;
|
||||
typedef std::future<RecognizeImageStyleOutcome> RecognizeImageStyleOutcomeCallable;
|
||||
typedef std::function<void(const IvpdClient*, const Model::RecognizeImageStyleRequest&, const RecognizeImageStyleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeImageStyleAsyncHandler;
|
||||
typedef Outcome<Error, Model::ChangeImageSizeResult> ChangeImageSizeOutcome;
|
||||
typedef std::future<ChangeImageSizeOutcome> ChangeImageSizeOutcomeCallable;
|
||||
typedef std::function<void(const IvpdClient*, const Model::ChangeImageSizeRequest&, const ChangeImageSizeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ChangeImageSizeAsyncHandler;
|
||||
typedef Outcome<Error, Model::SegmentImageResult> SegmentImageOutcome;
|
||||
typedef std::future<SegmentImageOutcome> SegmentImageOutcomeCallable;
|
||||
typedef std::function<void(const IvpdClient*, const Model::SegmentImageRequest&, const SegmentImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SegmentImageAsyncHandler;
|
||||
typedef Outcome<Error, Model::MakeSuperResolutionImageResult> MakeSuperResolutionImageOutcome;
|
||||
typedef std::future<MakeSuperResolutionImageOutcome> MakeSuperResolutionImageOutcomeCallable;
|
||||
typedef std::function<void(const IvpdClient*, const Model::MakeSuperResolutionImageRequest&, const MakeSuperResolutionImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MakeSuperResolutionImageAsyncHandler;
|
||||
typedef Outcome<Error, Model::RecognizeImageColorResult> RecognizeImageColorOutcome;
|
||||
typedef std::future<RecognizeImageColorOutcome> RecognizeImageColorOutcomeCallable;
|
||||
typedef std::function<void(const IvpdClient*, const Model::RecognizeImageColorRequest&, const RecognizeImageColorOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeImageColorAsyncHandler;
|
||||
typedef Outcome<Error, Model::RecolorImageResult> RecolorImageOutcome;
|
||||
typedef std::future<RecolorImageOutcome> RecolorImageOutcomeCallable;
|
||||
typedef std::function<void(const IvpdClient*, const Model::RecolorImageRequest&, const RecolorImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecolorImageAsyncHandler;
|
||||
|
||||
IvpdClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||
IvpdClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||
IvpdClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||
~IvpdClient();
|
||||
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;
|
||||
ExtendImageStyleOutcomeCallable extendImageStyleCallable(const Model::ExtendImageStyleRequest& request) const;
|
||||
DetectImageElementsOutcome detectImageElements(const Model::DetectImageElementsRequest &request)const;
|
||||
void detectImageElementsAsync(const Model::DetectImageElementsRequest& request, const DetectImageElementsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DetectImageElementsOutcomeCallable detectImageElementsCallable(const Model::DetectImageElementsRequest& request) const;
|
||||
RecognizeImageStyleOutcome recognizeImageStyle(const Model::RecognizeImageStyleRequest &request)const;
|
||||
void recognizeImageStyleAsync(const Model::RecognizeImageStyleRequest& request, const RecognizeImageStyleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
RecognizeImageStyleOutcomeCallable recognizeImageStyleCallable(const Model::RecognizeImageStyleRequest& request) const;
|
||||
ChangeImageSizeOutcome changeImageSize(const Model::ChangeImageSizeRequest &request)const;
|
||||
void changeImageSizeAsync(const Model::ChangeImageSizeRequest& request, const ChangeImageSizeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ChangeImageSizeOutcomeCallable changeImageSizeCallable(const Model::ChangeImageSizeRequest& request) const;
|
||||
SegmentImageOutcome segmentImage(const Model::SegmentImageRequest &request)const;
|
||||
void segmentImageAsync(const Model::SegmentImageRequest& request, const SegmentImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
SegmentImageOutcomeCallable segmentImageCallable(const Model::SegmentImageRequest& request) const;
|
||||
MakeSuperResolutionImageOutcome makeSuperResolutionImage(const Model::MakeSuperResolutionImageRequest &request)const;
|
||||
void makeSuperResolutionImageAsync(const Model::MakeSuperResolutionImageRequest& request, const MakeSuperResolutionImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
MakeSuperResolutionImageOutcomeCallable makeSuperResolutionImageCallable(const Model::MakeSuperResolutionImageRequest& request) const;
|
||||
RecognizeImageColorOutcome recognizeImageColor(const Model::RecognizeImageColorRequest &request)const;
|
||||
void recognizeImageColorAsync(const Model::RecognizeImageColorRequest& request, const RecognizeImageColorAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
RecognizeImageColorOutcomeCallable recognizeImageColorCallable(const Model::RecognizeImageColorRequest& request) const;
|
||||
RecolorImageOutcome recolorImage(const Model::RecolorImageRequest &request)const;
|
||||
void recolorImageAsync(const Model::RecolorImageRequest& request, const RecolorImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
RecolorImageOutcomeCallable recolorImageCallable(const Model::RecolorImageRequest& request) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // !ALIBABACLOUD_IVPD_IVPDCLIENT_H_
|
||||
32
ivpd/include/alibabacloud/ivpd/IvpdExport.h
Normal file
32
ivpd/include/alibabacloud/ivpd/IvpdExport.h
Normal file
@@ -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_IVPD_IVPDEXPORT_H_
|
||||
#define ALIBABACLOUD_IVPD_IVPDEXPORT_H_
|
||||
|
||||
#include <alibabacloud/core/Global.h>
|
||||
|
||||
#if defined(ALIBABACLOUD_SHARED)
|
||||
# if defined(ALIBABACLOUD_IVPD_LIBRARY)
|
||||
# define ALIBABACLOUD_IVPD_EXPORT ALIBABACLOUD_DECL_EXPORT
|
||||
# else
|
||||
# define ALIBABACLOUD_IVPD_EXPORT ALIBABACLOUD_DECL_IMPORT
|
||||
# endif
|
||||
#else
|
||||
# define ALIBABACLOUD_IVPD_EXPORT
|
||||
#endif
|
||||
|
||||
#endif // !ALIBABACLOUD_IVPD_IVPDEXPORT_H_
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_IVPD_MODEL_CHANGEIMAGESIZEREQUEST_H_
|
||||
#define ALIBABACLOUD_IVPD_MODEL_CHANGEIMAGESIZEREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/ivpd/IvpdExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ivpd
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IVPD_EXPORT ChangeImageSizeRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
ChangeImageSizeRequest();
|
||||
~ChangeImageSizeRequest();
|
||||
|
||||
int getWidth()const;
|
||||
void setWidth(int width);
|
||||
std::string getUrl()const;
|
||||
void setUrl(const std::string& url);
|
||||
int getHeight()const;
|
||||
void setHeight(int height);
|
||||
|
||||
private:
|
||||
int width_;
|
||||
std::string url_;
|
||||
int height_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IVPD_MODEL_CHANGEIMAGESIZEREQUEST_H_
|
||||
59
ivpd/include/alibabacloud/ivpd/model/ChangeImageSizeResult.h
Normal file
59
ivpd/include/alibabacloud/ivpd/model/ChangeImageSizeResult.h
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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_IVPD_MODEL_CHANGEIMAGESIZERESULT_H_
|
||||
#define ALIBABACLOUD_IVPD_MODEL_CHANGEIMAGESIZERESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/ivpd/IvpdExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ivpd
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IVPD_EXPORT ChangeImageSizeResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string url;
|
||||
};
|
||||
|
||||
|
||||
ChangeImageSizeResult();
|
||||
explicit ChangeImageSizeResult(const std::string &payload);
|
||||
~ChangeImageSizeResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IVPD_MODEL_CHANGEIMAGESIZERESULT_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_IVPD_MODEL_DETECTIMAGEELEMENTSREQUEST_H_
|
||||
#define ALIBABACLOUD_IVPD_MODEL_DETECTIMAGEELEMENTSREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/ivpd/IvpdExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ivpd
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IVPD_EXPORT DetectImageElementsRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
DetectImageElementsRequest();
|
||||
~DetectImageElementsRequest();
|
||||
|
||||
std::string getUrl()const;
|
||||
void setUrl(const std::string& url);
|
||||
|
||||
private:
|
||||
std::string url_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IVPD_MODEL_DETECTIMAGEELEMENTSREQUEST_H_
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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_IVPD_MODEL_DETECTIMAGEELEMENTSRESULT_H_
|
||||
#define ALIBABACLOUD_IVPD_MODEL_DETECTIMAGEELEMENTSRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/ivpd/IvpdExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ivpd
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IVPD_EXPORT DetectImageElementsResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct Element
|
||||
{
|
||||
std::string type;
|
||||
float score;
|
||||
int x;
|
||||
int y;
|
||||
int height;
|
||||
int width;
|
||||
};
|
||||
std::vector<Element> elements;
|
||||
};
|
||||
|
||||
|
||||
DetectImageElementsResult();
|
||||
explicit DetectImageElementsResult(const std::string &payload);
|
||||
~DetectImageElementsResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IVPD_MODEL_DETECTIMAGEELEMENTSRESULT_H_
|
||||
@@ -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_IVPD_MODEL_EXTENDIMAGESTYLEREQUEST_H_
|
||||
#define ALIBABACLOUD_IVPD_MODEL_EXTENDIMAGESTYLEREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/ivpd/IvpdExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ivpd
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IVPD_EXPORT ExtendImageStyleRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
ExtendImageStyleRequest();
|
||||
~ExtendImageStyleRequest();
|
||||
|
||||
std::string getMajorUrl()const;
|
||||
void setMajorUrl(const std::string& majorUrl);
|
||||
std::string getStyleUrl()const;
|
||||
void setStyleUrl(const std::string& styleUrl);
|
||||
|
||||
private:
|
||||
std::string majorUrl_;
|
||||
std::string styleUrl_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IVPD_MODEL_EXTENDIMAGESTYLEREQUEST_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_IVPD_MODEL_EXTENDIMAGESTYLERESULT_H_
|
||||
#define ALIBABACLOUD_IVPD_MODEL_EXTENDIMAGESTYLERESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/ivpd/IvpdExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ivpd
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IVPD_EXPORT ExtendImageStyleResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string url;
|
||||
std::string majorUrl;
|
||||
};
|
||||
|
||||
|
||||
ExtendImageStyleResult();
|
||||
explicit ExtendImageStyleResult(const std::string &payload);
|
||||
~ExtendImageStyleResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IVPD_MODEL_EXTENDIMAGESTYLERESULT_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_IVPD_MODEL_MAKESUPERRESOLUTIONIMAGEREQUEST_H_
|
||||
#define ALIBABACLOUD_IVPD_MODEL_MAKESUPERRESOLUTIONIMAGEREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/ivpd/IvpdExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ivpd
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IVPD_EXPORT MakeSuperResolutionImageRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
MakeSuperResolutionImageRequest();
|
||||
~MakeSuperResolutionImageRequest();
|
||||
|
||||
std::string getUrl()const;
|
||||
void setUrl(const std::string& url);
|
||||
|
||||
private:
|
||||
std::string url_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IVPD_MODEL_MAKESUPERRESOLUTIONIMAGEREQUEST_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_IVPD_MODEL_MAKESUPERRESOLUTIONIMAGERESULT_H_
|
||||
#define ALIBABACLOUD_IVPD_MODEL_MAKESUPERRESOLUTIONIMAGERESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/ivpd/IvpdExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ivpd
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IVPD_EXPORT MakeSuperResolutionImageResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string url;
|
||||
};
|
||||
|
||||
|
||||
MakeSuperResolutionImageResult();
|
||||
explicit MakeSuperResolutionImageResult(const std::string &payload);
|
||||
~MakeSuperResolutionImageResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IVPD_MODEL_MAKESUPERRESOLUTIONIMAGERESULT_H_
|
||||
@@ -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_IVPD_MODEL_RECOGNIZEIMAGECOLORREQUEST_H_
|
||||
#define ALIBABACLOUD_IVPD_MODEL_RECOGNIZEIMAGECOLORREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/ivpd/IvpdExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ivpd
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IVPD_EXPORT RecognizeImageColorRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
RecognizeImageColorRequest();
|
||||
~RecognizeImageColorRequest();
|
||||
|
||||
std::string getColorCount()const;
|
||||
void setColorCount(const std::string& colorCount);
|
||||
std::string getUrl()const;
|
||||
void setUrl(const std::string& url);
|
||||
|
||||
private:
|
||||
std::string colorCount_;
|
||||
std::string url_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IVPD_MODEL_RECOGNIZEIMAGECOLORREQUEST_H_
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* 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_IVPD_MODEL_RECOGNIZEIMAGECOLORRESULT_H_
|
||||
#define ALIBABACLOUD_IVPD_MODEL_RECOGNIZEIMAGECOLORRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/ivpd/IvpdExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ivpd
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IVPD_EXPORT RecognizeImageColorResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct ColorTemplate
|
||||
{
|
||||
float percentage;
|
||||
std::string color;
|
||||
std::string label;
|
||||
};
|
||||
std::vector<ColorTemplate> colorTemplateList;
|
||||
};
|
||||
|
||||
|
||||
RecognizeImageColorResult();
|
||||
explicit RecognizeImageColorResult(const std::string &payload);
|
||||
~RecognizeImageColorResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IVPD_MODEL_RECOGNIZEIMAGECOLORRESULT_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_IVPD_MODEL_RECOGNIZEIMAGESTYLEREQUEST_H_
|
||||
#define ALIBABACLOUD_IVPD_MODEL_RECOGNIZEIMAGESTYLEREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/ivpd/IvpdExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ivpd
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IVPD_EXPORT RecognizeImageStyleRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
RecognizeImageStyleRequest();
|
||||
~RecognizeImageStyleRequest();
|
||||
|
||||
std::string getUrl()const;
|
||||
void setUrl(const std::string& url);
|
||||
|
||||
private:
|
||||
std::string url_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IVPD_MODEL_RECOGNIZEIMAGESTYLEREQUEST_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_IVPD_MODEL_RECOGNIZEIMAGESTYLERESULT_H_
|
||||
#define ALIBABACLOUD_IVPD_MODEL_RECOGNIZEIMAGESTYLERESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/ivpd/IvpdExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ivpd
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IVPD_EXPORT RecognizeImageStyleResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::vector<std::string> styles;
|
||||
};
|
||||
|
||||
|
||||
RecognizeImageStyleResult();
|
||||
explicit RecognizeImageStyleResult(const std::string &payload);
|
||||
~RecognizeImageStyleResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IVPD_MODEL_RECOGNIZEIMAGESTYLERESULT_H_
|
||||
64
ivpd/include/alibabacloud/ivpd/model/RecolorImageRequest.h
Normal file
64
ivpd/include/alibabacloud/ivpd/model/RecolorImageRequest.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* 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_IVPD_MODEL_RECOLORIMAGEREQUEST_H_
|
||||
#define ALIBABACLOUD_IVPD_MODEL_RECOLORIMAGEREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/ivpd/IvpdExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ivpd
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IVPD_EXPORT RecolorImageRequest : public RpcServiceRequest
|
||||
{
|
||||
struct ColorTemplate
|
||||
{
|
||||
std::string color;
|
||||
};
|
||||
|
||||
public:
|
||||
RecolorImageRequest();
|
||||
~RecolorImageRequest();
|
||||
|
||||
std::string getMode()const;
|
||||
void setMode(const std::string& mode);
|
||||
std::vector<ColorTemplate> getColorTemplate()const;
|
||||
void setColorTemplate(const std::vector<ColorTemplate>& colorTemplate);
|
||||
int getColorCount()const;
|
||||
void setColorCount(int colorCount);
|
||||
std::string getRefUrl()const;
|
||||
void setRefUrl(const std::string& refUrl);
|
||||
std::string getUrl()const;
|
||||
void setUrl(const std::string& url);
|
||||
|
||||
private:
|
||||
std::string mode_;
|
||||
std::vector<ColorTemplate> colorTemplate_;
|
||||
int colorCount_;
|
||||
std::string refUrl_;
|
||||
std::string url_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IVPD_MODEL_RECOLORIMAGEREQUEST_H_
|
||||
59
ivpd/include/alibabacloud/ivpd/model/RecolorImageResult.h
Normal file
59
ivpd/include/alibabacloud/ivpd/model/RecolorImageResult.h
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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_IVPD_MODEL_RECOLORIMAGERESULT_H_
|
||||
#define ALIBABACLOUD_IVPD_MODEL_RECOLORIMAGERESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/ivpd/IvpdExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ivpd
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IVPD_EXPORT RecolorImageResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::vector<std::string> imageList;
|
||||
};
|
||||
|
||||
|
||||
RecolorImageResult();
|
||||
explicit RecolorImageResult(const std::string &payload);
|
||||
~RecolorImageResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IVPD_MODEL_RECOLORIMAGERESULT_H_
|
||||
48
ivpd/include/alibabacloud/ivpd/model/SegmentImageRequest.h
Normal file
48
ivpd/include/alibabacloud/ivpd/model/SegmentImageRequest.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_IVPD_MODEL_SEGMENTIMAGEREQUEST_H_
|
||||
#define ALIBABACLOUD_IVPD_MODEL_SEGMENTIMAGEREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/ivpd/IvpdExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ivpd
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IVPD_EXPORT SegmentImageRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
SegmentImageRequest();
|
||||
~SegmentImageRequest();
|
||||
|
||||
std::string getUrl()const;
|
||||
void setUrl(const std::string& url);
|
||||
|
||||
private:
|
||||
std::string url_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IVPD_MODEL_SEGMENTIMAGEREQUEST_H_
|
||||
59
ivpd/include/alibabacloud/ivpd/model/SegmentImageResult.h
Normal file
59
ivpd/include/alibabacloud/ivpd/model/SegmentImageResult.h
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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_IVPD_MODEL_SEGMENTIMAGERESULT_H_
|
||||
#define ALIBABACLOUD_IVPD_MODEL_SEGMENTIMAGERESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/ivpd/IvpdExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Ivpd
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IVPD_EXPORT SegmentImageResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string url;
|
||||
};
|
||||
|
||||
|
||||
SegmentImageResult();
|
||||
explicit SegmentImageResult(const std::string &payload);
|
||||
~SegmentImageResult();
|
||||
std::string getMessage()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IVPD_MODEL_SEGMENTIMAGERESULT_H_
|
||||
341
ivpd/src/IvpdClient.cc
Normal file
341
ivpd/src/IvpdClient.cc
Normal file
@@ -0,0 +1,341 @@
|
||||
/*
|
||||
* 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/ivpd/IvpdClient.h>
|
||||
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||
|
||||
using namespace AlibabaCloud;
|
||||
using namespace AlibabaCloud::Location;
|
||||
using namespace AlibabaCloud::Ivpd;
|
||||
using namespace AlibabaCloud::Ivpd::Model;
|
||||
|
||||
namespace
|
||||
{
|
||||
const std::string SERVICE_NAME = "ivpd";
|
||||
}
|
||||
|
||||
IvpdClient::IvpdClient(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, "ivpd");
|
||||
}
|
||||
|
||||
IvpdClient::IvpdClient(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, "ivpd");
|
||||
}
|
||||
|
||||
IvpdClient::IvpdClient(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, "ivpd");
|
||||
}
|
||||
|
||||
IvpdClient::~IvpdClient()
|
||||
{}
|
||||
|
||||
IvpdClient::ExtendImageStyleOutcome IvpdClient::extendImageStyle(const ExtendImageStyleRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ExtendImageStyleOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ExtendImageStyleOutcome(ExtendImageStyleResult(outcome.result()));
|
||||
else
|
||||
return ExtendImageStyleOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void IvpdClient::extendImageStyleAsync(const ExtendImageStyleRequest& request, const ExtendImageStyleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, extendImageStyle(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
IvpdClient::ExtendImageStyleOutcomeCallable IvpdClient::extendImageStyleCallable(const ExtendImageStyleRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ExtendImageStyleOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->extendImageStyle(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IvpdClient::DetectImageElementsOutcome IvpdClient::detectImageElements(const DetectImageElementsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DetectImageElementsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DetectImageElementsOutcome(DetectImageElementsResult(outcome.result()));
|
||||
else
|
||||
return DetectImageElementsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void IvpdClient::detectImageElementsAsync(const DetectImageElementsRequest& request, const DetectImageElementsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, detectImageElements(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
IvpdClient::DetectImageElementsOutcomeCallable IvpdClient::detectImageElementsCallable(const DetectImageElementsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DetectImageElementsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->detectImageElements(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IvpdClient::RecognizeImageStyleOutcome IvpdClient::recognizeImageStyle(const RecognizeImageStyleRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RecognizeImageStyleOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RecognizeImageStyleOutcome(RecognizeImageStyleResult(outcome.result()));
|
||||
else
|
||||
return RecognizeImageStyleOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void IvpdClient::recognizeImageStyleAsync(const RecognizeImageStyleRequest& request, const RecognizeImageStyleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, recognizeImageStyle(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
IvpdClient::RecognizeImageStyleOutcomeCallable IvpdClient::recognizeImageStyleCallable(const RecognizeImageStyleRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RecognizeImageStyleOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->recognizeImageStyle(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IvpdClient::ChangeImageSizeOutcome IvpdClient::changeImageSize(const ChangeImageSizeRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ChangeImageSizeOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ChangeImageSizeOutcome(ChangeImageSizeResult(outcome.result()));
|
||||
else
|
||||
return ChangeImageSizeOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void IvpdClient::changeImageSizeAsync(const ChangeImageSizeRequest& request, const ChangeImageSizeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, changeImageSize(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
IvpdClient::ChangeImageSizeOutcomeCallable IvpdClient::changeImageSizeCallable(const ChangeImageSizeRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ChangeImageSizeOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->changeImageSize(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IvpdClient::SegmentImageOutcome IvpdClient::segmentImage(const SegmentImageRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return SegmentImageOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return SegmentImageOutcome(SegmentImageResult(outcome.result()));
|
||||
else
|
||||
return SegmentImageOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void IvpdClient::segmentImageAsync(const SegmentImageRequest& request, const SegmentImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, segmentImage(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
IvpdClient::SegmentImageOutcomeCallable IvpdClient::segmentImageCallable(const SegmentImageRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<SegmentImageOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->segmentImage(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IvpdClient::MakeSuperResolutionImageOutcome IvpdClient::makeSuperResolutionImage(const MakeSuperResolutionImageRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return MakeSuperResolutionImageOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return MakeSuperResolutionImageOutcome(MakeSuperResolutionImageResult(outcome.result()));
|
||||
else
|
||||
return MakeSuperResolutionImageOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void IvpdClient::makeSuperResolutionImageAsync(const MakeSuperResolutionImageRequest& request, const MakeSuperResolutionImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, makeSuperResolutionImage(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
IvpdClient::MakeSuperResolutionImageOutcomeCallable IvpdClient::makeSuperResolutionImageCallable(const MakeSuperResolutionImageRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<MakeSuperResolutionImageOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->makeSuperResolutionImage(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IvpdClient::RecognizeImageColorOutcome IvpdClient::recognizeImageColor(const RecognizeImageColorRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RecognizeImageColorOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RecognizeImageColorOutcome(RecognizeImageColorResult(outcome.result()));
|
||||
else
|
||||
return RecognizeImageColorOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void IvpdClient::recognizeImageColorAsync(const RecognizeImageColorRequest& request, const RecognizeImageColorAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, recognizeImageColor(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
IvpdClient::RecognizeImageColorOutcomeCallable IvpdClient::recognizeImageColorCallable(const RecognizeImageColorRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RecognizeImageColorOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->recognizeImageColor(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IvpdClient::RecolorImageOutcome IvpdClient::recolorImage(const RecolorImageRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RecolorImageOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RecolorImageOutcome(RecolorImageResult(outcome.result()));
|
||||
else
|
||||
return RecolorImageOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void IvpdClient::recolorImageAsync(const RecolorImageRequest& request, const RecolorImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, recolorImage(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
IvpdClient::RecolorImageOutcomeCallable IvpdClient::recolorImageCallable(const RecolorImageRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RecolorImageOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->recolorImage(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
60
ivpd/src/model/ChangeImageSizeRequest.cc
Normal file
60
ivpd/src/model/ChangeImageSizeRequest.cc
Normal file
@@ -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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ivpd/model/ChangeImageSizeRequest.h>
|
||||
|
||||
using AlibabaCloud::Ivpd::Model::ChangeImageSizeRequest;
|
||||
|
||||
ChangeImageSizeRequest::ChangeImageSizeRequest() :
|
||||
RpcServiceRequest("ivpd", "2019-06-25", "ChangeImageSize")
|
||||
{}
|
||||
|
||||
ChangeImageSizeRequest::~ChangeImageSizeRequest()
|
||||
{}
|
||||
|
||||
int ChangeImageSizeRequest::getWidth()const
|
||||
{
|
||||
return width_;
|
||||
}
|
||||
|
||||
void ChangeImageSizeRequest::setWidth(int width)
|
||||
{
|
||||
width_ = width;
|
||||
setCoreParameter("Width", std::to_string(width));
|
||||
}
|
||||
|
||||
std::string ChangeImageSizeRequest::getUrl()const
|
||||
{
|
||||
return url_;
|
||||
}
|
||||
|
||||
void ChangeImageSizeRequest::setUrl(const std::string& url)
|
||||
{
|
||||
url_ = url;
|
||||
setCoreParameter("Url", url);
|
||||
}
|
||||
|
||||
int ChangeImageSizeRequest::getHeight()const
|
||||
{
|
||||
return height_;
|
||||
}
|
||||
|
||||
void ChangeImageSizeRequest::setHeight(int height)
|
||||
{
|
||||
height_ = height;
|
||||
setCoreParameter("Height", std::to_string(height));
|
||||
}
|
||||
|
||||
70
ivpd/src/model/ChangeImageSizeResult.cc
Normal file
70
ivpd/src/model/ChangeImageSizeResult.cc
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* 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/ivpd/model/ChangeImageSizeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ivpd;
|
||||
using namespace AlibabaCloud::Ivpd::Model;
|
||||
|
||||
ChangeImageSizeResult::ChangeImageSizeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ChangeImageSizeResult::ChangeImageSizeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ChangeImageSizeResult::~ChangeImageSizeResult()
|
||||
{}
|
||||
|
||||
void ChangeImageSizeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Url"].isNull())
|
||||
data_.url = dataNode["Url"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ChangeImageSizeResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
ChangeImageSizeResult::Data ChangeImageSizeResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string ChangeImageSizeResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
38
ivpd/src/model/DetectImageElementsRequest.cc
Normal file
38
ivpd/src/model/DetectImageElementsRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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/ivpd/model/DetectImageElementsRequest.h>
|
||||
|
||||
using AlibabaCloud::Ivpd::Model::DetectImageElementsRequest;
|
||||
|
||||
DetectImageElementsRequest::DetectImageElementsRequest() :
|
||||
RpcServiceRequest("ivpd", "2019-06-25", "DetectImageElements")
|
||||
{}
|
||||
|
||||
DetectImageElementsRequest::~DetectImageElementsRequest()
|
||||
{}
|
||||
|
||||
std::string DetectImageElementsRequest::getUrl()const
|
||||
{
|
||||
return url_;
|
||||
}
|
||||
|
||||
void DetectImageElementsRequest::setUrl(const std::string& url)
|
||||
{
|
||||
url_ = url;
|
||||
setCoreParameter("Url", url);
|
||||
}
|
||||
|
||||
86
ivpd/src/model/DetectImageElementsResult.cc
Normal file
86
ivpd/src/model/DetectImageElementsResult.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/ivpd/model/DetectImageElementsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ivpd;
|
||||
using namespace AlibabaCloud::Ivpd::Model;
|
||||
|
||||
DetectImageElementsResult::DetectImageElementsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DetectImageElementsResult::DetectImageElementsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DetectImageElementsResult::~DetectImageElementsResult()
|
||||
{}
|
||||
|
||||
void DetectImageElementsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto allElements = value["Elements"]["Element"];
|
||||
for (auto value : allElements)
|
||||
{
|
||||
Data::Element elementObject;
|
||||
if(!value["Type"].isNull())
|
||||
elementObject.type = value["Type"].asString();
|
||||
if(!value["X"].isNull())
|
||||
elementObject.x = std::stoi(value["X"].asString());
|
||||
if(!value["Y"].isNull())
|
||||
elementObject.y = std::stoi(value["Y"].asString());
|
||||
if(!value["Width"].isNull())
|
||||
elementObject.width = std::stoi(value["Width"].asString());
|
||||
if(!value["Height"].isNull())
|
||||
elementObject.height = std::stoi(value["Height"].asString());
|
||||
if(!value["Score"].isNull())
|
||||
elementObject.score = std::stof(value["Score"].asString());
|
||||
data_.elements.push_back(elementObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DetectImageElementsResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
DetectImageElementsResult::Data DetectImageElementsResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string DetectImageElementsResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
49
ivpd/src/model/ExtendImageStyleRequest.cc
Normal file
49
ivpd/src/model/ExtendImageStyleRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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/ivpd/model/ExtendImageStyleRequest.h>
|
||||
|
||||
using AlibabaCloud::Ivpd::Model::ExtendImageStyleRequest;
|
||||
|
||||
ExtendImageStyleRequest::ExtendImageStyleRequest() :
|
||||
RpcServiceRequest("ivpd", "2019-06-25", "ExtendImageStyle")
|
||||
{}
|
||||
|
||||
ExtendImageStyleRequest::~ExtendImageStyleRequest()
|
||||
{}
|
||||
|
||||
std::string ExtendImageStyleRequest::getMajorUrl()const
|
||||
{
|
||||
return majorUrl_;
|
||||
}
|
||||
|
||||
void ExtendImageStyleRequest::setMajorUrl(const std::string& majorUrl)
|
||||
{
|
||||
majorUrl_ = majorUrl;
|
||||
setCoreParameter("MajorUrl", majorUrl);
|
||||
}
|
||||
|
||||
std::string ExtendImageStyleRequest::getStyleUrl()const
|
||||
{
|
||||
return styleUrl_;
|
||||
}
|
||||
|
||||
void ExtendImageStyleRequest::setStyleUrl(const std::string& styleUrl)
|
||||
{
|
||||
styleUrl_ = styleUrl;
|
||||
setCoreParameter("StyleUrl", styleUrl);
|
||||
}
|
||||
|
||||
72
ivpd/src/model/ExtendImageStyleResult.cc
Normal file
72
ivpd/src/model/ExtendImageStyleResult.cc
Normal file
@@ -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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ivpd/model/ExtendImageStyleResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ivpd;
|
||||
using namespace AlibabaCloud::Ivpd::Model;
|
||||
|
||||
ExtendImageStyleResult::ExtendImageStyleResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ExtendImageStyleResult::ExtendImageStyleResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ExtendImageStyleResult::~ExtendImageStyleResult()
|
||||
{}
|
||||
|
||||
void ExtendImageStyleResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Url"].isNull())
|
||||
data_.url = dataNode["Url"].asString();
|
||||
if(!dataNode["MajorUrl"].isNull())
|
||||
data_.majorUrl = dataNode["MajorUrl"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ExtendImageStyleResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
ExtendImageStyleResult::Data ExtendImageStyleResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string ExtendImageStyleResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
38
ivpd/src/model/MakeSuperResolutionImageRequest.cc
Normal file
38
ivpd/src/model/MakeSuperResolutionImageRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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/ivpd/model/MakeSuperResolutionImageRequest.h>
|
||||
|
||||
using AlibabaCloud::Ivpd::Model::MakeSuperResolutionImageRequest;
|
||||
|
||||
MakeSuperResolutionImageRequest::MakeSuperResolutionImageRequest() :
|
||||
RpcServiceRequest("ivpd", "2019-06-25", "MakeSuperResolutionImage")
|
||||
{}
|
||||
|
||||
MakeSuperResolutionImageRequest::~MakeSuperResolutionImageRequest()
|
||||
{}
|
||||
|
||||
std::string MakeSuperResolutionImageRequest::getUrl()const
|
||||
{
|
||||
return url_;
|
||||
}
|
||||
|
||||
void MakeSuperResolutionImageRequest::setUrl(const std::string& url)
|
||||
{
|
||||
url_ = url;
|
||||
setCoreParameter("Url", url);
|
||||
}
|
||||
|
||||
70
ivpd/src/model/MakeSuperResolutionImageResult.cc
Normal file
70
ivpd/src/model/MakeSuperResolutionImageResult.cc
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* 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/ivpd/model/MakeSuperResolutionImageResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ivpd;
|
||||
using namespace AlibabaCloud::Ivpd::Model;
|
||||
|
||||
MakeSuperResolutionImageResult::MakeSuperResolutionImageResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
MakeSuperResolutionImageResult::MakeSuperResolutionImageResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
MakeSuperResolutionImageResult::~MakeSuperResolutionImageResult()
|
||||
{}
|
||||
|
||||
void MakeSuperResolutionImageResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Url"].isNull())
|
||||
data_.url = dataNode["Url"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string MakeSuperResolutionImageResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
MakeSuperResolutionImageResult::Data MakeSuperResolutionImageResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string MakeSuperResolutionImageResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
49
ivpd/src/model/RecognizeImageColorRequest.cc
Normal file
49
ivpd/src/model/RecognizeImageColorRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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/ivpd/model/RecognizeImageColorRequest.h>
|
||||
|
||||
using AlibabaCloud::Ivpd::Model::RecognizeImageColorRequest;
|
||||
|
||||
RecognizeImageColorRequest::RecognizeImageColorRequest() :
|
||||
RpcServiceRequest("ivpd", "2019-06-25", "RecognizeImageColor")
|
||||
{}
|
||||
|
||||
RecognizeImageColorRequest::~RecognizeImageColorRequest()
|
||||
{}
|
||||
|
||||
std::string RecognizeImageColorRequest::getColorCount()const
|
||||
{
|
||||
return colorCount_;
|
||||
}
|
||||
|
||||
void RecognizeImageColorRequest::setColorCount(const std::string& colorCount)
|
||||
{
|
||||
colorCount_ = colorCount;
|
||||
setCoreParameter("ColorCount", colorCount);
|
||||
}
|
||||
|
||||
std::string RecognizeImageColorRequest::getUrl()const
|
||||
{
|
||||
return url_;
|
||||
}
|
||||
|
||||
void RecognizeImageColorRequest::setUrl(const std::string& url)
|
||||
{
|
||||
url_ = url;
|
||||
setCoreParameter("Url", url);
|
||||
}
|
||||
|
||||
80
ivpd/src/model/RecognizeImageColorResult.cc
Normal file
80
ivpd/src/model/RecognizeImageColorResult.cc
Normal 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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ivpd/model/RecognizeImageColorResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ivpd;
|
||||
using namespace AlibabaCloud::Ivpd::Model;
|
||||
|
||||
RecognizeImageColorResult::RecognizeImageColorResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RecognizeImageColorResult::RecognizeImageColorResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RecognizeImageColorResult::~RecognizeImageColorResult()
|
||||
{}
|
||||
|
||||
void RecognizeImageColorResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto allColorTemplateList = value["ColorTemplateList"]["ColorTemplate"];
|
||||
for (auto value : allColorTemplateList)
|
||||
{
|
||||
Data::ColorTemplate colorTemplateObject;
|
||||
if(!value["Color"].isNull())
|
||||
colorTemplateObject.color = value["Color"].asString();
|
||||
if(!value["Label"].isNull())
|
||||
colorTemplateObject.label = value["Label"].asString();
|
||||
if(!value["Percentage"].isNull())
|
||||
colorTemplateObject.percentage = std::stof(value["Percentage"].asString());
|
||||
data_.colorTemplateList.push_back(colorTemplateObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string RecognizeImageColorResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
RecognizeImageColorResult::Data RecognizeImageColorResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string RecognizeImageColorResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
38
ivpd/src/model/RecognizeImageStyleRequest.cc
Normal file
38
ivpd/src/model/RecognizeImageStyleRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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/ivpd/model/RecognizeImageStyleRequest.h>
|
||||
|
||||
using AlibabaCloud::Ivpd::Model::RecognizeImageStyleRequest;
|
||||
|
||||
RecognizeImageStyleRequest::RecognizeImageStyleRequest() :
|
||||
RpcServiceRequest("ivpd", "2019-06-25", "RecognizeImageStyle")
|
||||
{}
|
||||
|
||||
RecognizeImageStyleRequest::~RecognizeImageStyleRequest()
|
||||
{}
|
||||
|
||||
std::string RecognizeImageStyleRequest::getUrl()const
|
||||
{
|
||||
return url_;
|
||||
}
|
||||
|
||||
void RecognizeImageStyleRequest::setUrl(const std::string& url)
|
||||
{
|
||||
url_ = url;
|
||||
setCoreParameter("Url", url);
|
||||
}
|
||||
|
||||
71
ivpd/src/model/RecognizeImageStyleResult.cc
Normal file
71
ivpd/src/model/RecognizeImageStyleResult.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/ivpd/model/RecognizeImageStyleResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ivpd;
|
||||
using namespace AlibabaCloud::Ivpd::Model;
|
||||
|
||||
RecognizeImageStyleResult::RecognizeImageStyleResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RecognizeImageStyleResult::RecognizeImageStyleResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RecognizeImageStyleResult::~RecognizeImageStyleResult()
|
||||
{}
|
||||
|
||||
void RecognizeImageStyleResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto allStyles = dataNode["Styles"]["Style"];
|
||||
for (auto value : allStyles)
|
||||
data_.styles.push_back(value.asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string RecognizeImageStyleResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
RecognizeImageStyleResult::Data RecognizeImageStyleResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string RecognizeImageStyleResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
87
ivpd/src/model/RecolorImageRequest.cc
Normal file
87
ivpd/src/model/RecolorImageRequest.cc
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 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/ivpd/model/RecolorImageRequest.h>
|
||||
|
||||
using AlibabaCloud::Ivpd::Model::RecolorImageRequest;
|
||||
|
||||
RecolorImageRequest::RecolorImageRequest() :
|
||||
RpcServiceRequest("ivpd", "2019-06-25", "RecolorImage")
|
||||
{}
|
||||
|
||||
RecolorImageRequest::~RecolorImageRequest()
|
||||
{}
|
||||
|
||||
std::string RecolorImageRequest::getMode()const
|
||||
{
|
||||
return mode_;
|
||||
}
|
||||
|
||||
void RecolorImageRequest::setMode(const std::string& mode)
|
||||
{
|
||||
mode_ = mode;
|
||||
setCoreParameter("Mode", mode);
|
||||
}
|
||||
|
||||
std::vector<RecolorImageRequest::ColorTemplate> RecolorImageRequest::getColorTemplate()const
|
||||
{
|
||||
return colorTemplate_;
|
||||
}
|
||||
|
||||
void RecolorImageRequest::setColorTemplate(const std::vector<ColorTemplate>& colorTemplate)
|
||||
{
|
||||
colorTemplate_ = colorTemplate;
|
||||
int i = 0;
|
||||
for(int i = 0; i!= colorTemplate.size(); i++) {
|
||||
auto obj = colorTemplate.at(i);
|
||||
std::string str ="ColorTemplate."+ std::to_string(i);
|
||||
setCoreParameter(str + ".Color", obj.color);
|
||||
}
|
||||
}
|
||||
|
||||
int RecolorImageRequest::getColorCount()const
|
||||
{
|
||||
return colorCount_;
|
||||
}
|
||||
|
||||
void RecolorImageRequest::setColorCount(int colorCount)
|
||||
{
|
||||
colorCount_ = colorCount;
|
||||
setCoreParameter("ColorCount", std::to_string(colorCount));
|
||||
}
|
||||
|
||||
std::string RecolorImageRequest::getRefUrl()const
|
||||
{
|
||||
return refUrl_;
|
||||
}
|
||||
|
||||
void RecolorImageRequest::setRefUrl(const std::string& refUrl)
|
||||
{
|
||||
refUrl_ = refUrl;
|
||||
setCoreParameter("RefUrl", refUrl);
|
||||
}
|
||||
|
||||
std::string RecolorImageRequest::getUrl()const
|
||||
{
|
||||
return url_;
|
||||
}
|
||||
|
||||
void RecolorImageRequest::setUrl(const std::string& url)
|
||||
{
|
||||
url_ = url;
|
||||
setCoreParameter("Url", url);
|
||||
}
|
||||
|
||||
71
ivpd/src/model/RecolorImageResult.cc
Normal file
71
ivpd/src/model/RecolorImageResult.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/ivpd/model/RecolorImageResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ivpd;
|
||||
using namespace AlibabaCloud::Ivpd::Model;
|
||||
|
||||
RecolorImageResult::RecolorImageResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RecolorImageResult::RecolorImageResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RecolorImageResult::~RecolorImageResult()
|
||||
{}
|
||||
|
||||
void RecolorImageResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto allImageList = dataNode["ImageList"]["ImageList"];
|
||||
for (auto value : allImageList)
|
||||
data_.imageList.push_back(value.asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string RecolorImageResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
RecolorImageResult::Data RecolorImageResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string RecolorImageResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
38
ivpd/src/model/SegmentImageRequest.cc
Normal file
38
ivpd/src/model/SegmentImageRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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/ivpd/model/SegmentImageRequest.h>
|
||||
|
||||
using AlibabaCloud::Ivpd::Model::SegmentImageRequest;
|
||||
|
||||
SegmentImageRequest::SegmentImageRequest() :
|
||||
RpcServiceRequest("ivpd", "2019-06-25", "SegmentImage")
|
||||
{}
|
||||
|
||||
SegmentImageRequest::~SegmentImageRequest()
|
||||
{}
|
||||
|
||||
std::string SegmentImageRequest::getUrl()const
|
||||
{
|
||||
return url_;
|
||||
}
|
||||
|
||||
void SegmentImageRequest::setUrl(const std::string& url)
|
||||
{
|
||||
url_ = url;
|
||||
setCoreParameter("Url", url);
|
||||
}
|
||||
|
||||
70
ivpd/src/model/SegmentImageResult.cc
Normal file
70
ivpd/src/model/SegmentImageResult.cc
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* 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/ivpd/model/SegmentImageResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ivpd;
|
||||
using namespace AlibabaCloud::Ivpd::Model;
|
||||
|
||||
SegmentImageResult::SegmentImageResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
SegmentImageResult::SegmentImageResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
SegmentImageResult::~SegmentImageResult()
|
||||
{}
|
||||
|
||||
void SegmentImageResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Url"].isNull())
|
||||
data_.url = dataNode["Url"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string SegmentImageResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
SegmentImageResult::Data SegmentImageResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string SegmentImageResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user