Release GenerateDynamicImage.

This commit is contained in:
sdk-team
2020-10-13 02:45:13 +00:00
parent 134828d83c
commit 96b3defcc9
73 changed files with 4889 additions and 0 deletions

View File

@@ -0,0 +1,665 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/ImageenhanClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::Imageenhan;
using namespace AlibabaCloud::Imageenhan::Model;
namespace
{
const std::string SERVICE_NAME = "imageenhan";
}
ImageenhanClient::ImageenhanClient(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, "imageenhan");
}
ImageenhanClient::ImageenhanClient(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, "imageenhan");
}
ImageenhanClient::ImageenhanClient(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, "imageenhan");
}
ImageenhanClient::~ImageenhanClient()
{}
ImageenhanClient::AssessCompositionOutcome ImageenhanClient::assessComposition(const AssessCompositionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return AssessCompositionOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AssessCompositionOutcome(AssessCompositionResult(outcome.result()));
else
return AssessCompositionOutcome(outcome.error());
}
void ImageenhanClient::assessCompositionAsync(const AssessCompositionRequest& request, const AssessCompositionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, assessComposition(request), context);
};
asyncExecute(new Runnable(fn));
}
ImageenhanClient::AssessCompositionOutcomeCallable ImageenhanClient::assessCompositionCallable(const AssessCompositionRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AssessCompositionOutcome()>>(
[this, request]()
{
return this->assessComposition(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ImageenhanClient::AssessExposureOutcome ImageenhanClient::assessExposure(const AssessExposureRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return AssessExposureOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AssessExposureOutcome(AssessExposureResult(outcome.result()));
else
return AssessExposureOutcome(outcome.error());
}
void ImageenhanClient::assessExposureAsync(const AssessExposureRequest& request, const AssessExposureAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, assessExposure(request), context);
};
asyncExecute(new Runnable(fn));
}
ImageenhanClient::AssessExposureOutcomeCallable ImageenhanClient::assessExposureCallable(const AssessExposureRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AssessExposureOutcome()>>(
[this, request]()
{
return this->assessExposure(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ImageenhanClient::AssessSharpnessOutcome ImageenhanClient::assessSharpness(const AssessSharpnessRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return AssessSharpnessOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AssessSharpnessOutcome(AssessSharpnessResult(outcome.result()));
else
return AssessSharpnessOutcome(outcome.error());
}
void ImageenhanClient::assessSharpnessAsync(const AssessSharpnessRequest& request, const AssessSharpnessAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, assessSharpness(request), context);
};
asyncExecute(new Runnable(fn));
}
ImageenhanClient::AssessSharpnessOutcomeCallable ImageenhanClient::assessSharpnessCallable(const AssessSharpnessRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AssessSharpnessOutcome()>>(
[this, request]()
{
return this->assessSharpness(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ImageenhanClient::ChangeImageSizeOutcome ImageenhanClient::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 ImageenhanClient::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));
}
ImageenhanClient::ChangeImageSizeOutcomeCallable ImageenhanClient::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();
}
ImageenhanClient::EnhanceImageColorOutcome ImageenhanClient::enhanceImageColor(const EnhanceImageColorRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return EnhanceImageColorOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return EnhanceImageColorOutcome(EnhanceImageColorResult(outcome.result()));
else
return EnhanceImageColorOutcome(outcome.error());
}
void ImageenhanClient::enhanceImageColorAsync(const EnhanceImageColorRequest& request, const EnhanceImageColorAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, enhanceImageColor(request), context);
};
asyncExecute(new Runnable(fn));
}
ImageenhanClient::EnhanceImageColorOutcomeCallable ImageenhanClient::enhanceImageColorCallable(const EnhanceImageColorRequest &request) const
{
auto task = std::make_shared<std::packaged_task<EnhanceImageColorOutcome()>>(
[this, request]()
{
return this->enhanceImageColor(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ImageenhanClient::ExtendImageStyleOutcome ImageenhanClient::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 ImageenhanClient::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));
}
ImageenhanClient::ExtendImageStyleOutcomeCallable ImageenhanClient::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();
}
ImageenhanClient::GenerateDynamicImageOutcome ImageenhanClient::generateDynamicImage(const GenerateDynamicImageRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GenerateDynamicImageOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GenerateDynamicImageOutcome(GenerateDynamicImageResult(outcome.result()));
else
return GenerateDynamicImageOutcome(outcome.error());
}
void ImageenhanClient::generateDynamicImageAsync(const GenerateDynamicImageRequest& request, const GenerateDynamicImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, generateDynamicImage(request), context);
};
asyncExecute(new Runnable(fn));
}
ImageenhanClient::GenerateDynamicImageOutcomeCallable ImageenhanClient::generateDynamicImageCallable(const GenerateDynamicImageRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GenerateDynamicImageOutcome()>>(
[this, request]()
{
return this->generateDynamicImage(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ImageenhanClient::GetAsyncJobResultOutcome ImageenhanClient::getAsyncJobResult(const GetAsyncJobResultRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetAsyncJobResultOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetAsyncJobResultOutcome(GetAsyncJobResultResult(outcome.result()));
else
return GetAsyncJobResultOutcome(outcome.error());
}
void ImageenhanClient::getAsyncJobResultAsync(const GetAsyncJobResultRequest& request, const GetAsyncJobResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getAsyncJobResult(request), context);
};
asyncExecute(new Runnable(fn));
}
ImageenhanClient::GetAsyncJobResultOutcomeCallable ImageenhanClient::getAsyncJobResultCallable(const GetAsyncJobResultRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetAsyncJobResultOutcome()>>(
[this, request]()
{
return this->getAsyncJobResult(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ImageenhanClient::ImageBlindCharacterWatermarkOutcome ImageenhanClient::imageBlindCharacterWatermark(const ImageBlindCharacterWatermarkRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ImageBlindCharacterWatermarkOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ImageBlindCharacterWatermarkOutcome(ImageBlindCharacterWatermarkResult(outcome.result()));
else
return ImageBlindCharacterWatermarkOutcome(outcome.error());
}
void ImageenhanClient::imageBlindCharacterWatermarkAsync(const ImageBlindCharacterWatermarkRequest& request, const ImageBlindCharacterWatermarkAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, imageBlindCharacterWatermark(request), context);
};
asyncExecute(new Runnable(fn));
}
ImageenhanClient::ImageBlindCharacterWatermarkOutcomeCallable ImageenhanClient::imageBlindCharacterWatermarkCallable(const ImageBlindCharacterWatermarkRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ImageBlindCharacterWatermarkOutcome()>>(
[this, request]()
{
return this->imageBlindCharacterWatermark(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ImageenhanClient::ImageBlindPicWatermarkOutcome ImageenhanClient::imageBlindPicWatermark(const ImageBlindPicWatermarkRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ImageBlindPicWatermarkOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ImageBlindPicWatermarkOutcome(ImageBlindPicWatermarkResult(outcome.result()));
else
return ImageBlindPicWatermarkOutcome(outcome.error());
}
void ImageenhanClient::imageBlindPicWatermarkAsync(const ImageBlindPicWatermarkRequest& request, const ImageBlindPicWatermarkAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, imageBlindPicWatermark(request), context);
};
asyncExecute(new Runnable(fn));
}
ImageenhanClient::ImageBlindPicWatermarkOutcomeCallable ImageenhanClient::imageBlindPicWatermarkCallable(const ImageBlindPicWatermarkRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ImageBlindPicWatermarkOutcome()>>(
[this, request]()
{
return this->imageBlindPicWatermark(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ImageenhanClient::ImitatePhotoStyleOutcome ImageenhanClient::imitatePhotoStyle(const ImitatePhotoStyleRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ImitatePhotoStyleOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ImitatePhotoStyleOutcome(ImitatePhotoStyleResult(outcome.result()));
else
return ImitatePhotoStyleOutcome(outcome.error());
}
void ImageenhanClient::imitatePhotoStyleAsync(const ImitatePhotoStyleRequest& request, const ImitatePhotoStyleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, imitatePhotoStyle(request), context);
};
asyncExecute(new Runnable(fn));
}
ImageenhanClient::ImitatePhotoStyleOutcomeCallable ImageenhanClient::imitatePhotoStyleCallable(const ImitatePhotoStyleRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ImitatePhotoStyleOutcome()>>(
[this, request]()
{
return this->imitatePhotoStyle(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ImageenhanClient::IntelligentCompositionOutcome ImageenhanClient::intelligentComposition(const IntelligentCompositionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return IntelligentCompositionOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return IntelligentCompositionOutcome(IntelligentCompositionResult(outcome.result()));
else
return IntelligentCompositionOutcome(outcome.error());
}
void ImageenhanClient::intelligentCompositionAsync(const IntelligentCompositionRequest& request, const IntelligentCompositionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, intelligentComposition(request), context);
};
asyncExecute(new Runnable(fn));
}
ImageenhanClient::IntelligentCompositionOutcomeCallable ImageenhanClient::intelligentCompositionCallable(const IntelligentCompositionRequest &request) const
{
auto task = std::make_shared<std::packaged_task<IntelligentCompositionOutcome()>>(
[this, request]()
{
return this->intelligentComposition(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ImageenhanClient::MakeSuperResolutionImageOutcome ImageenhanClient::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 ImageenhanClient::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));
}
ImageenhanClient::MakeSuperResolutionImageOutcomeCallable ImageenhanClient::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();
}
ImageenhanClient::RecolorHDImageOutcome ImageenhanClient::recolorHDImage(const RecolorHDImageRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return RecolorHDImageOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return RecolorHDImageOutcome(RecolorHDImageResult(outcome.result()));
else
return RecolorHDImageOutcome(outcome.error());
}
void ImageenhanClient::recolorHDImageAsync(const RecolorHDImageRequest& request, const RecolorHDImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, recolorHDImage(request), context);
};
asyncExecute(new Runnable(fn));
}
ImageenhanClient::RecolorHDImageOutcomeCallable ImageenhanClient::recolorHDImageCallable(const RecolorHDImageRequest &request) const
{
auto task = std::make_shared<std::packaged_task<RecolorHDImageOutcome()>>(
[this, request]()
{
return this->recolorHDImage(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ImageenhanClient::RecolorImageOutcome ImageenhanClient::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 ImageenhanClient::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));
}
ImageenhanClient::RecolorImageOutcomeCallable ImageenhanClient::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();
}
ImageenhanClient::RemoveImageSubtitlesOutcome ImageenhanClient::removeImageSubtitles(const RemoveImageSubtitlesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return RemoveImageSubtitlesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return RemoveImageSubtitlesOutcome(RemoveImageSubtitlesResult(outcome.result()));
else
return RemoveImageSubtitlesOutcome(outcome.error());
}
void ImageenhanClient::removeImageSubtitlesAsync(const RemoveImageSubtitlesRequest& request, const RemoveImageSubtitlesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, removeImageSubtitles(request), context);
};
asyncExecute(new Runnable(fn));
}
ImageenhanClient::RemoveImageSubtitlesOutcomeCallable ImageenhanClient::removeImageSubtitlesCallable(const RemoveImageSubtitlesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<RemoveImageSubtitlesOutcome()>>(
[this, request]()
{
return this->removeImageSubtitles(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ImageenhanClient::RemoveImageWatermarkOutcome ImageenhanClient::removeImageWatermark(const RemoveImageWatermarkRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return RemoveImageWatermarkOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return RemoveImageWatermarkOutcome(RemoveImageWatermarkResult(outcome.result()));
else
return RemoveImageWatermarkOutcome(outcome.error());
}
void ImageenhanClient::removeImageWatermarkAsync(const RemoveImageWatermarkRequest& request, const RemoveImageWatermarkAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, removeImageWatermark(request), context);
};
asyncExecute(new Runnable(fn));
}
ImageenhanClient::RemoveImageWatermarkOutcomeCallable ImageenhanClient::removeImageWatermarkCallable(const RemoveImageWatermarkRequest &request) const
{
auto task = std::make_shared<std::packaged_task<RemoveImageWatermarkOutcome()>>(
[this, request]()
{
return this->removeImageWatermark(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/AssessCompositionRequest.h>
using AlibabaCloud::Imageenhan::Model::AssessCompositionRequest;
AssessCompositionRequest::AssessCompositionRequest() :
RpcServiceRequest("imageenhan", "2019-09-30", "AssessComposition")
{
setMethod(HttpRequest::Method::Post);
}
AssessCompositionRequest::~AssessCompositionRequest()
{}
std::string AssessCompositionRequest::getImageURL()const
{
return imageURL_;
}
void AssessCompositionRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,52 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/AssessCompositionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imageenhan;
using namespace AlibabaCloud::Imageenhan::Model;
AssessCompositionResult::AssessCompositionResult() :
ServiceResult()
{}
AssessCompositionResult::AssessCompositionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AssessCompositionResult::~AssessCompositionResult()
{}
void AssessCompositionResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["Score"].isNull())
data_.score = std::stof(dataNode["Score"].asString());
}
AssessCompositionResult::Data AssessCompositionResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/AssessExposureRequest.h>
using AlibabaCloud::Imageenhan::Model::AssessExposureRequest;
AssessExposureRequest::AssessExposureRequest() :
RpcServiceRequest("imageenhan", "2019-09-30", "AssessExposure")
{
setMethod(HttpRequest::Method::Post);
}
AssessExposureRequest::~AssessExposureRequest()
{}
std::string AssessExposureRequest::getImageURL()const
{
return imageURL_;
}
void AssessExposureRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,52 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/AssessExposureResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imageenhan;
using namespace AlibabaCloud::Imageenhan::Model;
AssessExposureResult::AssessExposureResult() :
ServiceResult()
{}
AssessExposureResult::AssessExposureResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AssessExposureResult::~AssessExposureResult()
{}
void AssessExposureResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["Exposure"].isNull())
data_.exposure = std::stof(dataNode["Exposure"].asString());
}
AssessExposureResult::Data AssessExposureResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/AssessSharpnessRequest.h>
using AlibabaCloud::Imageenhan::Model::AssessSharpnessRequest;
AssessSharpnessRequest::AssessSharpnessRequest() :
RpcServiceRequest("imageenhan", "2019-09-30", "AssessSharpness")
{
setMethod(HttpRequest::Method::Post);
}
AssessSharpnessRequest::~AssessSharpnessRequest()
{}
std::string AssessSharpnessRequest::getImageURL()const
{
return imageURL_;
}
void AssessSharpnessRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,52 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/AssessSharpnessResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imageenhan;
using namespace AlibabaCloud::Imageenhan::Model;
AssessSharpnessResult::AssessSharpnessResult() :
ServiceResult()
{}
AssessSharpnessResult::AssessSharpnessResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AssessSharpnessResult::~AssessSharpnessResult()
{}
void AssessSharpnessResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["Sharpness"].isNull())
data_.sharpness = std::stof(dataNode["Sharpness"].asString());
}
AssessSharpnessResult::Data AssessSharpnessResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/ChangeImageSizeRequest.h>
using AlibabaCloud::Imageenhan::Model::ChangeImageSizeRequest;
ChangeImageSizeRequest::ChangeImageSizeRequest() :
RpcServiceRequest("imageenhan", "2019-09-30", "ChangeImageSize")
{
setMethod(HttpRequest::Method::Post);
}
ChangeImageSizeRequest::~ChangeImageSizeRequest()
{}
std::string ChangeImageSizeRequest::getUrl()const
{
return url_;
}
void ChangeImageSizeRequest::setUrl(const std::string& url)
{
url_ = url;
setBodyParameter("Url", url);
}
int ChangeImageSizeRequest::getWidth()const
{
return width_;
}
void ChangeImageSizeRequest::setWidth(int width)
{
width_ = width;
setBodyParameter("Width", std::to_string(width));
}
int ChangeImageSizeRequest::getHeight()const
{
return height_;
}
void ChangeImageSizeRequest::setHeight(int height)
{
height_ = height;
setBodyParameter("Height", std::to_string(height));
}

View File

@@ -0,0 +1,61 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/ChangeImageSizeResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imageenhan;
using namespace AlibabaCloud::Imageenhan::Model;
ChangeImageSizeResult::ChangeImageSizeResult() :
ServiceResult()
{}
ChangeImageSizeResult::ChangeImageSizeResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ChangeImageSizeResult::~ChangeImageSizeResult()
{}
void ChangeImageSizeResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["Url"].isNull())
data_.url = dataNode["Url"].asString();
auto retainLocationNode = dataNode["RetainLocation"];
if(!retainLocationNode["X"].isNull())
data_.retainLocation.x = std::stoi(retainLocationNode["X"].asString());
if(!retainLocationNode["Y"].isNull())
data_.retainLocation.y = std::stoi(retainLocationNode["Y"].asString());
if(!retainLocationNode["Width"].isNull())
data_.retainLocation.width = std::stoi(retainLocationNode["Width"].asString());
if(!retainLocationNode["Height"].isNull())
data_.retainLocation.height = std::stoi(retainLocationNode["Height"].asString());
}
ChangeImageSizeResult::Data ChangeImageSizeResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/EnhanceImageColorRequest.h>
using AlibabaCloud::Imageenhan::Model::EnhanceImageColorRequest;
EnhanceImageColorRequest::EnhanceImageColorRequest() :
RpcServiceRequest("imageenhan", "2019-09-30", "EnhanceImageColor")
{
setMethod(HttpRequest::Method::Post);
}
EnhanceImageColorRequest::~EnhanceImageColorRequest()
{}
std::string EnhanceImageColorRequest::getMode()const
{
return mode_;
}
void EnhanceImageColorRequest::setMode(const std::string& mode)
{
mode_ = mode;
setBodyParameter("Mode", mode);
}
std::string EnhanceImageColorRequest::getImageURL()const
{
return imageURL_;
}
void EnhanceImageColorRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}
std::string EnhanceImageColorRequest::getOutputFormat()const
{
return outputFormat_;
}
void EnhanceImageColorRequest::setOutputFormat(const std::string& outputFormat)
{
outputFormat_ = outputFormat;
setBodyParameter("OutputFormat", outputFormat);
}

View File

@@ -0,0 +1,52 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/EnhanceImageColorResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imageenhan;
using namespace AlibabaCloud::Imageenhan::Model;
EnhanceImageColorResult::EnhanceImageColorResult() :
ServiceResult()
{}
EnhanceImageColorResult::EnhanceImageColorResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
EnhanceImageColorResult::~EnhanceImageColorResult()
{}
void EnhanceImageColorResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["ImageURL"].isNull())
data_.imageURL = dataNode["ImageURL"].asString();
}
EnhanceImageColorResult::Data EnhanceImageColorResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/ExtendImageStyleRequest.h>
using AlibabaCloud::Imageenhan::Model::ExtendImageStyleRequest;
ExtendImageStyleRequest::ExtendImageStyleRequest() :
RpcServiceRequest("imageenhan", "2019-09-30", "ExtendImageStyle")
{
setMethod(HttpRequest::Method::Post);
}
ExtendImageStyleRequest::~ExtendImageStyleRequest()
{}
std::string ExtendImageStyleRequest::getMajorUrl()const
{
return majorUrl_;
}
void ExtendImageStyleRequest::setMajorUrl(const std::string& majorUrl)
{
majorUrl_ = majorUrl;
setBodyParameter("MajorUrl", majorUrl);
}
std::string ExtendImageStyleRequest::getStyleUrl()const
{
return styleUrl_;
}
void ExtendImageStyleRequest::setStyleUrl(const std::string& styleUrl)
{
styleUrl_ = styleUrl;
setBodyParameter("StyleUrl", styleUrl);
}

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/ExtendImageStyleResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imageenhan;
using namespace AlibabaCloud::Imageenhan::Model;
ExtendImageStyleResult::ExtendImageStyleResult() :
ServiceResult()
{}
ExtendImageStyleResult::ExtendImageStyleResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ExtendImageStyleResult::~ExtendImageStyleResult()
{}
void ExtendImageStyleResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["Url"].isNull())
data_.url = dataNode["Url"].asString();
if(!dataNode["MajorUrl"].isNull())
data_.majorUrl = dataNode["MajorUrl"].asString();
}
ExtendImageStyleResult::Data ExtendImageStyleResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/GenerateDynamicImageRequest.h>
using AlibabaCloud::Imageenhan::Model::GenerateDynamicImageRequest;
GenerateDynamicImageRequest::GenerateDynamicImageRequest() :
RpcServiceRequest("imageenhan", "2019-09-30", "GenerateDynamicImage")
{
setMethod(HttpRequest::Method::Post);
}
GenerateDynamicImageRequest::~GenerateDynamicImageRequest()
{}
std::string GenerateDynamicImageRequest::getUrl()const
{
return url_;
}
void GenerateDynamicImageRequest::setUrl(const std::string& url)
{
url_ = url;
setBodyParameter("Url", url);
}
std::string GenerateDynamicImageRequest::getOperation()const
{
return operation_;
}
void GenerateDynamicImageRequest::setOperation(const std::string& operation)
{
operation_ = operation;
setBodyParameter("Operation", operation);
}

