diff --git a/CHANGELOG b/CHANGELOG index 0576de4c4..3f7cf83b8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2022-03-03 Version: 1.36.1069 +- Release RecognizeVideoCastCrewList. + 2022-02-24 Version: 1.36.1068 - Add UpdateAnycastEipAddressAssociations Interface. diff --git a/VERSION b/VERSION index 2a0502ad3..f67707f39 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1068 \ No newline at end of file +1.36.1069 \ No newline at end of file diff --git a/ocr/CMakeLists.txt b/ocr/CMakeLists.txt index f0a34eb49..04019c870 100644 --- a/ocr/CMakeLists.txt +++ b/ocr/CMakeLists.txt @@ -73,6 +73,8 @@ set(ocr_public_header_model include/alibabacloud/ocr/model/RecognizeVINCodeResult.h include/alibabacloud/ocr/model/RecognizeVerificationcodeRequest.h include/alibabacloud/ocr/model/RecognizeVerificationcodeResult.h + include/alibabacloud/ocr/model/RecognizeVideoCastCrewListRequest.h + include/alibabacloud/ocr/model/RecognizeVideoCastCrewListResult.h include/alibabacloud/ocr/model/RecognizeVideoCharacterRequest.h include/alibabacloud/ocr/model/RecognizeVideoCharacterResult.h include/alibabacloud/ocr/model/TrimDocumentRequest.h @@ -132,6 +134,8 @@ set(ocr_src src/model/RecognizeVINCodeResult.cc src/model/RecognizeVerificationcodeRequest.cc src/model/RecognizeVerificationcodeResult.cc + src/model/RecognizeVideoCastCrewListRequest.cc + src/model/RecognizeVideoCastCrewListResult.cc src/model/RecognizeVideoCharacterRequest.cc src/model/RecognizeVideoCharacterResult.cc src/model/TrimDocumentRequest.cc diff --git a/ocr/include/alibabacloud/ocr/OcrClient.h b/ocr/include/alibabacloud/ocr/OcrClient.h index b153eb4cd..9dc5dba6e 100644 --- a/ocr/include/alibabacloud/ocr/OcrClient.h +++ b/ocr/include/alibabacloud/ocr/OcrClient.h @@ -74,6 +74,8 @@ #include "model/RecognizeVINCodeResult.h" #include "model/RecognizeVerificationcodeRequest.h" #include "model/RecognizeVerificationcodeResult.h" +#include "model/RecognizeVideoCastCrewListRequest.h" +#include "model/RecognizeVideoCastCrewListResult.h" #include "model/RecognizeVideoCharacterRequest.h" #include "model/RecognizeVideoCharacterResult.h" #include "model/TrimDocumentRequest.h" @@ -165,6 +167,9 @@ namespace AlibabaCloud typedef Outcome RecognizeVerificationcodeOutcome; typedef std::future RecognizeVerificationcodeOutcomeCallable; typedef std::function&)> RecognizeVerificationcodeAsyncHandler; + typedef Outcome RecognizeVideoCastCrewListOutcome; + typedef std::future RecognizeVideoCastCrewListOutcomeCallable; + typedef std::function&)> RecognizeVideoCastCrewListAsyncHandler; typedef Outcome RecognizeVideoCharacterOutcome; typedef std::future RecognizeVideoCharacterOutcomeCallable; typedef std::function&)> RecognizeVideoCharacterAsyncHandler; @@ -254,6 +259,9 @@ namespace AlibabaCloud RecognizeVerificationcodeOutcome recognizeVerificationcode(const Model::RecognizeVerificationcodeRequest &request)const; void recognizeVerificationcodeAsync(const Model::RecognizeVerificationcodeRequest& request, const RecognizeVerificationcodeAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; RecognizeVerificationcodeOutcomeCallable recognizeVerificationcodeCallable(const Model::RecognizeVerificationcodeRequest& request) const; + RecognizeVideoCastCrewListOutcome recognizeVideoCastCrewList(const Model::RecognizeVideoCastCrewListRequest &request)const; + void recognizeVideoCastCrewListAsync(const Model::RecognizeVideoCastCrewListRequest& request, const RecognizeVideoCastCrewListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + RecognizeVideoCastCrewListOutcomeCallable recognizeVideoCastCrewListCallable(const Model::RecognizeVideoCastCrewListRequest& request) const; RecognizeVideoCharacterOutcome recognizeVideoCharacter(const Model::RecognizeVideoCharacterRequest &request)const; void recognizeVideoCharacterAsync(const Model::RecognizeVideoCharacterRequest& request, const RecognizeVideoCharacterAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; RecognizeVideoCharacterOutcomeCallable recognizeVideoCharacterCallable(const Model::RecognizeVideoCharacterRequest& request) const; diff --git a/ocr/include/alibabacloud/ocr/model/RecognizeQrCodeRequest.h b/ocr/include/alibabacloud/ocr/model/RecognizeQrCodeRequest.h index a00cd4894..c2962769c 100644 --- a/ocr/include/alibabacloud/ocr/model/RecognizeQrCodeRequest.h +++ b/ocr/include/alibabacloud/ocr/model/RecognizeQrCodeRequest.h @@ -40,11 +40,20 @@ namespace AlibabaCloud RecognizeQrCodeRequest(); ~RecognizeQrCodeRequest(); + bool getFormatResultToJson()const; + void setFormatResultToJson(bool formatResultToJson); + std::string getOssFile()const; + void setOssFile(const std::string& ossFile); std::vector getTasks()const; void setTasks(const std::vector& tasks); + std::string getRequestProxyBy()const; + void setRequestProxyBy(const std::string& requestProxyBy); private: + bool formatResultToJson_; + std::string ossFile_; std::vector tasks_; + std::string requestProxyBy_; }; } diff --git a/ocr/include/alibabacloud/ocr/model/RecognizeVideoCastCrewListRequest.h b/ocr/include/alibabacloud/ocr/model/RecognizeVideoCastCrewListRequest.h new file mode 100644 index 000000000..0c647c17b --- /dev/null +++ b/ocr/include/alibabacloud/ocr/model/RecognizeVideoCastCrewListRequest.h @@ -0,0 +1,57 @@ +/* + * 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_OCR_MODEL_RECOGNIZEVIDEOCASTCREWLISTREQUEST_H_ +#define ALIBABACLOUD_OCR_MODEL_RECOGNIZEVIDEOCASTCREWLISTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ocr + { + namespace Model + { + class ALIBABACLOUD_OCR_EXPORT RecognizeVideoCastCrewListRequest : public RpcServiceRequest + { + + public: + RecognizeVideoCastCrewListRequest(); + ~RecognizeVideoCastCrewListRequest(); + + Array getParams()const; + void setParams(const Array& params); + bool getAsync()const; + void setAsync(bool async); + std::string getRegisterUrl()const; + void setRegisterUrl(const std::string& registerUrl); + std::string getVideoUrl()const; + void setVideoUrl(const std::string& videoUrl); + + private: + Array params_; + bool async_; + std::string registerUrl_; + std::string videoUrl_; + + }; + } + } +} +#endif // !ALIBABACLOUD_OCR_MODEL_RECOGNIZEVIDEOCASTCREWLISTREQUEST_H_ \ No newline at end of file diff --git a/ocr/include/alibabacloud/ocr/model/RecognizeVideoCastCrewListResult.h b/ocr/include/alibabacloud/ocr/model/RecognizeVideoCastCrewListResult.h new file mode 100644 index 000000000..01992edeb --- /dev/null +++ b/ocr/include/alibabacloud/ocr/model/RecognizeVideoCastCrewListResult.h @@ -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. + */ + +#ifndef ALIBABACLOUD_OCR_MODEL_RECOGNIZEVIDEOCASTCREWLISTRESULT_H_ +#define ALIBABACLOUD_OCR_MODEL_RECOGNIZEVIDEOCASTCREWLISTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ocr + { + namespace Model + { + class ALIBABACLOUD_OCR_EXPORT RecognizeVideoCastCrewListResult : public ServiceResult + { + public: + + + RecognizeVideoCastCrewListResult(); + explicit RecognizeVideoCastCrewListResult(const std::string &payload); + ~RecognizeVideoCastCrewListResult(); + + protected: + void parse(const std::string &payload); + private: + + }; + } + } +} +#endif // !ALIBABACLOUD_OCR_MODEL_RECOGNIZEVIDEOCASTCREWLISTRESULT_H_ \ No newline at end of file diff --git a/ocr/include/alibabacloud/ocr/model/RecognizeVideoCharacterRequest.h b/ocr/include/alibabacloud/ocr/model/RecognizeVideoCharacterRequest.h index 08ae1bf6a..52c9d776c 100644 --- a/ocr/include/alibabacloud/ocr/model/RecognizeVideoCharacterRequest.h +++ b/ocr/include/alibabacloud/ocr/model/RecognizeVideoCharacterRequest.h @@ -35,21 +35,12 @@ namespace AlibabaCloud RecognizeVideoCharacterRequest(); ~RecognizeVideoCharacterRequest(); - bool getFormatResultToJson()const; - void setFormatResultToJson(bool formatResultToJson); - std::string getOssFile()const; - void setOssFile(const std::string& ossFile); - std::string getRequestProxyBy()const; - void setRequestProxyBy(const std::string& requestProxyBy); bool getAsync()const; void setAsync(bool async); std::string getVideoURL()const; void setVideoURL(const std::string& videoURL); private: - bool formatResultToJson_; - std::string ossFile_; - std::string requestProxyBy_; bool async_; std::string videoURL_; diff --git a/ocr/include/alibabacloud/ocr/model/RecognizeVideoCharacterResult.h b/ocr/include/alibabacloud/ocr/model/RecognizeVideoCharacterResult.h index e4b71939e..1919f4b12 100644 --- a/ocr/include/alibabacloud/ocr/model/RecognizeVideoCharacterResult.h +++ b/ocr/include/alibabacloud/ocr/model/RecognizeVideoCharacterResult.h @@ -56,6 +56,7 @@ namespace AlibabaCloud std::vector frames; long height; long width; + std::string inputFile; }; diff --git a/ocr/src/OcrClient.cc b/ocr/src/OcrClient.cc index c663b9def..19b659c13 100644 --- a/ocr/src/OcrClient.cc +++ b/ocr/src/OcrClient.cc @@ -987,6 +987,42 @@ OcrClient::RecognizeVerificationcodeOutcomeCallable OcrClient::recognizeVerifica return task->get_future(); } +OcrClient::RecognizeVideoCastCrewListOutcome OcrClient::recognizeVideoCastCrewList(const RecognizeVideoCastCrewListRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return RecognizeVideoCastCrewListOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return RecognizeVideoCastCrewListOutcome(RecognizeVideoCastCrewListResult(outcome.result())); + else + return RecognizeVideoCastCrewListOutcome(outcome.error()); +} + +void OcrClient::recognizeVideoCastCrewListAsync(const RecognizeVideoCastCrewListRequest& request, const RecognizeVideoCastCrewListAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, recognizeVideoCastCrewList(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +OcrClient::RecognizeVideoCastCrewListOutcomeCallable OcrClient::recognizeVideoCastCrewListCallable(const RecognizeVideoCastCrewListRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->recognizeVideoCastCrewList(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + OcrClient::RecognizeVideoCharacterOutcome OcrClient::recognizeVideoCharacter(const RecognizeVideoCharacterRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/ocr/src/model/RecognizeQrCodeRequest.cc b/ocr/src/model/RecognizeQrCodeRequest.cc index 96c0ffb9c..b975ad346 100644 --- a/ocr/src/model/RecognizeQrCodeRequest.cc +++ b/ocr/src/model/RecognizeQrCodeRequest.cc @@ -27,6 +27,28 @@ RecognizeQrCodeRequest::RecognizeQrCodeRequest() : RecognizeQrCodeRequest::~RecognizeQrCodeRequest() {} +bool RecognizeQrCodeRequest::getFormatResultToJson()const +{ + return formatResultToJson_; +} + +void RecognizeQrCodeRequest::setFormatResultToJson(bool formatResultToJson) +{ + formatResultToJson_ = formatResultToJson; + setParameter("FormatResultToJson", formatResultToJson ? "true" : "false"); +} + +std::string RecognizeQrCodeRequest::getOssFile()const +{ + return ossFile_; +} + +void RecognizeQrCodeRequest::setOssFile(const std::string& ossFile) +{ + ossFile_ = ossFile; + setParameter("OssFile", ossFile); +} + std::vector RecognizeQrCodeRequest::getTasks()const { return tasks_; @@ -42,3 +64,14 @@ void RecognizeQrCodeRequest::setTasks(const std::vector& tasks) } } +std::string RecognizeQrCodeRequest::getRequestProxyBy()const +{ + return requestProxyBy_; +} + +void RecognizeQrCodeRequest::setRequestProxyBy(const std::string& requestProxyBy) +{ + requestProxyBy_ = requestProxyBy; + setParameter("RequestProxyBy", requestProxyBy); +} + diff --git a/ocr/src/model/RecognizeVideoCastCrewListRequest.cc b/ocr/src/model/RecognizeVideoCastCrewListRequest.cc new file mode 100644 index 000000000..801ce021e --- /dev/null +++ b/ocr/src/model/RecognizeVideoCastCrewListRequest.cc @@ -0,0 +1,73 @@ +/* + * 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 + +using AlibabaCloud::Ocr::Model::RecognizeVideoCastCrewListRequest; + +RecognizeVideoCastCrewListRequest::RecognizeVideoCastCrewListRequest() : + RpcServiceRequest("ocr", "2019-12-30", "RecognizeVideoCastCrewList") +{ + setMethod(HttpRequest::Method::Post); +} + +RecognizeVideoCastCrewListRequest::~RecognizeVideoCastCrewListRequest() +{} + +Array RecognizeVideoCastCrewListRequest::getParams()const +{ + return params_; +} + +void RecognizeVideoCastCrewListRequest::setParams(const Array& params) +{ + params_ = params; + setBodyParameter("Params", std::to_string(params)); +} + +bool RecognizeVideoCastCrewListRequest::getAsync()const +{ + return async_; +} + +void RecognizeVideoCastCrewListRequest::setAsync(bool async) +{ + async_ = async; + setBodyParameter("Async", async ? "true" : "false"); +} + +std::string RecognizeVideoCastCrewListRequest::getRegisterUrl()const +{ + return registerUrl_; +} + +void RecognizeVideoCastCrewListRequest::setRegisterUrl(const std::string& registerUrl) +{ + registerUrl_ = registerUrl; + setBodyParameter("RegisterUrl", registerUrl); +} + +std::string RecognizeVideoCastCrewListRequest::getVideoUrl()const +{ + return videoUrl_; +} + +void RecognizeVideoCastCrewListRequest::setVideoUrl(const std::string& videoUrl) +{ + videoUrl_ = videoUrl; + setBodyParameter("VideoUrl", videoUrl); +} + diff --git a/ocr/src/model/RecognizeVideoCastCrewListResult.cc b/ocr/src/model/RecognizeVideoCastCrewListResult.cc new file mode 100644 index 000000000..b274db9bf --- /dev/null +++ b/ocr/src/model/RecognizeVideoCastCrewListResult.cc @@ -0,0 +1,44 @@ +/* + * 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 +#include + +using namespace AlibabaCloud::Ocr; +using namespace AlibabaCloud::Ocr::Model; + +RecognizeVideoCastCrewListResult::RecognizeVideoCastCrewListResult() : + ServiceResult() +{} + +RecognizeVideoCastCrewListResult::RecognizeVideoCastCrewListResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +RecognizeVideoCastCrewListResult::~RecognizeVideoCastCrewListResult() +{} + +void RecognizeVideoCastCrewListResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + +} + diff --git a/ocr/src/model/RecognizeVideoCharacterRequest.cc b/ocr/src/model/RecognizeVideoCharacterRequest.cc index d3d9a906d..959ac6267 100644 --- a/ocr/src/model/RecognizeVideoCharacterRequest.cc +++ b/ocr/src/model/RecognizeVideoCharacterRequest.cc @@ -27,39 +27,6 @@ RecognizeVideoCharacterRequest::RecognizeVideoCharacterRequest() : RecognizeVideoCharacterRequest::~RecognizeVideoCharacterRequest() {} -bool RecognizeVideoCharacterRequest::getFormatResultToJson()const -{ - return formatResultToJson_; -} - -void RecognizeVideoCharacterRequest::setFormatResultToJson(bool formatResultToJson) -{ - formatResultToJson_ = formatResultToJson; - setParameter("FormatResultToJson", formatResultToJson ? "true" : "false"); -} - -std::string RecognizeVideoCharacterRequest::getOssFile()const -{ - return ossFile_; -} - -void RecognizeVideoCharacterRequest::setOssFile(const std::string& ossFile) -{ - ossFile_ = ossFile; - setParameter("OssFile", ossFile); -} - -std::string RecognizeVideoCharacterRequest::getRequestProxyBy()const -{ - return requestProxyBy_; -} - -void RecognizeVideoCharacterRequest::setRequestProxyBy(const std::string& requestProxyBy) -{ - requestProxyBy_ = requestProxyBy; - setParameter("RequestProxyBy", requestProxyBy); -} - bool RecognizeVideoCharacterRequest::getAsync()const { return async_; diff --git a/ocr/src/model/RecognizeVideoCharacterResult.cc b/ocr/src/model/RecognizeVideoCharacterResult.cc index 295f0c670..410b00be8 100644 --- a/ocr/src/model/RecognizeVideoCharacterResult.cc +++ b/ocr/src/model/RecognizeVideoCharacterResult.cc @@ -44,6 +44,8 @@ void RecognizeVideoCharacterResult::parse(const std::string &payload) data_.width = std::stol(dataNode["Width"].asString()); if(!dataNode["Height"].isNull()) data_.height = std::stol(dataNode["Height"].asString()); + if(!dataNode["InputFile"].isNull()) + data_.inputFile = dataNode["InputFile"].asString(); auto allFramesNode = dataNode["Frames"]["Frame"]; for (auto dataNodeFramesFrame : allFramesNode) {