diff --git a/CHANGELOG b/CHANGELOG index 4bbc176c2..d0d670385 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2021-06-21 Version: 1.36.795 +- Public V430. + 2021-06-21 Version: 1.36.794 - Generated 2019-11-20 for `Ga`. diff --git a/VERSION b/VERSION index 1d53cfd1d..5c8511bf5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.794 \ No newline at end of file +1.36.795 \ No newline at end of file diff --git a/rsimganalys/CMakeLists.txt b/rsimganalys/CMakeLists.txt index 1f1de888f..1f909481d 100644 --- a/rsimganalys/CMakeLists.txt +++ b/rsimganalys/CMakeLists.txt @@ -21,10 +21,6 @@ set(rsimganalys_public_header include/alibabacloud/rsimganalys/RsimganalysExport.h ) set(rsimganalys_public_header_model - include/alibabacloud/rsimganalys/model/AccessAppkeyRequest.h - include/alibabacloud/rsimganalys/model/AccessAppkeyResult.h - include/alibabacloud/rsimganalys/model/AccessTokenRequest.h - include/alibabacloud/rsimganalys/model/AccessTokenResult.h include/alibabacloud/rsimganalys/model/CreateImageRequest.h include/alibabacloud/rsimganalys/model/CreateImageResult.h include/alibabacloud/rsimganalys/model/CreateTaskRequest.h @@ -44,10 +40,6 @@ set(rsimganalys_public_header_model set(rsimganalys_src src/RsimganalysClient.cc - src/model/AccessAppkeyRequest.cc - src/model/AccessAppkeyResult.cc - src/model/AccessTokenRequest.cc - src/model/AccessTokenResult.cc src/model/CreateImageRequest.cc src/model/CreateImageResult.cc src/model/CreateTaskRequest.cc diff --git a/rsimganalys/include/alibabacloud/rsimganalys/RsimganalysClient.h b/rsimganalys/include/alibabacloud/rsimganalys/RsimganalysClient.h index 1b0f1aedf..13b16f7d2 100644 --- a/rsimganalys/include/alibabacloud/rsimganalys/RsimganalysClient.h +++ b/rsimganalys/include/alibabacloud/rsimganalys/RsimganalysClient.h @@ -22,10 +22,6 @@ #include #include #include "RsimganalysExport.h" -#include "model/AccessAppkeyRequest.h" -#include "model/AccessAppkeyResult.h" -#include "model/AccessTokenRequest.h" -#include "model/AccessTokenResult.h" #include "model/CreateImageRequest.h" #include "model/CreateImageResult.h" #include "model/CreateTaskRequest.h" @@ -51,12 +47,6 @@ namespace AlibabaCloud class ALIBABACLOUD_RSIMGANALYS_EXPORT RsimganalysClient : public RpcServiceClient { public: - typedef Outcome AccessAppkeyOutcome; - typedef std::future AccessAppkeyOutcomeCallable; - typedef std::function&)> AccessAppkeyAsyncHandler; - typedef Outcome AccessTokenOutcome; - typedef std::future AccessTokenOutcomeCallable; - typedef std::function&)> AccessTokenAsyncHandler; typedef Outcome CreateImageOutcome; typedef std::future CreateImageOutcomeCallable; typedef std::function&)> CreateImageAsyncHandler; @@ -86,12 +76,6 @@ namespace AlibabaCloud RsimganalysClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); RsimganalysClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); ~RsimganalysClient(); - AccessAppkeyOutcome accessAppkey(const Model::AccessAppkeyRequest &request)const; - void accessAppkeyAsync(const Model::AccessAppkeyRequest& request, const AccessAppkeyAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; - AccessAppkeyOutcomeCallable accessAppkeyCallable(const Model::AccessAppkeyRequest& request) const; - AccessTokenOutcome accessToken(const Model::AccessTokenRequest &request)const; - void accessTokenAsync(const Model::AccessTokenRequest& request, const AccessTokenAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; - AccessTokenOutcomeCallable accessTokenCallable(const Model::AccessTokenRequest& request) const; CreateImageOutcome createImage(const Model::CreateImageRequest &request)const; void createImageAsync(const Model::CreateImageRequest& request, const CreateImageAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateImageOutcomeCallable createImageCallable(const Model::CreateImageRequest& request) const; diff --git a/rsimganalys/include/alibabacloud/rsimganalys/model/AccessAppkeyRequest.h b/rsimganalys/include/alibabacloud/rsimganalys/model/AccessAppkeyRequest.h deleted file mode 100644 index aaab79c25..000000000 --- a/rsimganalys/include/alibabacloud/rsimganalys/model/AccessAppkeyRequest.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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_RSIMGANALYS_MODEL_ACCESSAPPKEYREQUEST_H_ -#define ALIBABACLOUD_RSIMGANALYS_MODEL_ACCESSAPPKEYREQUEST_H_ - -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Rsimganalys - { - namespace Model - { - class ALIBABACLOUD_RSIMGANALYS_EXPORT AccessAppkeyRequest : public RpcServiceRequest - { - - public: - AccessAppkeyRequest(); - ~AccessAppkeyRequest(); - - - private: - - }; - } - } -} -#endif // !ALIBABACLOUD_RSIMGANALYS_MODEL_ACCESSAPPKEYREQUEST_H_ \ No newline at end of file diff --git a/rsimganalys/include/alibabacloud/rsimganalys/model/AccessAppkeyResult.h b/rsimganalys/include/alibabacloud/rsimganalys/model/AccessAppkeyResult.h deleted file mode 100644 index 10b885fd0..000000000 --- a/rsimganalys/include/alibabacloud/rsimganalys/model/AccessAppkeyResult.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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_RSIMGANALYS_MODEL_ACCESSAPPKEYRESULT_H_ -#define ALIBABACLOUD_RSIMGANALYS_MODEL_ACCESSAPPKEYRESULT_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Rsimganalys - { - namespace Model - { - class ALIBABACLOUD_RSIMGANALYS_EXPORT AccessAppkeyResult : public ServiceResult - { - public: - - - AccessAppkeyResult(); - explicit AccessAppkeyResult(const std::string &payload); - ~AccessAppkeyResult(); - std::string getData()const; - - protected: - void parse(const std::string &payload); - private: - std::string data_; - - }; - } - } -} -#endif // !ALIBABACLOUD_RSIMGANALYS_MODEL_ACCESSAPPKEYRESULT_H_ \ No newline at end of file diff --git a/rsimganalys/include/alibabacloud/rsimganalys/model/AccessTokenRequest.h b/rsimganalys/include/alibabacloud/rsimganalys/model/AccessTokenRequest.h deleted file mode 100644 index a0f7e3f0a..000000000 --- a/rsimganalys/include/alibabacloud/rsimganalys/model/AccessTokenRequest.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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_RSIMGANALYS_MODEL_ACCESSTOKENREQUEST_H_ -#define ALIBABACLOUD_RSIMGANALYS_MODEL_ACCESSTOKENREQUEST_H_ - -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Rsimganalys - { - namespace Model - { - class ALIBABACLOUD_RSIMGANALYS_EXPORT AccessTokenRequest : public RpcServiceRequest - { - - public: - AccessTokenRequest(); - ~AccessTokenRequest(); - - - private: - - }; - } - } -} -#endif // !ALIBABACLOUD_RSIMGANALYS_MODEL_ACCESSTOKENREQUEST_H_ \ No newline at end of file diff --git a/rsimganalys/include/alibabacloud/rsimganalys/model/AccessTokenResult.h b/rsimganalys/include/alibabacloud/rsimganalys/model/AccessTokenResult.h deleted file mode 100644 index 95f56b50f..000000000 --- a/rsimganalys/include/alibabacloud/rsimganalys/model/AccessTokenResult.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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_RSIMGANALYS_MODEL_ACCESSTOKENRESULT_H_ -#define ALIBABACLOUD_RSIMGANALYS_MODEL_ACCESSTOKENRESULT_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Rsimganalys - { - namespace Model - { - class ALIBABACLOUD_RSIMGANALYS_EXPORT AccessTokenResult : public ServiceResult - { - public: - - - AccessTokenResult(); - explicit AccessTokenResult(const std::string &payload); - ~AccessTokenResult(); - std::string getData()const; - - protected: - void parse(const std::string &payload); - private: - std::string data_; - - }; - } - } -} -#endif // !ALIBABACLOUD_RSIMGANALYS_MODEL_ACCESSTOKENRESULT_H_ \ No newline at end of file diff --git a/rsimganalys/include/alibabacloud/rsimganalys/model/CreateImageResult.h b/rsimganalys/include/alibabacloud/rsimganalys/model/CreateImageResult.h index 06a16d4c0..f0ad3539a 100644 --- a/rsimganalys/include/alibabacloud/rsimganalys/model/CreateImageResult.h +++ b/rsimganalys/include/alibabacloud/rsimganalys/model/CreateImageResult.h @@ -32,22 +32,6 @@ namespace AlibabaCloud class ALIBABACLOUD_RSIMGANALYS_EXPORT CreateImageResult : public ServiceResult { public: - struct Data - { - std::string description; - std::string gmtModified; - int runStatus; - std::string downloadPath; - long fileTime; - std::string statusCode; - std::string statusMessage; - std::string imageName; - std::string gmtCreate; - std::string aliyunPK; - int imageId; - std::string jobId; - std::string urlUploadPath; - }; CreateImageResult(); @@ -55,7 +39,7 @@ namespace AlibabaCloud ~CreateImageResult(); std::string getUserResolution()const; std::string getImageId()const; - Data getData()const; + std::vector getItems()const; std::string getResultMessage()const; int getResultCode()const; int getPublishStatus()const; @@ -65,7 +49,7 @@ namespace AlibabaCloud private: std::string userResolution_; std::string imageId_; - Data data_; + std::vector items_; std::string resultMessage_; int resultCode_; int publishStatus_; diff --git a/rsimganalys/include/alibabacloud/rsimganalys/model/CreateTaskRequest.h b/rsimganalys/include/alibabacloud/rsimganalys/model/CreateTaskRequest.h index e75e59cb0..2a3fd97ca 100644 --- a/rsimganalys/include/alibabacloud/rsimganalys/model/CreateTaskRequest.h +++ b/rsimganalys/include/alibabacloud/rsimganalys/model/CreateTaskRequest.h @@ -53,6 +53,8 @@ namespace AlibabaCloud void setAppkey(const std::string& appkey); std::string getDstImageId()const; void setDstImageId(const std::string& dstImageId); + std::string getJobName()const; + void setJobName(const std::string& jobName); private: float confidence_; @@ -64,6 +66,7 @@ namespace AlibabaCloud std::string srcImageId_; std::string appkey_; std::string dstImageId_; + std::string jobName_; }; } diff --git a/rsimganalys/include/alibabacloud/rsimganalys/model/DeleteTaskRequest.h b/rsimganalys/include/alibabacloud/rsimganalys/model/DeleteTaskRequest.h index 28991c499..49e1f3b1a 100644 --- a/rsimganalys/include/alibabacloud/rsimganalys/model/DeleteTaskRequest.h +++ b/rsimganalys/include/alibabacloud/rsimganalys/model/DeleteTaskRequest.h @@ -37,12 +37,9 @@ namespace AlibabaCloud std::string getJobId()const; void setJobId(const std::string& jobId); - std::string getAppkey()const; - void setAppkey(const std::string& appkey); private: std::string jobId_; - std::string appkey_; }; } diff --git a/rsimganalys/include/alibabacloud/rsimganalys/model/GetImageResult.h b/rsimganalys/include/alibabacloud/rsimganalys/model/GetImageResult.h index 7e8bd2d14..3dfbb41ee 100644 --- a/rsimganalys/include/alibabacloud/rsimganalys/model/GetImageResult.h +++ b/rsimganalys/include/alibabacloud/rsimganalys/model/GetImageResult.h @@ -42,6 +42,7 @@ namespace AlibabaCloud std::string appkey; int runStatus; long fileTime; + std::string publicResult; std::string pixelSize; std::string resolution; int publishStatus; @@ -51,7 +52,6 @@ namespace AlibabaCloud GetImageResult(); explicit GetImageResult(const std::string &payload); ~GetImageResult(); - std::string getDownloadPath()const; Data getData()const; std::string getResultMessage()const; std::string getResultCode()const; @@ -59,7 +59,6 @@ namespace AlibabaCloud protected: void parse(const std::string &payload); private: - std::string downloadPath_; Data data_; std::string resultMessage_; std::string resultCode_; diff --git a/rsimganalys/include/alibabacloud/rsimganalys/model/ListTasksRequest.h b/rsimganalys/include/alibabacloud/rsimganalys/model/ListTasksRequest.h index 19f8f874d..fd9d35d58 100644 --- a/rsimganalys/include/alibabacloud/rsimganalys/model/ListTasksRequest.h +++ b/rsimganalys/include/alibabacloud/rsimganalys/model/ListTasksRequest.h @@ -35,11 +35,29 @@ namespace AlibabaCloud ListTasksRequest(); ~ListTasksRequest(); + std::string getSubmitTime()const; + void setSubmitTime(const std::string& submitTime); + int getRunStatus()const; + void setRunStatus(int runStatus); + int getProductType()const; + void setProductType(int productType); + int getPageNo()const; + void setPageNo(int pageNo); + int getPageSize()const; + void setPageSize(int pageSize); std::string getAppkey()const; void setAppkey(const std::string& appkey); + std::string getJobName()const; + void setJobName(const std::string& jobName); private: + std::string submitTime_; + int runStatus_; + int productType_; + int pageNo_; + int pageSize_; std::string appkey_; + std::string jobName_; }; } diff --git a/rsimganalys/include/alibabacloud/rsimganalys/model/ListTasksResult.h b/rsimganalys/include/alibabacloud/rsimganalys/model/ListTasksResult.h index 0a3506c61..30b380bb2 100644 --- a/rsimganalys/include/alibabacloud/rsimganalys/model/ListTasksResult.h +++ b/rsimganalys/include/alibabacloud/rsimganalys/model/ListTasksResult.h @@ -32,43 +32,48 @@ namespace AlibabaCloud class ALIBABACLOUD_RSIMGANALYS_EXPORT ListTasksResult : public ServiceResult { public: - struct Contents + struct Data { - std::string status; - int progress; - long createTime; - std::string request; - std::string _namespace; - int statusCode; - std::string statusMessage; - std::string response; - std::string version; - long lastUpdateTime; - std::string userId; - std::string appkey; - int enableZoneIdentification; - std::string jobId; - int publishStatus; + struct Contents + { + std::string status; + int progress; + long createTime; + std::string request; + std::string jobName; + std::string _namespace; + int statusCode; + std::string statusMessage; + std::string response; + std::string jobType; + long lastUpdateTime; + std::string version; + std::string userId; + std::string appkey; + std::string jobMessage; + int enableZoneIdentification; + std::string jobId; + int publishStatus; + }; + int pages; + int pageSize; + std::vector content; + int total; + int pageNo; }; ListTasksResult(); explicit ListTasksResult(const std::string &payload); ~ListTasksResult(); - int getTotalCount()const; - int getPageSize()const; - int getPageNumber()const; - std::vector getData()const; + Data getData()const; std::string getResultMessage()const; int getResultCode()const; protected: void parse(const std::string &payload); private: - int totalCount_; - int pageSize_; - int pageNumber_; - std::vector data_; + Data data_; std::string resultMessage_; int resultCode_; diff --git a/rsimganalys/src/RsimganalysClient.cc b/rsimganalys/src/RsimganalysClient.cc index c0e289545..c618fbdd3 100644 --- a/rsimganalys/src/RsimganalysClient.cc +++ b/rsimganalys/src/RsimganalysClient.cc @@ -31,98 +31,26 @@ RsimganalysClient::RsimganalysClient(const Credentials &credentials, const Clien RpcServiceClient(SERVICE_NAME, std::make_shared(credentials), configuration) { auto locationClient = std::make_shared(credentials, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "rsimganalys"); } RsimganalysClient::RsimganalysClient(const std::shared_ptr& credentialsProvider, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) { auto locationClient = std::make_shared(credentialsProvider, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "rsimganalys"); } RsimganalysClient::RsimganalysClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, std::make_shared(accessKeyId, accessKeySecret), configuration) { auto locationClient = std::make_shared(accessKeyId, accessKeySecret, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "rsimganalys"); } RsimganalysClient::~RsimganalysClient() {} -RsimganalysClient::AccessAppkeyOutcome RsimganalysClient::accessAppkey(const AccessAppkeyRequest &request) const -{ - auto endpointOutcome = endpointProvider_->getEndpoint(); - if (!endpointOutcome.isSuccess()) - return AccessAppkeyOutcome(endpointOutcome.error()); - - auto outcome = makeRequest(endpointOutcome.result(), request); - - if (outcome.isSuccess()) - return AccessAppkeyOutcome(AccessAppkeyResult(outcome.result())); - else - return AccessAppkeyOutcome(outcome.error()); -} - -void RsimganalysClient::accessAppkeyAsync(const AccessAppkeyRequest& request, const AccessAppkeyAsyncHandler& handler, const std::shared_ptr& context) const -{ - auto fn = [this, request, handler, context]() - { - handler(this, request, accessAppkey(request), context); - }; - - asyncExecute(new Runnable(fn)); -} - -RsimganalysClient::AccessAppkeyOutcomeCallable RsimganalysClient::accessAppkeyCallable(const AccessAppkeyRequest &request) const -{ - auto task = std::make_shared>( - [this, request]() - { - return this->accessAppkey(request); - }); - - asyncExecute(new Runnable([task]() { (*task)(); })); - return task->get_future(); -} - -RsimganalysClient::AccessTokenOutcome RsimganalysClient::accessToken(const AccessTokenRequest &request) const -{ - auto endpointOutcome = endpointProvider_->getEndpoint(); - if (!endpointOutcome.isSuccess()) - return AccessTokenOutcome(endpointOutcome.error()); - - auto outcome = makeRequest(endpointOutcome.result(), request); - - if (outcome.isSuccess()) - return AccessTokenOutcome(AccessTokenResult(outcome.result())); - else - return AccessTokenOutcome(outcome.error()); -} - -void RsimganalysClient::accessTokenAsync(const AccessTokenRequest& request, const AccessTokenAsyncHandler& handler, const std::shared_ptr& context) const -{ - auto fn = [this, request, handler, context]() - { - handler(this, request, accessToken(request), context); - }; - - asyncExecute(new Runnable(fn)); -} - -RsimganalysClient::AccessTokenOutcomeCallable RsimganalysClient::accessTokenCallable(const AccessTokenRequest &request) const -{ - auto task = std::make_shared>( - [this, request]() - { - return this->accessToken(request); - }); - - asyncExecute(new Runnable([task]() { (*task)(); })); - return task->get_future(); -} - RsimganalysClient::CreateImageOutcome RsimganalysClient::createImage(const CreateImageRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/rsimganalys/src/model/AccessAppkeyRequest.cc b/rsimganalys/src/model/AccessAppkeyRequest.cc deleted file mode 100644 index ac51ab0ad..000000000 --- a/rsimganalys/src/model/AccessAppkeyRequest.cc +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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::Rsimganalys::Model::AccessAppkeyRequest; - -AccessAppkeyRequest::AccessAppkeyRequest() : - RpcServiceRequest("rsimganalys", "2019-08-01", "AccessAppkey") -{ - setMethod(HttpRequest::Method::Post); -} - -AccessAppkeyRequest::~AccessAppkeyRequest() -{} - diff --git a/rsimganalys/src/model/AccessAppkeyResult.cc b/rsimganalys/src/model/AccessAppkeyResult.cc deleted file mode 100644 index c22d83ce9..000000000 --- a/rsimganalys/src/model/AccessAppkeyResult.cc +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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::Rsimganalys; -using namespace AlibabaCloud::Rsimganalys::Model; - -AccessAppkeyResult::AccessAppkeyResult() : - ServiceResult() -{} - -AccessAppkeyResult::AccessAppkeyResult(const std::string &payload) : - ServiceResult() -{ - parse(payload); -} - -AccessAppkeyResult::~AccessAppkeyResult() -{} - -void AccessAppkeyResult::parse(const std::string &payload) -{ - Json::Reader reader; - Json::Value value; - reader.parse(payload, value); - setRequestId(value["RequestId"].asString()); - if(!value["Data"].isNull()) - data_ = value["Data"].asString(); - -} - -std::string AccessAppkeyResult::getData()const -{ - return data_; -} - diff --git a/rsimganalys/src/model/AccessTokenRequest.cc b/rsimganalys/src/model/AccessTokenRequest.cc deleted file mode 100644 index e2af27623..000000000 --- a/rsimganalys/src/model/AccessTokenRequest.cc +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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::Rsimganalys::Model::AccessTokenRequest; - -AccessTokenRequest::AccessTokenRequest() : - RpcServiceRequest("rsimganalys", "2019-08-01", "AccessToken") -{ - setMethod(HttpRequest::Method::Post); -} - -AccessTokenRequest::~AccessTokenRequest() -{} - diff --git a/rsimganalys/src/model/AccessTokenResult.cc b/rsimganalys/src/model/AccessTokenResult.cc deleted file mode 100644 index ac72090e8..000000000 --- a/rsimganalys/src/model/AccessTokenResult.cc +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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::Rsimganalys; -using namespace AlibabaCloud::Rsimganalys::Model; - -AccessTokenResult::AccessTokenResult() : - ServiceResult() -{} - -AccessTokenResult::AccessTokenResult(const std::string &payload) : - ServiceResult() -{ - parse(payload); -} - -AccessTokenResult::~AccessTokenResult() -{} - -void AccessTokenResult::parse(const std::string &payload) -{ - Json::Reader reader; - Json::Value value; - reader.parse(payload, value); - setRequestId(value["RequestId"].asString()); - if(!value["Data"].isNull()) - data_ = value["Data"].asString(); - -} - -std::string AccessTokenResult::getData()const -{ - return data_; -} - diff --git a/rsimganalys/src/model/CreateImageResult.cc b/rsimganalys/src/model/CreateImageResult.cc index 5c13c5c1a..256f99fe2 100644 --- a/rsimganalys/src/model/CreateImageResult.cc +++ b/rsimganalys/src/model/CreateImageResult.cc @@ -39,39 +39,15 @@ void CreateImageResult::parse(const std::string &payload) Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); - auto dataNode = value["Data"]; - if(!dataNode["AliyunPK"].isNull()) - data_.aliyunPK = dataNode["AliyunPK"].asString(); - if(!dataNode["Description"].isNull()) - data_.description = dataNode["Description"].asString(); - if(!dataNode["DownloadPath"].isNull()) - data_.downloadPath = dataNode["DownloadPath"].asString(); - if(!dataNode["GmtCreate"].isNull()) - data_.gmtCreate = dataNode["GmtCreate"].asString(); - if(!dataNode["GmtModified"].isNull()) - data_.gmtModified = dataNode["GmtModified"].asString(); - if(!dataNode["ImageId"].isNull()) - data_.imageId = std::stoi(dataNode["ImageId"].asString()); - if(!dataNode["JobId"].isNull()) - data_.jobId = dataNode["JobId"].asString(); - if(!dataNode["ImageName"].isNull()) - data_.imageName = dataNode["ImageName"].asString(); - if(!dataNode["RunStatus"].isNull()) - data_.runStatus = std::stoi(dataNode["RunStatus"].asString()); - if(!dataNode["UrlUploadPath"].isNull()) - data_.urlUploadPath = dataNode["UrlUploadPath"].asString(); - if(!dataNode["FileTime"].isNull()) - data_.fileTime = std::stol(dataNode["FileTime"].asString()); - if(!dataNode["StatusCode"].isNull()) - data_.statusCode = dataNode["StatusCode"].asString(); - if(!dataNode["StatusMessage"].isNull()) - data_.statusMessage = dataNode["StatusMessage"].asString(); + auto allItems = value["Items"]["Contents"]; + for (const auto &item : allItems) + items_.push_back(item.asString()); if(!value["ResultCode"].isNull()) resultCode_ = std::stoi(value["ResultCode"].asString()); - if(!value["ImageId"].isNull()) - imageId_ = value["ImageId"].asString(); if(!value["ResultMessage"].isNull()) resultMessage_ = value["ResultMessage"].asString(); + if(!value["ImageId"].isNull()) + imageId_ = value["ImageId"].asString(); if(!value["UserResolution"].isNull()) userResolution_ = value["UserResolution"].asString(); if(!value["PublishStatus"].isNull()) @@ -89,9 +65,9 @@ std::string CreateImageResult::getImageId()const return imageId_; } -CreateImageResult::Data CreateImageResult::getData()const +std::vector CreateImageResult::getItems()const { - return data_; + return items_; } std::string CreateImageResult::getResultMessage()const diff --git a/rsimganalys/src/model/CreateTaskRequest.cc b/rsimganalys/src/model/CreateTaskRequest.cc index a4757c199..14627a572 100644 --- a/rsimganalys/src/model/CreateTaskRequest.cc +++ b/rsimganalys/src/model/CreateTaskRequest.cc @@ -126,3 +126,14 @@ void CreateTaskRequest::setDstImageId(const std::string& dstImageId) setParameter("DstImageId", dstImageId); } +std::string CreateTaskRequest::getJobName()const +{ + return jobName_; +} + +void CreateTaskRequest::setJobName(const std::string& jobName) +{ + jobName_ = jobName; + setParameter("JobName", jobName); +} + diff --git a/rsimganalys/src/model/DeleteTaskRequest.cc b/rsimganalys/src/model/DeleteTaskRequest.cc index b66e3feb4..d9fe75d4d 100644 --- a/rsimganalys/src/model/DeleteTaskRequest.cc +++ b/rsimganalys/src/model/DeleteTaskRequest.cc @@ -38,14 +38,3 @@ void DeleteTaskRequest::setJobId(const std::string& jobId) setParameter("JobId", jobId); } -std::string DeleteTaskRequest::getAppkey()const -{ - return appkey_; -} - -void DeleteTaskRequest::setAppkey(const std::string& appkey) -{ - appkey_ = appkey; - setParameter("Appkey", appkey); -} - diff --git a/rsimganalys/src/model/GetImageResult.cc b/rsimganalys/src/model/GetImageResult.cc index 1cec96fae..aa1542a68 100644 --- a/rsimganalys/src/model/GetImageResult.cc +++ b/rsimganalys/src/model/GetImageResult.cc @@ -62,20 +62,15 @@ void GetImageResult::parse(const std::string &payload) data_.pixelSize = dataNode["PixelSize"].asString(); if(!dataNode["PublishStatus"].isNull()) data_.publishStatus = std::stoi(dataNode["PublishStatus"].asString()); + if(!dataNode["PublicResult"].isNull()) + data_.publicResult = dataNode["PublicResult"].asString(); if(!value["ResultCode"].isNull()) resultCode_ = value["ResultCode"].asString(); if(!value["ResultMessage"].isNull()) resultMessage_ = value["ResultMessage"].asString(); - if(!value["DownloadPath"].isNull()) - downloadPath_ = value["DownloadPath"].asString(); } -std::string GetImageResult::getDownloadPath()const -{ - return downloadPath_; -} - GetImageResult::Data GetImageResult::getData()const { return data_; diff --git a/rsimganalys/src/model/ListTasksRequest.cc b/rsimganalys/src/model/ListTasksRequest.cc index eb4008e0e..c96a88b34 100644 --- a/rsimganalys/src/model/ListTasksRequest.cc +++ b/rsimganalys/src/model/ListTasksRequest.cc @@ -27,6 +27,61 @@ ListTasksRequest::ListTasksRequest() : ListTasksRequest::~ListTasksRequest() {} +std::string ListTasksRequest::getSubmitTime()const +{ + return submitTime_; +} + +void ListTasksRequest::setSubmitTime(const std::string& submitTime) +{ + submitTime_ = submitTime; + setParameter("SubmitTime", submitTime); +} + +int ListTasksRequest::getRunStatus()const +{ + return runStatus_; +} + +void ListTasksRequest::setRunStatus(int runStatus) +{ + runStatus_ = runStatus; + setParameter("RunStatus", std::to_string(runStatus)); +} + +int ListTasksRequest::getProductType()const +{ + return productType_; +} + +void ListTasksRequest::setProductType(int productType) +{ + productType_ = productType; + setParameter("ProductType", std::to_string(productType)); +} + +int ListTasksRequest::getPageNo()const +{ + return pageNo_; +} + +void ListTasksRequest::setPageNo(int pageNo) +{ + pageNo_ = pageNo; + setParameter("PageNo", std::to_string(pageNo)); +} + +int ListTasksRequest::getPageSize()const +{ + return pageSize_; +} + +void ListTasksRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setParameter("PageSize", std::to_string(pageSize)); +} + std::string ListTasksRequest::getAppkey()const { return appkey_; @@ -38,3 +93,14 @@ void ListTasksRequest::setAppkey(const std::string& appkey) setParameter("Appkey", appkey); } +std::string ListTasksRequest::getJobName()const +{ + return jobName_; +} + +void ListTasksRequest::setJobName(const std::string& jobName) +{ + jobName_ = jobName; + setParameter("JobName", jobName); +} + diff --git a/rsimganalys/src/model/ListTasksResult.cc b/rsimganalys/src/model/ListTasksResult.cc index 1593e87b2..a5d5098a8 100644 --- a/rsimganalys/src/model/ListTasksResult.cc +++ b/rsimganalys/src/model/ListTasksResult.cc @@ -39,71 +39,65 @@ void ListTasksResult::parse(const std::string &payload) Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); - auto allDataNode = value["Data"]["Contents"]; - for (auto valueDataContents : allDataNode) + auto dataNode = value["Data"]; + if(!dataNode["PageNo"].isNull()) + data_.pageNo = std::stoi(dataNode["PageNo"].asString()); + if(!dataNode["PageSize"].isNull()) + data_.pageSize = std::stoi(dataNode["PageSize"].asString()); + if(!dataNode["Total"].isNull()) + data_.total = std::stoi(dataNode["Total"].asString()); + if(!dataNode["Pages"].isNull()) + data_.pages = std::stoi(dataNode["Pages"].asString()); + auto allContentNode = dataNode["Content"]["Contents"]; + for (auto dataNodeContentContents : allContentNode) { - Contents dataObject; - if(!valueDataContents["Appkey"].isNull()) - dataObject.appkey = valueDataContents["Appkey"].asString(); - if(!valueDataContents["UserId"].isNull()) - dataObject.userId = valueDataContents["UserId"].asString(); - if(!valueDataContents["JobId"].isNull()) - dataObject.jobId = valueDataContents["JobId"].asString(); - if(!valueDataContents["Status"].isNull()) - dataObject.status = valueDataContents["Status"].asString(); - if(!valueDataContents["Request"].isNull()) - dataObject.request = valueDataContents["Request"].asString(); - if(!valueDataContents["Progress"].isNull()) - dataObject.progress = std::stoi(valueDataContents["Progress"].asString()); - if(!valueDataContents["Namespace"].isNull()) - dataObject._namespace = valueDataContents["Namespace"].asString(); - if(!valueDataContents["Version"].isNull()) - dataObject.version = valueDataContents["Version"].asString(); - if(!valueDataContents["CreateTime"].isNull()) - dataObject.createTime = std::stol(valueDataContents["CreateTime"].asString()); - if(!valueDataContents["LastUpdateTime"].isNull()) - dataObject.lastUpdateTime = std::stol(valueDataContents["LastUpdateTime"].asString()); - if(!valueDataContents["Response"].isNull()) - dataObject.response = valueDataContents["Response"].asString(); - if(!valueDataContents["StatusMessage"].isNull()) - dataObject.statusMessage = valueDataContents["StatusMessage"].asString(); - if(!valueDataContents["StatusCode"].isNull()) - dataObject.statusCode = std::stoi(valueDataContents["StatusCode"].asString()); - if(!valueDataContents["EnableZoneIdentification"].isNull()) - dataObject.enableZoneIdentification = std::stoi(valueDataContents["EnableZoneIdentification"].asString()); - if(!valueDataContents["PublishStatus"].isNull()) - dataObject.publishStatus = std::stoi(valueDataContents["PublishStatus"].asString()); - data_.push_back(dataObject); + Data::Contents contentsObject; + if(!dataNodeContentContents["Appkey"].isNull()) + contentsObject.appkey = dataNodeContentContents["Appkey"].asString(); + if(!dataNodeContentContents["CreateTime"].isNull()) + contentsObject.createTime = std::stol(dataNodeContentContents["CreateTime"].asString()); + if(!dataNodeContentContents["EnableZoneIdentification"].isNull()) + contentsObject.enableZoneIdentification = std::stoi(dataNodeContentContents["EnableZoneIdentification"].asString()); + if(!dataNodeContentContents["JobId"].isNull()) + contentsObject.jobId = dataNodeContentContents["JobId"].asString(); + if(!dataNodeContentContents["LastUpdateTime"].isNull()) + contentsObject.lastUpdateTime = std::stol(dataNodeContentContents["LastUpdateTime"].asString()); + if(!dataNodeContentContents["Namespace"].isNull()) + contentsObject._namespace = dataNodeContentContents["Namespace"].asString(); + if(!dataNodeContentContents["Progress"].isNull()) + contentsObject.progress = std::stoi(dataNodeContentContents["Progress"].asString()); + if(!dataNodeContentContents["PublishStatus"].isNull()) + contentsObject.publishStatus = std::stoi(dataNodeContentContents["PublishStatus"].asString()); + if(!dataNodeContentContents["Request"].isNull()) + contentsObject.request = dataNodeContentContents["Request"].asString(); + if(!dataNodeContentContents["Response"].isNull()) + contentsObject.response = dataNodeContentContents["Response"].asString(); + if(!dataNodeContentContents["Status"].isNull()) + contentsObject.status = dataNodeContentContents["Status"].asString(); + if(!dataNodeContentContents["StatusCode"].isNull()) + contentsObject.statusCode = std::stoi(dataNodeContentContents["StatusCode"].asString()); + if(!dataNodeContentContents["StatusMessage"].isNull()) + contentsObject.statusMessage = dataNodeContentContents["StatusMessage"].asString(); + if(!dataNodeContentContents["UserId"].isNull()) + contentsObject.userId = dataNodeContentContents["UserId"].asString(); + if(!dataNodeContentContents["Version"].isNull()) + contentsObject.version = dataNodeContentContents["Version"].asString(); + if(!dataNodeContentContents["JobType"].isNull()) + contentsObject.jobType = dataNodeContentContents["JobType"].asString(); + if(!dataNodeContentContents["JobMessage"].isNull()) + contentsObject.jobMessage = dataNodeContentContents["JobMessage"].asString(); + if(!dataNodeContentContents["JobName"].isNull()) + contentsObject.jobName = dataNodeContentContents["JobName"].asString(); + data_.content.push_back(contentsObject); } if(!value["ResultCode"].isNull()) resultCode_ = std::stoi(value["ResultCode"].asString()); - if(!value["TotalCount"].isNull()) - totalCount_ = std::stoi(value["TotalCount"].asString()); - if(!value["PageNumber"].isNull()) - pageNumber_ = std::stoi(value["PageNumber"].asString()); - if(!value["PageSize"].isNull()) - pageSize_ = std::stoi(value["PageSize"].asString()); if(!value["ResultMessage"].isNull()) resultMessage_ = value["ResultMessage"].asString(); } -int ListTasksResult::getTotalCount()const -{ - return totalCount_; -} - -int ListTasksResult::getPageSize()const -{ - return pageSize_; -} - -int ListTasksResult::getPageNumber()const -{ - return pageNumber_; -} - -std::vector ListTasksResult::getData()const +ListTasksResult::Data ListTasksResult::getData()const { return data_; }