View File

@@ -0,0 +1,52 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/GenerateDynamicImageResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imageenhan;
using namespace AlibabaCloud::Imageenhan::Model;
GenerateDynamicImageResult::GenerateDynamicImageResult() :
ServiceResult()
{}
GenerateDynamicImageResult::GenerateDynamicImageResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GenerateDynamicImageResult::~GenerateDynamicImageResult()
{}
void GenerateDynamicImageResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["Url"].isNull())
data_.url = dataNode["Url"].asString();
}
GenerateDynamicImageResult::Data GenerateDynamicImageResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/GetAsyncJobResultRequest.h>
using AlibabaCloud::Imageenhan::Model::GetAsyncJobResultRequest;
GetAsyncJobResultRequest::GetAsyncJobResultRequest() :
RpcServiceRequest("imageenhan", "2019-09-30", "GetAsyncJobResult")
{
setMethod(HttpRequest::Method::Post);
}
GetAsyncJobResultRequest::~GetAsyncJobResultRequest()
{}
bool GetAsyncJobResultRequest::getAsync()const
{
return async_;
}
void GetAsyncJobResultRequest::setAsync(bool async)
{
async_ = async;
setBodyParameter("Async", async ? "true" : "false");
}
std::string GetAsyncJobResultRequest::getJobId()const
{
return jobId_;
}
void GetAsyncJobResultRequest::setJobId(const std::string& jobId)
{
jobId_ = jobId;
setBodyParameter("JobId", jobId);
}

