From d4daecde16541ed433e105fdbc1cb6ea92dbd460 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 28 Mar 2023 11:49:16 +0000 Subject: [PATCH] Supported getUserUploadSign for user. --- VERSION | 2 +- alinlp/CMakeLists.txt | 8 ++ .../alibabacloud/alinlp/AlinlpClient.h | 16 ++++ .../alinlp/model/GetUserUploadSignRequest.h | 42 ++++++++++ .../alinlp/model/GetUserUploadSignResult.h | 51 ++++++++++++ .../alinlp/model/InsertCustomRequest.h | 57 +++++++++++++ .../alinlp/model/InsertCustomResult.h | 51 ++++++++++++ alinlp/src/AlinlpClient.cc | 78 +++++++++++++++++- alinlp/src/model/GetUserUploadSignRequest.cc | 36 +++++++++ alinlp/src/model/GetUserUploadSignResult.cc | 51 ++++++++++++ alinlp/src/model/InsertCustomRequest.cc | 81 +++++++++++++++++++ alinlp/src/model/InsertCustomResult.cc | 51 ++++++++++++ 12 files changed, 520 insertions(+), 4 deletions(-) create mode 100644 alinlp/include/alibabacloud/alinlp/model/GetUserUploadSignRequest.h create mode 100644 alinlp/include/alibabacloud/alinlp/model/GetUserUploadSignResult.h create mode 100644 alinlp/include/alibabacloud/alinlp/model/InsertCustomRequest.h create mode 100644 alinlp/include/alibabacloud/alinlp/model/InsertCustomResult.h create mode 100644 alinlp/src/model/GetUserUploadSignRequest.cc create mode 100644 alinlp/src/model/GetUserUploadSignResult.cc create mode 100644 alinlp/src/model/InsertCustomRequest.cc create mode 100644 alinlp/src/model/InsertCustomResult.cc diff --git a/VERSION b/VERSION index 78287694c..8623fd252 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1516 \ No newline at end of file +1.36.1517 \ No newline at end of file diff --git a/alinlp/CMakeLists.txt b/alinlp/CMakeLists.txt index ace928a76..82a2dee95 100644 --- a/alinlp/CMakeLists.txt +++ b/alinlp/CMakeLists.txt @@ -87,6 +87,8 @@ set(alinlp_public_header_model include/alibabacloud/alinlp/model/GetTcChGeneralResult.h include/alibabacloud/alinlp/model/GetTsChEcomRequest.h include/alibabacloud/alinlp/model/GetTsChEcomResult.h + include/alibabacloud/alinlp/model/GetUserUploadSignRequest.h + include/alibabacloud/alinlp/model/GetUserUploadSignResult.h include/alibabacloud/alinlp/model/GetWeChCommentRequest.h include/alibabacloud/alinlp/model/GetWeChCommentResult.h include/alibabacloud/alinlp/model/GetWeChEcomRequest.h @@ -115,6 +117,8 @@ set(alinlp_public_header_model include/alibabacloud/alinlp/model/GetWsCustomizedSeaEcomResult.h include/alibabacloud/alinlp/model/GetWsCustomizedSeaGeneralRequest.h include/alibabacloud/alinlp/model/GetWsCustomizedSeaGeneralResult.h + include/alibabacloud/alinlp/model/InsertCustomRequest.h + include/alibabacloud/alinlp/model/InsertCustomResult.h include/alibabacloud/alinlp/model/OpenAlinlpServiceRequest.h include/alibabacloud/alinlp/model/OpenAlinlpServiceResult.h include/alibabacloud/alinlp/model/RequestTableQARequest.h @@ -190,6 +194,8 @@ set(alinlp_src src/model/GetTcChGeneralResult.cc src/model/GetTsChEcomRequest.cc src/model/GetTsChEcomResult.cc + src/model/GetUserUploadSignRequest.cc + src/model/GetUserUploadSignResult.cc src/model/GetWeChCommentRequest.cc src/model/GetWeChCommentResult.cc src/model/GetWeChEcomRequest.cc @@ -218,6 +224,8 @@ set(alinlp_src src/model/GetWsCustomizedSeaEcomResult.cc src/model/GetWsCustomizedSeaGeneralRequest.cc src/model/GetWsCustomizedSeaGeneralResult.cc + src/model/InsertCustomRequest.cc + src/model/InsertCustomResult.cc src/model/OpenAlinlpServiceRequest.cc src/model/OpenAlinlpServiceResult.cc src/model/RequestTableQARequest.cc diff --git a/alinlp/include/alibabacloud/alinlp/AlinlpClient.h b/alinlp/include/alibabacloud/alinlp/AlinlpClient.h index 54a850982..b6bb6af51 100644 --- a/alinlp/include/alibabacloud/alinlp/AlinlpClient.h +++ b/alinlp/include/alibabacloud/alinlp/AlinlpClient.h @@ -88,6 +88,8 @@ #include "model/GetTcChGeneralResult.h" #include "model/GetTsChEcomRequest.h" #include "model/GetTsChEcomResult.h" +#include "model/GetUserUploadSignRequest.h" +#include "model/GetUserUploadSignResult.h" #include "model/GetWeChCommentRequest.h" #include "model/GetWeChCommentResult.h" #include "model/GetWeChEcomRequest.h" @@ -116,6 +118,8 @@ #include "model/GetWsCustomizedSeaEcomResult.h" #include "model/GetWsCustomizedSeaGeneralRequest.h" #include "model/GetWsCustomizedSeaGeneralResult.h" +#include "model/InsertCustomRequest.h" +#include "model/InsertCustomResult.h" #include "model/OpenAlinlpServiceRequest.h" #include "model/OpenAlinlpServiceResult.h" #include "model/RequestTableQARequest.h" @@ -230,6 +234,9 @@ namespace AlibabaCloud typedef Outcome GetTsChEcomOutcome; typedef std::future GetTsChEcomOutcomeCallable; typedef std::function&)> GetTsChEcomAsyncHandler; + typedef Outcome GetUserUploadSignOutcome; + typedef std::future GetUserUploadSignOutcomeCallable; + typedef std::function&)> GetUserUploadSignAsyncHandler; typedef Outcome GetWeChCommentOutcome; typedef std::future GetWeChCommentOutcomeCallable; typedef std::function&)> GetWeChCommentAsyncHandler; @@ -272,6 +279,9 @@ namespace AlibabaCloud typedef Outcome GetWsCustomizedSeaGeneralOutcome; typedef std::future GetWsCustomizedSeaGeneralOutcomeCallable; typedef std::function&)> GetWsCustomizedSeaGeneralAsyncHandler; + typedef Outcome InsertCustomOutcome; + typedef std::future InsertCustomOutcomeCallable; + typedef std::function&)> InsertCustomAsyncHandler; typedef Outcome OpenAlinlpServiceOutcome; typedef std::future OpenAlinlpServiceOutcomeCallable; typedef std::function&)> OpenAlinlpServiceAsyncHandler; @@ -385,6 +395,9 @@ namespace AlibabaCloud GetTsChEcomOutcome getTsChEcom(const Model::GetTsChEcomRequest &request)const; void getTsChEcomAsync(const Model::GetTsChEcomRequest& request, const GetTsChEcomAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetTsChEcomOutcomeCallable getTsChEcomCallable(const Model::GetTsChEcomRequest& request) const; + GetUserUploadSignOutcome getUserUploadSign(const Model::GetUserUploadSignRequest &request)const; + void getUserUploadSignAsync(const Model::GetUserUploadSignRequest& request, const GetUserUploadSignAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetUserUploadSignOutcomeCallable getUserUploadSignCallable(const Model::GetUserUploadSignRequest& request) const; GetWeChCommentOutcome getWeChComment(const Model::GetWeChCommentRequest &request)const; void getWeChCommentAsync(const Model::GetWeChCommentRequest& request, const GetWeChCommentAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetWeChCommentOutcomeCallable getWeChCommentCallable(const Model::GetWeChCommentRequest& request) const; @@ -427,6 +440,9 @@ namespace AlibabaCloud GetWsCustomizedSeaGeneralOutcome getWsCustomizedSeaGeneral(const Model::GetWsCustomizedSeaGeneralRequest &request)const; void getWsCustomizedSeaGeneralAsync(const Model::GetWsCustomizedSeaGeneralRequest& request, const GetWsCustomizedSeaGeneralAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetWsCustomizedSeaGeneralOutcomeCallable getWsCustomizedSeaGeneralCallable(const Model::GetWsCustomizedSeaGeneralRequest& request) const; + InsertCustomOutcome insertCustom(const Model::InsertCustomRequest &request)const; + void insertCustomAsync(const Model::InsertCustomRequest& request, const InsertCustomAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + InsertCustomOutcomeCallable insertCustomCallable(const Model::InsertCustomRequest& request) const; OpenAlinlpServiceOutcome openAlinlpService(const Model::OpenAlinlpServiceRequest &request)const; void openAlinlpServiceAsync(const Model::OpenAlinlpServiceRequest& request, const OpenAlinlpServiceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; OpenAlinlpServiceOutcomeCallable openAlinlpServiceCallable(const Model::OpenAlinlpServiceRequest& request) const; diff --git a/alinlp/include/alibabacloud/alinlp/model/GetUserUploadSignRequest.h b/alinlp/include/alibabacloud/alinlp/model/GetUserUploadSignRequest.h new file mode 100644 index 000000000..20084147e --- /dev/null +++ b/alinlp/include/alibabacloud/alinlp/model/GetUserUploadSignRequest.h @@ -0,0 +1,42 @@ +/* + * 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_ALINLP_MODEL_GETUSERUPLOADSIGNREQUEST_H_ +#define ALIBABACLOUD_ALINLP_MODEL_GETUSERUPLOADSIGNREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Alinlp { +namespace Model { +class ALIBABACLOUD_ALINLP_EXPORT GetUserUploadSignRequest : public RpcServiceRequest { +public: + GetUserUploadSignRequest(); + ~GetUserUploadSignRequest(); + std::string getServiceCode() const; + void setServiceCode(const std::string &serviceCode); + +private: + std::string serviceCode_; +}; +} // namespace Model +} // namespace Alinlp +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_ALINLP_MODEL_GETUSERUPLOADSIGNREQUEST_H_ diff --git a/alinlp/include/alibabacloud/alinlp/model/GetUserUploadSignResult.h b/alinlp/include/alibabacloud/alinlp/model/GetUserUploadSignResult.h new file mode 100644 index 000000000..53329abda --- /dev/null +++ b/alinlp/include/alibabacloud/alinlp/model/GetUserUploadSignResult.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_ALINLP_MODEL_GETUSERUPLOADSIGNRESULT_H_ +#define ALIBABACLOUD_ALINLP_MODEL_GETUSERUPLOADSIGNRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Alinlp + { + namespace Model + { + class ALIBABACLOUD_ALINLP_EXPORT GetUserUploadSignResult : public ServiceResult + { + public: + + + GetUserUploadSignResult(); + explicit GetUserUploadSignResult(const std::string &payload); + ~GetUserUploadSignResult(); + std::string getData()const; + + protected: + void parse(const std::string &payload); + private: + std::string data_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ALINLP_MODEL_GETUSERUPLOADSIGNRESULT_H_ \ No newline at end of file diff --git a/alinlp/include/alibabacloud/alinlp/model/InsertCustomRequest.h b/alinlp/include/alibabacloud/alinlp/model/InsertCustomRequest.h new file mode 100644 index 000000000..562b28046 --- /dev/null +++ b/alinlp/include/alibabacloud/alinlp/model/InsertCustomRequest.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_ALINLP_MODEL_INSERTCUSTOMREQUEST_H_ +#define ALIBABACLOUD_ALINLP_MODEL_INSERTCUSTOMREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Alinlp { +namespace Model { +class ALIBABACLOUD_ALINLP_EXPORT InsertCustomRequest : public RpcServiceRequest { +public: + InsertCustomRequest(); + ~InsertCustomRequest(); + std::string getCustomUrl() const; + void setCustomUrl(const std::string &customUrl); + std::string getRegUrl() const; + void setRegUrl(const std::string ®Url); + std::string getServiceCode() const; + void setServiceCode(const std::string &serviceCode); + std::string getRegFileName() const; + void setRegFileName(const std::string ®FileName); + std::string getCustomFileName() const; + void setCustomFileName(const std::string &customFileName); + int getApiId() const; + void setApiId(int apiId); + +private: + std::string customUrl_; + std::string regUrl_; + std::string serviceCode_; + std::string regFileName_; + std::string customFileName_; + int apiId_; +}; +} // namespace Model +} // namespace Alinlp +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_ALINLP_MODEL_INSERTCUSTOMREQUEST_H_ diff --git a/alinlp/include/alibabacloud/alinlp/model/InsertCustomResult.h b/alinlp/include/alibabacloud/alinlp/model/InsertCustomResult.h new file mode 100644 index 000000000..25fcc25ca --- /dev/null +++ b/alinlp/include/alibabacloud/alinlp/model/InsertCustomResult.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_ALINLP_MODEL_INSERTCUSTOMRESULT_H_ +#define ALIBABACLOUD_ALINLP_MODEL_INSERTCUSTOMRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Alinlp + { + namespace Model + { + class ALIBABACLOUD_ALINLP_EXPORT InsertCustomResult : public ServiceResult + { + public: + + + InsertCustomResult(); + explicit InsertCustomResult(const std::string &payload); + ~InsertCustomResult(); + std::string getData()const; + + protected: + void parse(const std::string &payload); + private: + std::string data_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ALINLP_MODEL_INSERTCUSTOMRESULT_H_ \ No newline at end of file diff --git a/alinlp/src/AlinlpClient.cc b/alinlp/src/AlinlpClient.cc index 9acbb7846..7f868cb45 100644 --- a/alinlp/src/AlinlpClient.cc +++ b/alinlp/src/AlinlpClient.cc @@ -31,21 +31,21 @@ AlinlpClient::AlinlpClient(const Credentials &credentials, const ClientConfigura 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, "alinlp"); } AlinlpClient::AlinlpClient(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, "alinlp"); } AlinlpClient::AlinlpClient(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, "alinlp"); } AlinlpClient::~AlinlpClient() @@ -1239,6 +1239,42 @@ AlinlpClient::GetTsChEcomOutcomeCallable AlinlpClient::getTsChEcomCallable(const return task->get_future(); } +AlinlpClient::GetUserUploadSignOutcome AlinlpClient::getUserUploadSign(const GetUserUploadSignRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetUserUploadSignOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetUserUploadSignOutcome(GetUserUploadSignResult(outcome.result())); + else + return GetUserUploadSignOutcome(outcome.error()); +} + +void AlinlpClient::getUserUploadSignAsync(const GetUserUploadSignRequest& request, const GetUserUploadSignAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getUserUploadSign(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +AlinlpClient::GetUserUploadSignOutcomeCallable AlinlpClient::getUserUploadSignCallable(const GetUserUploadSignRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getUserUploadSign(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + AlinlpClient::GetWeChCommentOutcome AlinlpClient::getWeChComment(const GetWeChCommentRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -1743,6 +1779,42 @@ AlinlpClient::GetWsCustomizedSeaGeneralOutcomeCallable AlinlpClient::getWsCustom return task->get_future(); } +AlinlpClient::InsertCustomOutcome AlinlpClient::insertCustom(const InsertCustomRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return InsertCustomOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return InsertCustomOutcome(InsertCustomResult(outcome.result())); + else + return InsertCustomOutcome(outcome.error()); +} + +void AlinlpClient::insertCustomAsync(const InsertCustomRequest& request, const InsertCustomAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, insertCustom(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +AlinlpClient::InsertCustomOutcomeCallable AlinlpClient::insertCustomCallable(const InsertCustomRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->insertCustom(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + AlinlpClient::OpenAlinlpServiceOutcome AlinlpClient::openAlinlpService(const OpenAlinlpServiceRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/alinlp/src/model/GetUserUploadSignRequest.cc b/alinlp/src/model/GetUserUploadSignRequest.cc new file mode 100644 index 000000000..79440615a --- /dev/null +++ b/alinlp/src/model/GetUserUploadSignRequest.cc @@ -0,0 +1,36 @@ +/* + * 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::Alinlp::Model::GetUserUploadSignRequest; + +GetUserUploadSignRequest::GetUserUploadSignRequest() + : RpcServiceRequest("alinlp", "2020-06-29", "GetUserUploadSign") { + setMethod(HttpRequest::Method::Post); +} + +GetUserUploadSignRequest::~GetUserUploadSignRequest() {} + +std::string GetUserUploadSignRequest::getServiceCode() const { + return serviceCode_; +} + +void GetUserUploadSignRequest::setServiceCode(const std::string &serviceCode) { + serviceCode_ = serviceCode; + setBodyParameter(std::string("ServiceCode"), serviceCode); +} + diff --git a/alinlp/src/model/GetUserUploadSignResult.cc b/alinlp/src/model/GetUserUploadSignResult.cc new file mode 100644 index 000000000..2d38a2049 --- /dev/null +++ b/alinlp/src/model/GetUserUploadSignResult.cc @@ -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 +#include + +using namespace AlibabaCloud::Alinlp; +using namespace AlibabaCloud::Alinlp::Model; + +GetUserUploadSignResult::GetUserUploadSignResult() : + ServiceResult() +{} + +GetUserUploadSignResult::GetUserUploadSignResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetUserUploadSignResult::~GetUserUploadSignResult() +{} + +void GetUserUploadSignResult::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 GetUserUploadSignResult::getData()const +{ + return data_; +} + diff --git a/alinlp/src/model/InsertCustomRequest.cc b/alinlp/src/model/InsertCustomRequest.cc new file mode 100644 index 000000000..53076430e --- /dev/null +++ b/alinlp/src/model/InsertCustomRequest.cc @@ -0,0 +1,81 @@ +/* + * 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::Alinlp::Model::InsertCustomRequest; + +InsertCustomRequest::InsertCustomRequest() + : RpcServiceRequest("alinlp", "2020-06-29", "InsertCustom") { + setMethod(HttpRequest::Method::Post); +} + +InsertCustomRequest::~InsertCustomRequest() {} + +std::string InsertCustomRequest::getCustomUrl() const { + return customUrl_; +} + +void InsertCustomRequest::setCustomUrl(const std::string &customUrl) { + customUrl_ = customUrl; + setBodyParameter(std::string("CustomUrl"), customUrl); +} + +std::string InsertCustomRequest::getRegUrl() const { + return regUrl_; +} + +void InsertCustomRequest::setRegUrl(const std::string ®Url) { + regUrl_ = regUrl; + setBodyParameter(std::string("RegUrl"), regUrl); +} + +std::string InsertCustomRequest::getServiceCode() const { + return serviceCode_; +} + +void InsertCustomRequest::setServiceCode(const std::string &serviceCode) { + serviceCode_ = serviceCode; + setBodyParameter(std::string("ServiceCode"), serviceCode); +} + +std::string InsertCustomRequest::getRegFileName() const { + return regFileName_; +} + +void InsertCustomRequest::setRegFileName(const std::string ®FileName) { + regFileName_ = regFileName; + setBodyParameter(std::string("RegFileName"), regFileName); +} + +std::string InsertCustomRequest::getCustomFileName() const { + return customFileName_; +} + +void InsertCustomRequest::setCustomFileName(const std::string &customFileName) { + customFileName_ = customFileName; + setBodyParameter(std::string("CustomFileName"), customFileName); +} + +int InsertCustomRequest::getApiId() const { + return apiId_; +} + +void InsertCustomRequest::setApiId(int apiId) { + apiId_ = apiId; + setBodyParameter(std::string("ApiId"), std::to_string(apiId)); +} + diff --git a/alinlp/src/model/InsertCustomResult.cc b/alinlp/src/model/InsertCustomResult.cc new file mode 100644 index 000000000..91b34a87a --- /dev/null +++ b/alinlp/src/model/InsertCustomResult.cc @@ -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 +#include + +using namespace AlibabaCloud::Alinlp; +using namespace AlibabaCloud::Alinlp::Model; + +InsertCustomResult::InsertCustomResult() : + ServiceResult() +{} + +InsertCustomResult::InsertCustomResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +InsertCustomResult::~InsertCustomResult() +{} + +void InsertCustomResult::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 InsertCustomResult::getData()const +{ + return data_; +} +