View 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/imageenhan/model/GetAsyncJobResultResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imageenhan;
using namespace AlibabaCloud::Imageenhan::Model;
GetAsyncJobResultResult::GetAsyncJobResultResult() :
ServiceResult()
{}
GetAsyncJobResultResult::GetAsyncJobResultResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetAsyncJobResultResult::~GetAsyncJobResultResult()
{}
void GetAsyncJobResultResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["JobId"].isNull())
data_.jobId = dataNode["JobId"].asString();
if(!dataNode["Status"].isNull())
data_.status = dataNode["Status"].asString();
if(!dataNode["Result"].isNull())
data_.result = dataNode["Result"].asString();
if(!dataNode["ErrorCode"].isNull())
data_.errorCode = dataNode["ErrorCode"].asString();
if(!dataNode["ErrorMessage"].isNull())
data_.errorMessage = dataNode["ErrorMessage"].asString();
}
GetAsyncJobResultResult::Data GetAsyncJobResultResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,95 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/ImageBlindCharacterWatermarkRequest.h>
using AlibabaCloud::Imageenhan::Model::ImageBlindCharacterWatermarkRequest;
ImageBlindCharacterWatermarkRequest::ImageBlindCharacterWatermarkRequest() :
RpcServiceRequest("imageenhan", "2019-09-30", "ImageBlindCharacterWatermark")
{
setMethod(HttpRequest::Method::Post);
}
ImageBlindCharacterWatermarkRequest::~ImageBlindCharacterWatermarkRequest()
{}
std::string ImageBlindCharacterWatermarkRequest::getWatermarkImageURL()const
{
return watermarkImageURL_;
}
void ImageBlindCharacterWatermarkRequest::setWatermarkImageURL(const std::string& watermarkImageURL)
{
watermarkImageURL_ = watermarkImageURL;
setBodyParameter("WatermarkImageURL", watermarkImageURL);
}
int ImageBlindCharacterWatermarkRequest::getQualityFactor()const
{
return qualityFactor_;
}
void ImageBlindCharacterWatermarkRequest::setQualityFactor(int qualityFactor)
{
qualityFactor_ = qualityFactor;
setBodyParameter("QualityFactor", std::to_string(qualityFactor));
}
std::string ImageBlindCharacterWatermarkRequest::getFunctionType()const
{
return functionType_;
}
void ImageBlindCharacterWatermarkRequest::setFunctionType(const std::string& functionType)
{
functionType_ = functionType;
setBodyParameter("FunctionType", functionType);
}
std::string ImageBlindCharacterWatermarkRequest::getOutputFileType()const
{
return outputFileType_;
}
void ImageBlindCharacterWatermarkRequest::setOutputFileType(const std::string& outputFileType)
{
outputFileType_ = outputFileType;
setBodyParameter("OutputFileType", outputFileType);
}
std::string ImageBlindCharacterWatermarkRequest::getOriginImageURL()const
{
return originImageURL_;
}
void ImageBlindCharacterWatermarkRequest::setOriginImageURL(const std::string& originImageURL)
{
originImageURL_ = originImageURL;
setBodyParameter("OriginImageURL", originImageURL);
}
std::string ImageBlindCharacterWatermarkRequest::getText()const
{
return text_;
}
void ImageBlindCharacterWatermarkRequest::setText(const std::string& text)
{
text_ = text;
setBodyParameter("Text", text);
}

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/ImageBlindCharacterWatermarkResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imageenhan;
using namespace AlibabaCloud::Imageenhan::Model;
ImageBlindCharacterWatermarkResult::ImageBlindCharacterWatermarkResult() :
ServiceResult()
{}
ImageBlindCharacterWatermarkResult::ImageBlindCharacterWatermarkResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ImageBlindCharacterWatermarkResult::~ImageBlindCharacterWatermarkResult()
{}
void ImageBlindCharacterWatermarkResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["WatermarkImageURL"].isNull())
data_.watermarkImageURL = dataNode["WatermarkImageURL"].asString();
if(!dataNode["TextImageURL"].isNull())
data_.textImageURL = dataNode["TextImageURL"].asString();
}
ImageBlindCharacterWatermarkResult::Data ImageBlindCharacterWatermarkResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,95 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/ImageBlindPicWatermarkRequest.h>
using AlibabaCloud::Imageenhan::Model::ImageBlindPicWatermarkRequest;
ImageBlindPicWatermarkRequest::ImageBlindPicWatermarkRequest() :
RpcServiceRequest("imageenhan", "2019-09-30", "ImageBlindPicWatermark")
{
setMethod(HttpRequest::Method::Post);
}
ImageBlindPicWatermarkRequest::~ImageBlindPicWatermarkRequest()
{}
std::string ImageBlindPicWatermarkRequest::getWatermarkImageURL()const
{
return watermarkImageURL_;
}
void ImageBlindPicWatermarkRequest::setWatermarkImageURL(const std::string& watermarkImageURL)
{
watermarkImageURL_ = watermarkImageURL;
setBodyParameter("WatermarkImageURL", watermarkImageURL);
}
int ImageBlindPicWatermarkRequest::getQualityFactor()const
{
return qualityFactor_;
}
void ImageBlindPicWatermarkRequest::setQualityFactor(int qualityFactor)
{
qualityFactor_ = qualityFactor;
setBodyParameter("QualityFactor", std::to_string(qualityFactor));
}
std::string ImageBlindPicWatermarkRequest::getFunctionType()const
{
return functionType_;
}
void ImageBlindPicWatermarkRequest::setFunctionType(const std::string& functionType)
{
functionType_ = functionType;
setBodyParameter("FunctionType", functionType);
}
std::string ImageBlindPicWatermarkRequest::getLogoURL()const
{
return logoURL_;
}
void ImageBlindPicWatermarkRequest::setLogoURL(const std::string& logoURL)
{
logoURL_ = logoURL;
setBodyParameter("LogoURL", logoURL);
}
std::string ImageBlindPicWatermarkRequest::getOutputFileType()const
{
return outputFileType_;
}
void ImageBlindPicWatermarkRequest::setOutputFileType(const std::string& outputFileType)
{
outputFileType_ = outputFileType;
setBodyParameter("OutputFileType", outputFileType);
}
std::string ImageBlindPicWatermarkRequest::getOriginImageURL()const
{
return originImageURL_;
}
void ImageBlindPicWatermarkRequest::setOriginImageURL(const std::string& originImageURL)
{
originImageURL_ = originImageURL;
setBodyParameter("OriginImageURL", originImageURL);
}

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/ImageBlindPicWatermarkResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imageenhan;
using namespace AlibabaCloud::Imageenhan::Model;
ImageBlindPicWatermarkResult::ImageBlindPicWatermarkResult() :
ServiceResult()
{}
ImageBlindPicWatermarkResult::ImageBlindPicWatermarkResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ImageBlindPicWatermarkResult::~ImageBlindPicWatermarkResult()
{}
void ImageBlindPicWatermarkResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["WatermarkImageURL"].isNull())
data_.watermarkImageURL = dataNode["WatermarkImageURL"].asString();
if(!dataNode["LogoURL"].isNull())
data_.logoURL = dataNode["LogoURL"].asString();
}
ImageBlindPicWatermarkResult::Data ImageBlindPicWatermarkResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/ImitatePhotoStyleRequest.h>
using AlibabaCloud::Imageenhan::Model::ImitatePhotoStyleRequest;
ImitatePhotoStyleRequest::ImitatePhotoStyleRequest() :
RpcServiceRequest("imageenhan", "2019-09-30", "ImitatePhotoStyle")
{
setMethod(HttpRequest::Method::Post);
}
ImitatePhotoStyleRequest::~ImitatePhotoStyleRequest()
{}
std::string ImitatePhotoStyleRequest::getStyleUrl()const
{
return styleUrl_;
}
void ImitatePhotoStyleRequest::setStyleUrl(const std::string& styleUrl)
{
styleUrl_ = styleUrl;
setBodyParameter("StyleUrl", styleUrl);
}
std::string ImitatePhotoStyleRequest::getImageURL()const
{
return imageURL_;
}
void ImitatePhotoStyleRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,52 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/ImitatePhotoStyleResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imageenhan;
using namespace AlibabaCloud::Imageenhan::Model;
ImitatePhotoStyleResult::ImitatePhotoStyleResult() :
ServiceResult()
{}
ImitatePhotoStyleResult::ImitatePhotoStyleResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ImitatePhotoStyleResult::~ImitatePhotoStyleResult()
{}
void ImitatePhotoStyleResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["ImageURL"].isNull())
data_.imageURL = dataNode["ImageURL"].asString();
}
ImitatePhotoStyleResult::Data ImitatePhotoStyleResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/IntelligentCompositionRequest.h>
using AlibabaCloud::Imageenhan::Model::IntelligentCompositionRequest;
IntelligentCompositionRequest::IntelligentCompositionRequest() :
RpcServiceRequest("imageenhan", "2019-09-30", "IntelligentComposition")
{
setMethod(HttpRequest::Method::Post);
}
IntelligentCompositionRequest::~IntelligentCompositionRequest()
{}
int IntelligentCompositionRequest::getNumBoxes()const
{
return numBoxes_;
}
void IntelligentCompositionRequest::setNumBoxes(int numBoxes)
{
numBoxes_ = numBoxes;
setBodyParameter("NumBoxes", std::to_string(numBoxes));
}
std::string IntelligentCompositionRequest::getImageURL()const
{
return imageURL_;
}
void IntelligentCompositionRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,66 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/IntelligentCompositionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imageenhan;
using namespace AlibabaCloud::Imageenhan::Model;
IntelligentCompositionResult::IntelligentCompositionResult() :
ServiceResult()
{}
IntelligentCompositionResult::IntelligentCompositionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
IntelligentCompositionResult::~IntelligentCompositionResult()
{}
void IntelligentCompositionResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allElementsNode = dataNode["Elements"]["Element"];
for (auto dataNodeElementsElement : allElementsNode)
{
Data::Element elementObject;
if(!dataNodeElementsElement["MinX"].isNull())
elementObject.minX = std::stoi(dataNodeElementsElement["MinX"].asString());
if(!dataNodeElementsElement["MinY"].isNull())
elementObject.minY = std::stoi(dataNodeElementsElement["MinY"].asString());
if(!dataNodeElementsElement["MaxX"].isNull())
elementObject.maxX = std::stoi(dataNodeElementsElement["MaxX"].asString());
if(!dataNodeElementsElement["MaxY"].isNull())
elementObject.maxY = std::stoi(dataNodeElementsElement["MaxY"].asString());
if(!dataNodeElementsElement["Score"].isNull())
elementObject.score = std::stof(dataNodeElementsElement["Score"].asString());
data_.elements.push_back(elementObject);
}
}
IntelligentCompositionResult::Data IntelligentCompositionResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/MakeSuperResolutionImageRequest.h>
using AlibabaCloud::Imageenhan::Model::MakeSuperResolutionImageRequest;
MakeSuperResolutionImageRequest::MakeSuperResolutionImageRequest() :
RpcServiceRequest("imageenhan", "2019-09-30", "MakeSuperResolutionImage")
{
setMethod(HttpRequest::Method::Post);
}
MakeSuperResolutionImageRequest::~MakeSuperResolutionImageRequest()
{}
std::string MakeSuperResolutionImageRequest::getUrl()const
{
return url_;
}
void MakeSuperResolutionImageRequest::setUrl(const std::string& url)
{
url_ = url;
setBodyParameter("Url", url);
}

View File

@@ -0,0 +1,52 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/MakeSuperResolutionImageResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imageenhan;
using namespace AlibabaCloud::Imageenhan::Model;
MakeSuperResolutionImageResult::MakeSuperResolutionImageResult() :
ServiceResult()
{}
MakeSuperResolutionImageResult::MakeSuperResolutionImageResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MakeSuperResolutionImageResult::~MakeSuperResolutionImageResult()
{}
void MakeSuperResolutionImageResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["Url"].isNull())
data_.url = dataNode["Url"].asString();
}
MakeSuperResolutionImageResult::Data MakeSuperResolutionImageResult::getData()const
{
return data_;
}

View 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.
*/
#include <alibabacloud/imageenhan/model/RecolorHDImageRequest.h>
using AlibabaCloud::Imageenhan::Model::RecolorHDImageRequest;
RecolorHDImageRequest::RecolorHDImageRequest() :
RpcServiceRequest("imageenhan", "2019-09-30", "RecolorHDImage")
{
setMethod(HttpRequest::Method::Post);
}
RecolorHDImageRequest::~RecolorHDImageRequest()
{}
std::vector<RecolorHDImageRequest::ColorTemplate> RecolorHDImageRequest::getColorTemplate()const
{
return colorTemplate_;
}
void RecolorHDImageRequest::setColorTemplate(const std::vector<ColorTemplate>& colorTemplate)
{
colorTemplate_ = colorTemplate;
for(int dep1 = 0; dep1!= colorTemplate.size(); dep1++) {
auto colorTemplateObj = colorTemplate.at(dep1);
std::string colorTemplateObjStr = "ColorTemplate." + std::to_string(dep1 + 1);
setParameter(colorTemplateObjStr + ".Color", colorTemplateObj.color);
}
}
std::string RecolorHDImageRequest::getDegree()const
{
return degree_;
}
void RecolorHDImageRequest::setDegree(const std::string& degree)
{
degree_ = degree;
setBodyParameter("Degree", degree);
}
std::string RecolorHDImageRequest::getUrl()const
{
return url_;
}
void RecolorHDImageRequest::setUrl(const std::string& url)
{
url_ = url;
setBodyParameter("Url", url);
}
std::string RecolorHDImageRequest::getMode()const
{
return mode_;
}
void RecolorHDImageRequest::setMode(const std::string& mode)
{
mode_ = mode;
setBodyParameter("Mode", mode);
}
bool RecolorHDImageRequest::getAsync()const
{
return async_;
}
void RecolorHDImageRequest::setAsync(bool async)
{
async_ = async;
setBodyParameter("Async", async ? "true" : "false");
}
int RecolorHDImageRequest::getColorCount()const
{
return colorCount_;
}
void RecolorHDImageRequest::setColorCount(int colorCount)
{
colorCount_ = colorCount;
setBodyParameter("ColorCount", std::to_string(colorCount));
}
std::string RecolorHDImageRequest::getRefUrl()const
{
return refUrl_;
}
void RecolorHDImageRequest::setRefUrl(const std::string& refUrl)
{
refUrl_ = refUrl;
setBodyParameter("RefUrl", refUrl);
}

View 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/imageenhan/model/RecolorHDImageResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imageenhan;
using namespace AlibabaCloud::Imageenhan::Model;
RecolorHDImageResult::RecolorHDImageResult() :
ServiceResult()
{}
RecolorHDImageResult::RecolorHDImageResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RecolorHDImageResult::~RecolorHDImageResult()
{}
void RecolorHDImageResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allImageList = dataNode["ImageList"]["ImageList"];
for (auto value : allImageList)
data_.imageList.push_back(value.asString());
}
RecolorHDImageResult::Data RecolorHDImageResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,88 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/RecolorImageRequest.h>
using AlibabaCloud::Imageenhan::Model::RecolorImageRequest;
RecolorImageRequest::RecolorImageRequest() :
RpcServiceRequest("imageenhan", "2019-09-30", "RecolorImage")
{
setMethod(HttpRequest::Method::Post);
}
RecolorImageRequest::~RecolorImageRequest()
{}
std::vector<RecolorImageRequest::ColorTemplate> RecolorImageRequest::getColorTemplate()const
{
return colorTemplate_;
}
void RecolorImageRequest::setColorTemplate(const std::vector<ColorTemplate>& colorTemplate)
{
colorTemplate_ = colorTemplate;
for(int dep1 = 0; dep1!= colorTemplate.size(); dep1++) {
auto colorTemplateObj = colorTemplate.at(dep1);
std::string colorTemplateObjStr = "ColorTemplate." + std::to_string(dep1 + 1);
setParameter(colorTemplateObjStr + ".Color", colorTemplateObj.color);
}
}
std::string RecolorImageRequest::getUrl()const
{
return url_;
}
void RecolorImageRequest::setUrl(const std::string& url)
{
url_ = url;
setBodyParameter("Url", url);
}
std::string RecolorImageRequest::getMode()const
{
return mode_;
}
void RecolorImageRequest::setMode(const std::string& mode)
{
mode_ = mode;
setBodyParameter("Mode", mode);
}
int RecolorImageRequest::getColorCount()const
{
return colorCount_;
}
void RecolorImageRequest::setColorCount(int colorCount)
{
colorCount_ = colorCount;
setBodyParameter("ColorCount", std::to_string(colorCount));
}
std::string RecolorImageRequest::getRefUrl()const
{
return refUrl_;
}
void RecolorImageRequest::setRefUrl(const std::string& refUrl)
{
refUrl_ = refUrl;
setBodyParameter("RefUrl", refUrl);
}

View 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/imageenhan/model/RecolorImageResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imageenhan;
using namespace AlibabaCloud::Imageenhan::Model;
RecolorImageResult::RecolorImageResult() :
ServiceResult()
{}
RecolorImageResult::RecolorImageResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RecolorImageResult::~RecolorImageResult()
{}
void RecolorImageResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allImageList = dataNode["ImageList"]["ImageList"];
for (auto value : allImageList)
data_.imageList.push_back(value.asString());
}
RecolorImageResult::Data RecolorImageResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,84 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/RemoveImageSubtitlesRequest.h>
using AlibabaCloud::Imageenhan::Model::RemoveImageSubtitlesRequest;
RemoveImageSubtitlesRequest::RemoveImageSubtitlesRequest() :
RpcServiceRequest("imageenhan", "2019-09-30", "RemoveImageSubtitles")
{
setMethod(HttpRequest::Method::Post);
}
RemoveImageSubtitlesRequest::~RemoveImageSubtitlesRequest()
{}
float RemoveImageSubtitlesRequest::getBH()const
{
return bH_;
}
void RemoveImageSubtitlesRequest::setBH(float bH)
{
bH_ = bH;
setBodyParameter("BH", std::to_string(bH));
}
float RemoveImageSubtitlesRequest::getBW()const
{
return bW_;
}
void RemoveImageSubtitlesRequest::setBW(float bW)
{
bW_ = bW;
setBodyParameter("BW", std::to_string(bW));
}
float RemoveImageSubtitlesRequest::getBX()const
{
return bX_;
}
void RemoveImageSubtitlesRequest::setBX(float bX)
{
bX_ = bX;
setBodyParameter("BX", std::to_string(bX));
}
std::string RemoveImageSubtitlesRequest::getImageURL()const
{
return imageURL_;
}
void RemoveImageSubtitlesRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}
float RemoveImageSubtitlesRequest::getBY()const
{
return bY_;
}
void RemoveImageSubtitlesRequest::setBY(float bY)
{
bY_ = bY;
setBodyParameter("BY", std::to_string(bY));
}

View File

@@ -0,0 +1,52 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/RemoveImageSubtitlesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imageenhan;
using namespace AlibabaCloud::Imageenhan::Model;
RemoveImageSubtitlesResult::RemoveImageSubtitlesResult() :
ServiceResult()
{}
RemoveImageSubtitlesResult::RemoveImageSubtitlesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RemoveImageSubtitlesResult::~RemoveImageSubtitlesResult()
{}
void RemoveImageSubtitlesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["ImageURL"].isNull())
data_.imageURL = dataNode["ImageURL"].asString();
}
RemoveImageSubtitlesResult::Data RemoveImageSubtitlesResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/RemoveImageWatermarkRequest.h>
using AlibabaCloud::Imageenhan::Model::RemoveImageWatermarkRequest;
RemoveImageWatermarkRequest::RemoveImageWatermarkRequest() :
RpcServiceRequest("imageenhan", "2019-09-30", "RemoveImageWatermark")
{
setMethod(HttpRequest::Method::Post);
}
RemoveImageWatermarkRequest::~RemoveImageWatermarkRequest()
{}
std::string RemoveImageWatermarkRequest::getImageURL()const
{
return imageURL_;
}
void RemoveImageWatermarkRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,52 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/imageenhan/model/RemoveImageWatermarkResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imageenhan;
using namespace AlibabaCloud::Imageenhan::Model;
RemoveImageWatermarkResult::RemoveImageWatermarkResult() :
ServiceResult()
{}
RemoveImageWatermarkResult::RemoveImageWatermarkResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RemoveImageWatermarkResult::~RemoveImageWatermarkResult()
{}
void RemoveImageWatermarkResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["ImageURL"].isNull())
data_.imageURL = dataNode["ImageURL"].asString();
}
RemoveImageWatermarkResult::Data RemoveImageWatermarkResult::getData()const
{
return data_;
}