From 371081045a37c830a3c43ff007ca2bdbb8bc946f Mon Sep 17 00:00:00 2001 From: sdk-team Date: Fri, 28 Aug 2020 12:05:15 +0800 Subject: [PATCH] Supported Add GetAlgorithmHistoryResult. --- CHANGELOG | 3 + VERSION | 2 +- industry-brain/CMakeLists.txt | 102 ++++++++ .../industry-brain/Industry_brainClient.h | 86 +++++++ .../industry-brain/Industry_brainExport.h | 32 +++ .../model/AsyncResponsePostRequest.h | 63 +++++ .../model/AsyncResponsePostResult.h | 57 +++++ .../model/GetAlgorithmHistoryResultRequest.h | 54 ++++ .../model/GetAlgorithmHistoryResultResult.h | 63 +++++ .../model/GetServiceResultAsyncRequest.h | 51 ++++ .../model/GetServiceResultAsyncResult.h | 55 +++++ .../model/InvokeServiceAsyncRequest.h | 57 +++++ .../model/InvokeServiceAsyncResult.h | 55 +++++ .../model/InvokeServiceRequest.h | 66 +++++ .../model/InvokeServiceResult.h | 55 +++++ industry-brain/src/Industry-brainClient.cc | 233 ++++++++++++++++++ .../src/model/AsyncResponsePostRequest.cc | 95 +++++++ .../src/model/AsyncResponsePostResult.cc | 72 ++++++ .../model/GetAlgorithmHistoryResultRequest.cc | 62 +++++ .../model/GetAlgorithmHistoryResultResult.cc | 82 ++++++ .../src/model/GetServiceResultAsyncRequest.cc | 51 ++++ .../src/model/GetServiceResultAsyncResult.cc | 65 +++++ .../src/model/InvokeServiceAsyncRequest.cc | 73 ++++++ .../src/model/InvokeServiceAsyncResult.cc | 65 +++++ .../src/model/InvokeServiceRequest.cc | 106 ++++++++ .../src/model/InvokeServiceResult.cc | 65 +++++ 26 files changed, 1769 insertions(+), 1 deletion(-) create mode 100644 industry-brain/CMakeLists.txt create mode 100644 industry-brain/include/alibabacloud/industry-brain/Industry_brainClient.h create mode 100644 industry-brain/include/alibabacloud/industry-brain/Industry_brainExport.h create mode 100644 industry-brain/include/alibabacloud/industry-brain/model/AsyncResponsePostRequest.h create mode 100644 industry-brain/include/alibabacloud/industry-brain/model/AsyncResponsePostResult.h create mode 100644 industry-brain/include/alibabacloud/industry-brain/model/GetAlgorithmHistoryResultRequest.h create mode 100644 industry-brain/include/alibabacloud/industry-brain/model/GetAlgorithmHistoryResultResult.h create mode 100644 industry-brain/include/alibabacloud/industry-brain/model/GetServiceResultAsyncRequest.h create mode 100644 industry-brain/include/alibabacloud/industry-brain/model/GetServiceResultAsyncResult.h create mode 100644 industry-brain/include/alibabacloud/industry-brain/model/InvokeServiceAsyncRequest.h create mode 100644 industry-brain/include/alibabacloud/industry-brain/model/InvokeServiceAsyncResult.h create mode 100644 industry-brain/include/alibabacloud/industry-brain/model/InvokeServiceRequest.h create mode 100644 industry-brain/include/alibabacloud/industry-brain/model/InvokeServiceResult.h create mode 100644 industry-brain/src/Industry-brainClient.cc create mode 100644 industry-brain/src/model/AsyncResponsePostRequest.cc create mode 100644 industry-brain/src/model/AsyncResponsePostResult.cc create mode 100644 industry-brain/src/model/GetAlgorithmHistoryResultRequest.cc create mode 100644 industry-brain/src/model/GetAlgorithmHistoryResultResult.cc create mode 100644 industry-brain/src/model/GetServiceResultAsyncRequest.cc create mode 100644 industry-brain/src/model/GetServiceResultAsyncResult.cc create mode 100644 industry-brain/src/model/InvokeServiceAsyncRequest.cc create mode 100644 industry-brain/src/model/InvokeServiceAsyncResult.cc create mode 100644 industry-brain/src/model/InvokeServiceRequest.cc create mode 100644 industry-brain/src/model/InvokeServiceResult.cc diff --git a/CHANGELOG b/CHANGELOG index 997de5d5e..acfb8c326 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2020-08-28 Version: 1.36.613 +- Supported Add GetAlgorithmHistoryResult. + 2020-08-27 Version: 1.36.612 - Update parameter. diff --git a/VERSION b/VERSION index cc9d1e54e..b04bee064 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.612 \ No newline at end of file +1.36.613 \ No newline at end of file diff --git a/industry-brain/CMakeLists.txt b/industry-brain/CMakeLists.txt new file mode 100644 index 000000000..58a9de21d --- /dev/null +++ b/industry-brain/CMakeLists.txt @@ -0,0 +1,102 @@ +# +# 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. +# + +set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include) + +set(industry-brain_public_header + include/alibabacloud/industry-brain/Industry_brainClient.h + include/alibabacloud/industry-brain/Industry_brainExport.h ) + +set(industry-brain_public_header_model + include/alibabacloud/industry-brain/model/AsyncResponsePostRequest.h + include/alibabacloud/industry-brain/model/AsyncResponsePostResult.h + include/alibabacloud/industry-brain/model/GetAlgorithmHistoryResultRequest.h + include/alibabacloud/industry-brain/model/GetAlgorithmHistoryResultResult.h + include/alibabacloud/industry-brain/model/GetServiceResultAsyncRequest.h + include/alibabacloud/industry-brain/model/GetServiceResultAsyncResult.h + include/alibabacloud/industry-brain/model/InvokeServiceRequest.h + include/alibabacloud/industry-brain/model/InvokeServiceResult.h + include/alibabacloud/industry-brain/model/InvokeServiceAsyncRequest.h + include/alibabacloud/industry-brain/model/InvokeServiceAsyncResult.h ) + +set(industry-brain_src + src/Industry-brainClient.cc + src/model/AsyncResponsePostRequest.cc + src/model/AsyncResponsePostResult.cc + src/model/GetAlgorithmHistoryResultRequest.cc + src/model/GetAlgorithmHistoryResultResult.cc + src/model/GetServiceResultAsyncRequest.cc + src/model/GetServiceResultAsyncResult.cc + src/model/InvokeServiceRequest.cc + src/model/InvokeServiceResult.cc + src/model/InvokeServiceAsyncRequest.cc + src/model/InvokeServiceAsyncResult.cc ) + +add_library(industry-brain ${LIB_TYPE} + ${industry-brain_public_header} + ${industry-brain_public_header_model} + ${industry-brain_src}) + +set_target_properties(industry-brain + PROPERTIES + LINKER_LANGUAGE CXX + ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin + OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}industry-brain + ) + +if(${LIB_TYPE} STREQUAL "SHARED") + set_target_properties(industry-brain + PROPERTIES + DEFINE_SYMBOL ALIBABACLOUD_INDUSTRY_BRAIN_LIBRARY) +endif() + +target_include_directories(industry-brain + PRIVATE include + ${CMAKE_SOURCE_DIR}/core/include + ) +target_link_libraries(industry-brain + core) + +if(CMAKE_HOST_WIN32) + ExternalProject_Get_Property(jsoncpp INSTALL_DIR) + set(jsoncpp_install_dir ${INSTALL_DIR}) + add_dependencies(industry-brain + jsoncpp) + target_include_directories(industry-brain + PRIVATE ${jsoncpp_install_dir}/include) + target_link_libraries(industry-brain + ${jsoncpp_install_dir}/lib/jsoncpp.lib) + set_target_properties(industry-brain + PROPERTIES + COMPILE_OPTIONS "/bigobj") +else() + target_include_directories(industry-brain + PRIVATE /usr/include/jsoncpp) + target_link_libraries(industry-brain + jsoncpp) +endif() + +install(FILES ${industry-brain_public_header} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/industry-brain) +install(FILES ${industry-brain_public_header_model} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/industry-brain/model) +install(TARGETS industry-brain + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) \ No newline at end of file diff --git a/industry-brain/include/alibabacloud/industry-brain/Industry_brainClient.h b/industry-brain/include/alibabacloud/industry-brain/Industry_brainClient.h new file mode 100644 index 000000000..4f8a3cc0c --- /dev/null +++ b/industry-brain/include/alibabacloud/industry-brain/Industry_brainClient.h @@ -0,0 +1,86 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_INDUSTRY_BRAIN_INDUSTRY_BRAINCLIENT_H_ +#define ALIBABACLOUD_INDUSTRY_BRAIN_INDUSTRY_BRAINCLIENT_H_ + +#include +#include +#include +#include +#include "Industry_brainExport.h" +#include "model/AsyncResponsePostRequest.h" +#include "model/AsyncResponsePostResult.h" +#include "model/GetAlgorithmHistoryResultRequest.h" +#include "model/GetAlgorithmHistoryResultResult.h" +#include "model/GetServiceResultAsyncRequest.h" +#include "model/GetServiceResultAsyncResult.h" +#include "model/InvokeServiceRequest.h" +#include "model/InvokeServiceResult.h" +#include "model/InvokeServiceAsyncRequest.h" +#include "model/InvokeServiceAsyncResult.h" + + +namespace AlibabaCloud +{ + namespace Industry_brain + { + class ALIBABACLOUD_INDUSTRY_BRAIN_EXPORT Industry_brainClient : public RpcServiceClient + { + public: + typedef Outcome AsyncResponsePostOutcome; + typedef std::future AsyncResponsePostOutcomeCallable; + typedef std::function&)> AsyncResponsePostAsyncHandler; + typedef Outcome GetAlgorithmHistoryResultOutcome; + typedef std::future GetAlgorithmHistoryResultOutcomeCallable; + typedef std::function&)> GetAlgorithmHistoryResultAsyncHandler; + typedef Outcome GetServiceResultAsyncOutcome; + typedef std::future GetServiceResultAsyncOutcomeCallable; + typedef std::function&)> GetServiceResultAsyncAsyncHandler; + typedef Outcome InvokeServiceOutcome; + typedef std::future InvokeServiceOutcomeCallable; + typedef std::function&)> InvokeServiceAsyncHandler; + typedef Outcome InvokeServiceAsyncOutcome; + typedef std::future InvokeServiceAsyncOutcomeCallable; + typedef std::function&)> InvokeServiceAsyncAsyncHandler; + + Industry_brainClient(const Credentials &credentials, const ClientConfiguration &configuration); + Industry_brainClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); + Industry_brainClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); + ~Industry_brainClient(); + AsyncResponsePostOutcome asyncResponsePost(const Model::AsyncResponsePostRequest &request)const; + void asyncResponsePostAsync(const Model::AsyncResponsePostRequest& request, const AsyncResponsePostAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + AsyncResponsePostOutcomeCallable asyncResponsePostCallable(const Model::AsyncResponsePostRequest& request) const; + GetAlgorithmHistoryResultOutcome getAlgorithmHistoryResult(const Model::GetAlgorithmHistoryResultRequest &request)const; + void getAlgorithmHistoryResultAsync(const Model::GetAlgorithmHistoryResultRequest& request, const GetAlgorithmHistoryResultAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetAlgorithmHistoryResultOutcomeCallable getAlgorithmHistoryResultCallable(const Model::GetAlgorithmHistoryResultRequest& request) const; + GetServiceResultAsyncOutcome getServiceResultAsync(const Model::GetServiceResultAsyncRequest &request)const; + void getServiceResultAsyncAsync(const Model::GetServiceResultAsyncRequest& request, const GetServiceResultAsyncAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetServiceResultAsyncOutcomeCallable getServiceResultAsyncCallable(const Model::GetServiceResultAsyncRequest& request) const; + InvokeServiceOutcome invokeService(const Model::InvokeServiceRequest &request)const; + void invokeServiceAsync(const Model::InvokeServiceRequest& request, const InvokeServiceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + InvokeServiceOutcomeCallable invokeServiceCallable(const Model::InvokeServiceRequest& request) const; + InvokeServiceAsyncOutcome invokeServiceAsync(const Model::InvokeServiceAsyncRequest &request)const; + void invokeServiceAsyncAsync(const Model::InvokeServiceAsyncRequest& request, const InvokeServiceAsyncAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + InvokeServiceAsyncOutcomeCallable invokeServiceAsyncCallable(const Model::InvokeServiceAsyncRequest& request) const; + + private: + std::shared_ptr endpointProvider_; + }; + } +} + +#endif // !ALIBABACLOUD_INDUSTRY_BRAIN_INDUSTRY_BRAINCLIENT_H_ diff --git a/industry-brain/include/alibabacloud/industry-brain/Industry_brainExport.h b/industry-brain/include/alibabacloud/industry-brain/Industry_brainExport.h new file mode 100644 index 000000000..23cc87ee0 --- /dev/null +++ b/industry-brain/include/alibabacloud/industry-brain/Industry_brainExport.h @@ -0,0 +1,32 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_INDUSTRY_BRAIN_INDUSTRY_BRAINEXPORT_H_ +#define ALIBABACLOUD_INDUSTRY_BRAIN_INDUSTRY_BRAINEXPORT_H_ + +#include + +#if defined(ALIBABACLOUD_SHARED) +# if defined(ALIBABACLOUD_INDUSTRY_BRAIN_LIBRARY) +# define ALIBABACLOUD_INDUSTRY_BRAIN_EXPORT ALIBABACLOUD_DECL_EXPORT +# else +# define ALIBABACLOUD_INDUSTRY_BRAIN_EXPORT ALIBABACLOUD_DECL_IMPORT +# endif +#else +# define ALIBABACLOUD_INDUSTRY_BRAIN_EXPORT +#endif + +#endif // !ALIBABACLOUD_INDUSTRY_BRAIN_INDUSTRY_BRAINEXPORT_H_ \ No newline at end of file diff --git a/industry-brain/include/alibabacloud/industry-brain/model/AsyncResponsePostRequest.h b/industry-brain/include/alibabacloud/industry-brain/model/AsyncResponsePostRequest.h new file mode 100644 index 000000000..35fa63b82 --- /dev/null +++ b/industry-brain/include/alibabacloud/industry-brain/model/AsyncResponsePostRequest.h @@ -0,0 +1,63 @@ +/* + * 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_INDUSTRY_BRAIN_MODEL_ASYNCRESPONSEPOSTREQUEST_H_ +#define ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_ASYNCRESPONSEPOSTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Industry_brain + { + namespace Model + { + class ALIBABACLOUD_INDUSTRY_BRAIN_EXPORT AsyncResponsePostRequest : public RpcServiceRequest + { + + public: + AsyncResponsePostRequest(); + ~AsyncResponsePostRequest(); + + std::string getData()const; + void setData(const std::string& data); + std::string getContext()const; + void setContext(const std::string& context); + float getProgress()const; + void setProgress(float progress); + std::string getMessage()const; + void setMessage(const std::string& message); + std::string getTaskId()const; + void setTaskId(const std::string& taskId); + std::string getStatus()const; + void setStatus(const std::string& status); + + private: + std::string data_; + std::string context_; + float progress_; + std::string message_; + std::string taskId_; + std::string status_; + + }; + } + } +} +#endif // !ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_ASYNCRESPONSEPOSTREQUEST_H_ \ No newline at end of file diff --git a/industry-brain/include/alibabacloud/industry-brain/model/AsyncResponsePostResult.h b/industry-brain/include/alibabacloud/industry-brain/model/AsyncResponsePostResult.h new file mode 100644 index 000000000..fa5372011 --- /dev/null +++ b/industry-brain/include/alibabacloud/industry-brain/model/AsyncResponsePostResult.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_INDUSTRY_BRAIN_MODEL_ASYNCRESPONSEPOSTRESULT_H_ +#define ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_ASYNCRESPONSEPOSTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Industry_brain + { + namespace Model + { + class ALIBABACLOUD_INDUSTRY_BRAIN_EXPORT AsyncResponsePostResult : public ServiceResult + { + public: + + + AsyncResponsePostResult(); + explicit AsyncResponsePostResult(const std::string &payload); + ~AsyncResponsePostResult(); + std::string getStatus()const; + std::string getMessage()const; + std::string getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string status_; + std::string message_; + std::string data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_ASYNCRESPONSEPOSTRESULT_H_ \ No newline at end of file diff --git a/industry-brain/include/alibabacloud/industry-brain/model/GetAlgorithmHistoryResultRequest.h b/industry-brain/include/alibabacloud/industry-brain/model/GetAlgorithmHistoryResultRequest.h new file mode 100644 index 000000000..cd2f81ff2 --- /dev/null +++ b/industry-brain/include/alibabacloud/industry-brain/model/GetAlgorithmHistoryResultRequest.h @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_GETALGORITHMHISTORYRESULTREQUEST_H_ +#define ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_GETALGORITHMHISTORYRESULTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Industry_brain + { + namespace Model + { + class ALIBABACLOUD_INDUSTRY_BRAIN_EXPORT GetAlgorithmHistoryResultRequest : public RpcServiceRequest + { + + public: + GetAlgorithmHistoryResultRequest(); + ~GetAlgorithmHistoryResultRequest(); + + std::string getEndTime()const; + void setEndTime(const std::string& endTime); + std::string getStartTime()const; + void setStartTime(const std::string& startTime); + std::string getServiceId()const; + void setServiceId(const std::string& serviceId); + + private: + std::string endTime_; + std::string startTime_; + std::string serviceId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_GETALGORITHMHISTORYRESULTREQUEST_H_ \ No newline at end of file diff --git a/industry-brain/include/alibabacloud/industry-brain/model/GetAlgorithmHistoryResultResult.h b/industry-brain/include/alibabacloud/industry-brain/model/GetAlgorithmHistoryResultResult.h new file mode 100644 index 000000000..7b5a53c48 --- /dev/null +++ b/industry-brain/include/alibabacloud/industry-brain/model/GetAlgorithmHistoryResultResult.h @@ -0,0 +1,63 @@ +/* + * 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_INDUSTRY_BRAIN_MODEL_GETALGORITHMHISTORYRESULTRESULT_H_ +#define ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_GETALGORITHMHISTORYRESULTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Industry_brain + { + namespace Model + { + class ALIBABACLOUD_INDUSTRY_BRAIN_EXPORT GetAlgorithmHistoryResultResult : public ServiceResult + { + public: + struct Region + { + std::string invokeTime; + std::string input; + std::string output; + }; + + + GetAlgorithmHistoryResultResult(); + explicit GetAlgorithmHistoryResultResult(const std::string &payload); + ~GetAlgorithmHistoryResultResult(); + std::string getMessage()const; + std::string getTraceId()const; + std::vector getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + std::string traceId_; + std::vector data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_GETALGORITHMHISTORYRESULTRESULT_H_ \ No newline at end of file diff --git a/industry-brain/include/alibabacloud/industry-brain/model/GetServiceResultAsyncRequest.h b/industry-brain/include/alibabacloud/industry-brain/model/GetServiceResultAsyncRequest.h new file mode 100644 index 000000000..a62594112 --- /dev/null +++ b/industry-brain/include/alibabacloud/industry-brain/model/GetServiceResultAsyncRequest.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_INDUSTRY_BRAIN_MODEL_GETSERVICERESULTASYNCREQUEST_H_ +#define ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_GETSERVICERESULTASYNCREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Industry_brain + { + namespace Model + { + class ALIBABACLOUD_INDUSTRY_BRAIN_EXPORT GetServiceResultAsyncRequest : public RpcServiceRequest + { + + public: + GetServiceResultAsyncRequest(); + ~GetServiceResultAsyncRequest(); + + std::string getServiceId()const; + void setServiceId(const std::string& serviceId); + std::string getTaskId()const; + void setTaskId(const std::string& taskId); + + private: + std::string serviceId_; + std::string taskId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_GETSERVICERESULTASYNCREQUEST_H_ \ No newline at end of file diff --git a/industry-brain/include/alibabacloud/industry-brain/model/GetServiceResultAsyncResult.h b/industry-brain/include/alibabacloud/industry-brain/model/GetServiceResultAsyncResult.h new file mode 100644 index 000000000..1b635c9e0 --- /dev/null +++ b/industry-brain/include/alibabacloud/industry-brain/model/GetServiceResultAsyncResult.h @@ -0,0 +1,55 @@ +/* + * 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_INDUSTRY_BRAIN_MODEL_GETSERVICERESULTASYNCRESULT_H_ +#define ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_GETSERVICERESULTASYNCRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Industry_brain + { + namespace Model + { + class ALIBABACLOUD_INDUSTRY_BRAIN_EXPORT GetServiceResultAsyncResult : public ServiceResult + { + public: + + + GetServiceResultAsyncResult(); + explicit GetServiceResultAsyncResult(const std::string &payload); + ~GetServiceResultAsyncResult(); + std::string getMessage()const; + std::string getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + std::string data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_GETSERVICERESULTASYNCRESULT_H_ \ No newline at end of file diff --git a/industry-brain/include/alibabacloud/industry-brain/model/InvokeServiceAsyncRequest.h b/industry-brain/include/alibabacloud/industry-brain/model/InvokeServiceAsyncRequest.h new file mode 100644 index 000000000..80072fbf5 --- /dev/null +++ b/industry-brain/include/alibabacloud/industry-brain/model/InvokeServiceAsyncRequest.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_INDUSTRY_BRAIN_MODEL_INVOKESERVICEASYNCREQUEST_H_ +#define ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_INVOKESERVICEASYNCREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Industry_brain + { + namespace Model + { + class ALIBABACLOUD_INDUSTRY_BRAIN_EXPORT InvokeServiceAsyncRequest : public RpcServiceRequest + { + + public: + InvokeServiceAsyncRequest(); + ~InvokeServiceAsyncRequest(); + + bool getIsShowInput()const; + void setIsShowInput(bool isShowInput); + std::string getServiceId()const; + void setServiceId(const std::string& serviceId); + std::string getParams()const; + void setParams(const std::string& params); + std::string getRequestData()const; + void setRequestData(const std::string& requestData); + + private: + bool isShowInput_; + std::string serviceId_; + std::string params_; + std::string requestData_; + + }; + } + } +} +#endif // !ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_INVOKESERVICEASYNCREQUEST_H_ \ No newline at end of file diff --git a/industry-brain/include/alibabacloud/industry-brain/model/InvokeServiceAsyncResult.h b/industry-brain/include/alibabacloud/industry-brain/model/InvokeServiceAsyncResult.h new file mode 100644 index 000000000..d1fc49ad9 --- /dev/null +++ b/industry-brain/include/alibabacloud/industry-brain/model/InvokeServiceAsyncResult.h @@ -0,0 +1,55 @@ +/* + * 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_INDUSTRY_BRAIN_MODEL_INVOKESERVICEASYNCRESULT_H_ +#define ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_INVOKESERVICEASYNCRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Industry_brain + { + namespace Model + { + class ALIBABACLOUD_INDUSTRY_BRAIN_EXPORT InvokeServiceAsyncResult : public ServiceResult + { + public: + + + InvokeServiceAsyncResult(); + explicit InvokeServiceAsyncResult(const std::string &payload); + ~InvokeServiceAsyncResult(); + std::string getMessage()const; + std::string getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + std::string data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_INVOKESERVICEASYNCRESULT_H_ \ No newline at end of file diff --git a/industry-brain/include/alibabacloud/industry-brain/model/InvokeServiceRequest.h b/industry-brain/include/alibabacloud/industry-brain/model/InvokeServiceRequest.h new file mode 100644 index 000000000..e2a918944 --- /dev/null +++ b/industry-brain/include/alibabacloud/industry-brain/model/InvokeServiceRequest.h @@ -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. + */ + +#ifndef ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_INVOKESERVICEREQUEST_H_ +#define ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_INVOKESERVICEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Industry_brain + { + namespace Model + { + class ALIBABACLOUD_INDUSTRY_BRAIN_EXPORT InvokeServiceRequest : public RpcServiceRequest + { + + public: + InvokeServiceRequest(); + ~InvokeServiceRequest(); + + std::string getRequestParams()const; + void setRequestParams(const std::string& requestParams); + bool getShowBizInfo()const; + void setShowBizInfo(bool showBizInfo); + bool getForceInvokeConfiguration()const; + void setForceInvokeConfiguration(bool forceInvokeConfiguration); + std::string getContext()const; + void setContext(const std::string& context); + std::string getServiceId()const; + void setServiceId(const std::string& serviceId); + std::string getRequestData()const; + void setRequestData(const std::string& requestData); + bool getShowParams()const; + void setShowParams(bool showParams); + + private: + std::string requestParams_; + bool showBizInfo_; + bool forceInvokeConfiguration_; + std::string context_; + std::string serviceId_; + std::string requestData_; + bool showParams_; + + }; + } + } +} +#endif // !ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_INVOKESERVICEREQUEST_H_ \ No newline at end of file diff --git a/industry-brain/include/alibabacloud/industry-brain/model/InvokeServiceResult.h b/industry-brain/include/alibabacloud/industry-brain/model/InvokeServiceResult.h new file mode 100644 index 000000000..53dcce511 --- /dev/null +++ b/industry-brain/include/alibabacloud/industry-brain/model/InvokeServiceResult.h @@ -0,0 +1,55 @@ +/* + * 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_INDUSTRY_BRAIN_MODEL_INVOKESERVICERESULT_H_ +#define ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_INVOKESERVICERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Industry_brain + { + namespace Model + { + class ALIBABACLOUD_INDUSTRY_BRAIN_EXPORT InvokeServiceResult : public ServiceResult + { + public: + + + InvokeServiceResult(); + explicit InvokeServiceResult(const std::string &payload); + ~InvokeServiceResult(); + std::string getMessage()const; + std::string getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + std::string data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_INDUSTRY_BRAIN_MODEL_INVOKESERVICERESULT_H_ \ No newline at end of file diff --git a/industry-brain/src/Industry-brainClient.cc b/industry-brain/src/Industry-brainClient.cc new file mode 100644 index 000000000..868272421 --- /dev/null +++ b/industry-brain/src/Industry-brainClient.cc @@ -0,0 +1,233 @@ +/* + * 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; +using namespace AlibabaCloud::Location; +using namespace AlibabaCloud::Industry_brain; +using namespace AlibabaCloud::Industry_brain::Model; + +namespace +{ + const std::string SERVICE_NAME = "industry-brain"; +} + +Industry_brainClient::Industry_brainClient(const Credentials &credentials, const ClientConfiguration &configuration) : + RpcServiceClient(SERVICE_NAME, std::make_shared(credentials), configuration) +{ + auto locationClient = std::make_shared(credentials, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); +} + +Industry_brainClient::Industry_brainClient(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, ""); +} + +Industry_brainClient::Industry_brainClient(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, ""); +} + +Industry_brainClient::~Industry_brainClient() +{} + +Industry_brainClient::AsyncResponsePostOutcome Industry_brainClient::asyncResponsePost(const AsyncResponsePostRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return AsyncResponsePostOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return AsyncResponsePostOutcome(AsyncResponsePostResult(outcome.result())); + else + return AsyncResponsePostOutcome(outcome.error()); +} + +void Industry_brainClient::asyncResponsePostAsync(const AsyncResponsePostRequest& request, const AsyncResponsePostAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, asyncResponsePost(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Industry_brainClient::AsyncResponsePostOutcomeCallable Industry_brainClient::asyncResponsePostCallable(const AsyncResponsePostRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->asyncResponsePost(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Industry_brainClient::GetAlgorithmHistoryResultOutcome Industry_brainClient::getAlgorithmHistoryResult(const GetAlgorithmHistoryResultRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetAlgorithmHistoryResultOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetAlgorithmHistoryResultOutcome(GetAlgorithmHistoryResultResult(outcome.result())); + else + return GetAlgorithmHistoryResultOutcome(outcome.error()); +} + +void Industry_brainClient::getAlgorithmHistoryResultAsync(const GetAlgorithmHistoryResultRequest& request, const GetAlgorithmHistoryResultAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getAlgorithmHistoryResult(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Industry_brainClient::GetAlgorithmHistoryResultOutcomeCallable Industry_brainClient::getAlgorithmHistoryResultCallable(const GetAlgorithmHistoryResultRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getAlgorithmHistoryResult(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Industry_brainClient::GetServiceResultAsyncOutcome Industry_brainClient::getServiceResultAsync(const GetServiceResultAsyncRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetServiceResultAsyncOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetServiceResultAsyncOutcome(GetServiceResultAsyncResult(outcome.result())); + else + return GetServiceResultAsyncOutcome(outcome.error()); +} + +void Industry_brainClient::getServiceResultAsyncAsync(const GetServiceResultAsyncRequest& request, const GetServiceResultAsyncAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getServiceResultAsync(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Industry_brainClient::GetServiceResultAsyncOutcomeCallable Industry_brainClient::getServiceResultAsyncCallable(const GetServiceResultAsyncRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getServiceResultAsync(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Industry_brainClient::InvokeServiceOutcome Industry_brainClient::invokeService(const InvokeServiceRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return InvokeServiceOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return InvokeServiceOutcome(InvokeServiceResult(outcome.result())); + else + return InvokeServiceOutcome(outcome.error()); +} + +void Industry_brainClient::invokeServiceAsync(const InvokeServiceRequest& request, const InvokeServiceAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, invokeService(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Industry_brainClient::InvokeServiceOutcomeCallable Industry_brainClient::invokeServiceCallable(const InvokeServiceRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->invokeService(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Industry_brainClient::InvokeServiceAsyncOutcome Industry_brainClient::invokeServiceAsync(const InvokeServiceAsyncRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return InvokeServiceAsyncOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return InvokeServiceAsyncOutcome(InvokeServiceAsyncResult(outcome.result())); + else + return InvokeServiceAsyncOutcome(outcome.error()); +} + +void Industry_brainClient::invokeServiceAsyncAsync(const InvokeServiceAsyncRequest& request, const InvokeServiceAsyncAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, invokeServiceAsync(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Industry_brainClient::InvokeServiceAsyncOutcomeCallable Industry_brainClient::invokeServiceAsyncCallable(const InvokeServiceAsyncRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->invokeServiceAsync(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + diff --git a/industry-brain/src/model/AsyncResponsePostRequest.cc b/industry-brain/src/model/AsyncResponsePostRequest.cc new file mode 100644 index 000000000..683032244 --- /dev/null +++ b/industry-brain/src/model/AsyncResponsePostRequest.cc @@ -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 + +using AlibabaCloud::Industry_brain::Model::AsyncResponsePostRequest; + +AsyncResponsePostRequest::AsyncResponsePostRequest() : + RpcServiceRequest("industry-brain", "2019-06-29", "AsyncResponsePost") +{ + setMethod(HttpRequest::Method::Post); +} + +AsyncResponsePostRequest::~AsyncResponsePostRequest() +{} + +std::string AsyncResponsePostRequest::getData()const +{ + return data_; +} + +void AsyncResponsePostRequest::setData(const std::string& data) +{ + data_ = data; + setParameter("Data", data); +} + +std::string AsyncResponsePostRequest::getContext()const +{ + return context_; +} + +void AsyncResponsePostRequest::setContext(const std::string& context) +{ + context_ = context; + setParameter("Context", context); +} + +float AsyncResponsePostRequest::getProgress()const +{ + return progress_; +} + +void AsyncResponsePostRequest::setProgress(float progress) +{ + progress_ = progress; + setParameter("Progress", std::to_string(progress)); +} + +std::string AsyncResponsePostRequest::getMessage()const +{ + return message_; +} + +void AsyncResponsePostRequest::setMessage(const std::string& message) +{ + message_ = message; + setParameter("Message", message); +} + +std::string AsyncResponsePostRequest::getTaskId()const +{ + return taskId_; +} + +void AsyncResponsePostRequest::setTaskId(const std::string& taskId) +{ + taskId_ = taskId; + setParameter("TaskId", taskId); +} + +std::string AsyncResponsePostRequest::getStatus()const +{ + return status_; +} + +void AsyncResponsePostRequest::setStatus(const std::string& status) +{ + status_ = status; + setParameter("Status", status); +} + diff --git a/industry-brain/src/model/AsyncResponsePostResult.cc b/industry-brain/src/model/AsyncResponsePostResult.cc new file mode 100644 index 000000000..b3cb9d9af --- /dev/null +++ b/industry-brain/src/model/AsyncResponsePostResult.cc @@ -0,0 +1,72 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Industry_brain; +using namespace AlibabaCloud::Industry_brain::Model; + +AsyncResponsePostResult::AsyncResponsePostResult() : + ServiceResult() +{} + +AsyncResponsePostResult::AsyncResponsePostResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +AsyncResponsePostResult::~AsyncResponsePostResult() +{} + +void AsyncResponsePostResult::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(); + if(!value["Status"].isNull()) + status_ = value["Status"].asString(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string AsyncResponsePostResult::getStatus()const +{ + return status_; +} + +std::string AsyncResponsePostResult::getMessage()const +{ + return message_; +} + +std::string AsyncResponsePostResult::getData()const +{ + return data_; +} + +std::string AsyncResponsePostResult::getCode()const +{ + return code_; +} + diff --git a/industry-brain/src/model/GetAlgorithmHistoryResultRequest.cc b/industry-brain/src/model/GetAlgorithmHistoryResultRequest.cc new file mode 100644 index 000000000..1ce5f07d8 --- /dev/null +++ b/industry-brain/src/model/GetAlgorithmHistoryResultRequest.cc @@ -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 + +using AlibabaCloud::Industry_brain::Model::GetAlgorithmHistoryResultRequest; + +GetAlgorithmHistoryResultRequest::GetAlgorithmHistoryResultRequest() : + RpcServiceRequest("industry-brain", "2019-06-29", "GetAlgorithmHistoryResult") +{ + setMethod(HttpRequest::Method::Get); +} + +GetAlgorithmHistoryResultRequest::~GetAlgorithmHistoryResultRequest() +{} + +std::string GetAlgorithmHistoryResultRequest::getEndTime()const +{ + return endTime_; +} + +void GetAlgorithmHistoryResultRequest::setEndTime(const std::string& endTime) +{ + endTime_ = endTime; + setParameter("EndTime", endTime); +} + +std::string GetAlgorithmHistoryResultRequest::getStartTime()const +{ + return startTime_; +} + +void GetAlgorithmHistoryResultRequest::setStartTime(const std::string& startTime) +{ + startTime_ = startTime; + setParameter("StartTime", startTime); +} + +std::string GetAlgorithmHistoryResultRequest::getServiceId()const +{ + return serviceId_; +} + +void GetAlgorithmHistoryResultRequest::setServiceId(const std::string& serviceId) +{ + serviceId_ = serviceId; + setParameter("ServiceId", serviceId); +} + diff --git a/industry-brain/src/model/GetAlgorithmHistoryResultResult.cc b/industry-brain/src/model/GetAlgorithmHistoryResultResult.cc new file mode 100644 index 000000000..915b03fbc --- /dev/null +++ b/industry-brain/src/model/GetAlgorithmHistoryResultResult.cc @@ -0,0 +1,82 @@ +/* + * 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::Industry_brain; +using namespace AlibabaCloud::Industry_brain::Model; + +GetAlgorithmHistoryResultResult::GetAlgorithmHistoryResultResult() : + ServiceResult() +{} + +GetAlgorithmHistoryResultResult::GetAlgorithmHistoryResultResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetAlgorithmHistoryResultResult::~GetAlgorithmHistoryResultResult() +{} + +void GetAlgorithmHistoryResultResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allDataNode = value["Data"]["Region"]; + for (auto valueDataRegion : allDataNode) + { + Region dataObject; + if(!valueDataRegion["Output"].isNull()) + dataObject.output = valueDataRegion["Output"].asString(); + if(!valueDataRegion["Input"].isNull()) + dataObject.input = valueDataRegion["Input"].asString(); + if(!valueDataRegion["InvokeTime"].isNull()) + dataObject.invokeTime = valueDataRegion["InvokeTime"].asString(); + data_.push_back(dataObject); + } + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + if(!value["TraceId"].isNull()) + traceId_ = value["TraceId"].asString(); + +} + +std::string GetAlgorithmHistoryResultResult::getMessage()const +{ + return message_; +} + +std::string GetAlgorithmHistoryResultResult::getTraceId()const +{ + return traceId_; +} + +std::vector GetAlgorithmHistoryResultResult::getData()const +{ + return data_; +} + +std::string GetAlgorithmHistoryResultResult::getCode()const +{ + return code_; +} + diff --git a/industry-brain/src/model/GetServiceResultAsyncRequest.cc b/industry-brain/src/model/GetServiceResultAsyncRequest.cc new file mode 100644 index 000000000..d2df76b67 --- /dev/null +++ b/industry-brain/src/model/GetServiceResultAsyncRequest.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 + +using AlibabaCloud::Industry_brain::Model::GetServiceResultAsyncRequest; + +GetServiceResultAsyncRequest::GetServiceResultAsyncRequest() : + RpcServiceRequest("industry-brain", "2019-06-29", "GetServiceResultAsync") +{ + setMethod(HttpRequest::Method::Post); +} + +GetServiceResultAsyncRequest::~GetServiceResultAsyncRequest() +{} + +std::string GetServiceResultAsyncRequest::getServiceId()const +{ + return serviceId_; +} + +void GetServiceResultAsyncRequest::setServiceId(const std::string& serviceId) +{ + serviceId_ = serviceId; + setParameter("ServiceId", serviceId); +} + +std::string GetServiceResultAsyncRequest::getTaskId()const +{ + return taskId_; +} + +void GetServiceResultAsyncRequest::setTaskId(const std::string& taskId) +{ + taskId_ = taskId; + setParameter("TaskId", taskId); +} + diff --git a/industry-brain/src/model/GetServiceResultAsyncResult.cc b/industry-brain/src/model/GetServiceResultAsyncResult.cc new file mode 100644 index 000000000..6cf8e5c4b --- /dev/null +++ b/industry-brain/src/model/GetServiceResultAsyncResult.cc @@ -0,0 +1,65 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Industry_brain; +using namespace AlibabaCloud::Industry_brain::Model; + +GetServiceResultAsyncResult::GetServiceResultAsyncResult() : + ServiceResult() +{} + +GetServiceResultAsyncResult::GetServiceResultAsyncResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetServiceResultAsyncResult::~GetServiceResultAsyncResult() +{} + +void GetServiceResultAsyncResult::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(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string GetServiceResultAsyncResult::getMessage()const +{ + return message_; +} + +std::string GetServiceResultAsyncResult::getData()const +{ + return data_; +} + +std::string GetServiceResultAsyncResult::getCode()const +{ + return code_; +} + diff --git a/industry-brain/src/model/InvokeServiceAsyncRequest.cc b/industry-brain/src/model/InvokeServiceAsyncRequest.cc new file mode 100644 index 000000000..815d77e98 --- /dev/null +++ b/industry-brain/src/model/InvokeServiceAsyncRequest.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::Industry_brain::Model::InvokeServiceAsyncRequest; + +InvokeServiceAsyncRequest::InvokeServiceAsyncRequest() : + RpcServiceRequest("industry-brain", "2019-06-29", "InvokeServiceAsync") +{ + setMethod(HttpRequest::Method::Post); +} + +InvokeServiceAsyncRequest::~InvokeServiceAsyncRequest() +{} + +bool InvokeServiceAsyncRequest::getIsShowInput()const +{ + return isShowInput_; +} + +void InvokeServiceAsyncRequest::setIsShowInput(bool isShowInput) +{ + isShowInput_ = isShowInput; + setParameter("IsShowInput", isShowInput ? "true" : "false"); +} + +std::string InvokeServiceAsyncRequest::getServiceId()const +{ + return serviceId_; +} + +void InvokeServiceAsyncRequest::setServiceId(const std::string& serviceId) +{ + serviceId_ = serviceId; + setParameter("ServiceId", serviceId); +} + +std::string InvokeServiceAsyncRequest::getParams()const +{ + return params_; +} + +void InvokeServiceAsyncRequest::setParams(const std::string& params) +{ + params_ = params; + setParameter("Params", params); +} + +std::string InvokeServiceAsyncRequest::getRequestData()const +{ + return requestData_; +} + +void InvokeServiceAsyncRequest::setRequestData(const std::string& requestData) +{ + requestData_ = requestData; + setParameter("RequestData", requestData); +} + diff --git a/industry-brain/src/model/InvokeServiceAsyncResult.cc b/industry-brain/src/model/InvokeServiceAsyncResult.cc new file mode 100644 index 000000000..e92600a40 --- /dev/null +++ b/industry-brain/src/model/InvokeServiceAsyncResult.cc @@ -0,0 +1,65 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Industry_brain; +using namespace AlibabaCloud::Industry_brain::Model; + +InvokeServiceAsyncResult::InvokeServiceAsyncResult() : + ServiceResult() +{} + +InvokeServiceAsyncResult::InvokeServiceAsyncResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +InvokeServiceAsyncResult::~InvokeServiceAsyncResult() +{} + +void InvokeServiceAsyncResult::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(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string InvokeServiceAsyncResult::getMessage()const +{ + return message_; +} + +std::string InvokeServiceAsyncResult::getData()const +{ + return data_; +} + +std::string InvokeServiceAsyncResult::getCode()const +{ + return code_; +} + diff --git a/industry-brain/src/model/InvokeServiceRequest.cc b/industry-brain/src/model/InvokeServiceRequest.cc new file mode 100644 index 000000000..5a4e57943 --- /dev/null +++ b/industry-brain/src/model/InvokeServiceRequest.cc @@ -0,0 +1,106 @@ +/* + * 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::Industry_brain::Model::InvokeServiceRequest; + +InvokeServiceRequest::InvokeServiceRequest() : + RpcServiceRequest("industry-brain", "2019-06-29", "InvokeService") +{ + setMethod(HttpRequest::Method::Post); +} + +InvokeServiceRequest::~InvokeServiceRequest() +{} + +std::string InvokeServiceRequest::getRequestParams()const +{ + return requestParams_; +} + +void InvokeServiceRequest::setRequestParams(const std::string& requestParams) +{ + requestParams_ = requestParams; + setParameter("RequestParams", requestParams); +} + +bool InvokeServiceRequest::getShowBizInfo()const +{ + return showBizInfo_; +} + +void InvokeServiceRequest::setShowBizInfo(bool showBizInfo) +{ + showBizInfo_ = showBizInfo; + setParameter("ShowBizInfo", showBizInfo ? "true" : "false"); +} + +bool InvokeServiceRequest::getForceInvokeConfiguration()const +{ + return forceInvokeConfiguration_; +} + +void InvokeServiceRequest::setForceInvokeConfiguration(bool forceInvokeConfiguration) +{ + forceInvokeConfiguration_ = forceInvokeConfiguration; + setParameter("ForceInvokeConfiguration", forceInvokeConfiguration ? "true" : "false"); +} + +std::string InvokeServiceRequest::getContext()const +{ + return context_; +} + +void InvokeServiceRequest::setContext(const std::string& context) +{ + context_ = context; + setParameter("Context", context); +} + +std::string InvokeServiceRequest::getServiceId()const +{ + return serviceId_; +} + +void InvokeServiceRequest::setServiceId(const std::string& serviceId) +{ + serviceId_ = serviceId; + setParameter("ServiceId", serviceId); +} + +std::string InvokeServiceRequest::getRequestData()const +{ + return requestData_; +} + +void InvokeServiceRequest::setRequestData(const std::string& requestData) +{ + requestData_ = requestData; + setParameter("RequestData", requestData); +} + +bool InvokeServiceRequest::getShowParams()const +{ + return showParams_; +} + +void InvokeServiceRequest::setShowParams(bool showParams) +{ + showParams_ = showParams; + setParameter("ShowParams", showParams ? "true" : "false"); +} + diff --git a/industry-brain/src/model/InvokeServiceResult.cc b/industry-brain/src/model/InvokeServiceResult.cc new file mode 100644 index 000000000..3f9ae1aec --- /dev/null +++ b/industry-brain/src/model/InvokeServiceResult.cc @@ -0,0 +1,65 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Industry_brain; +using namespace AlibabaCloud::Industry_brain::Model; + +InvokeServiceResult::InvokeServiceResult() : + ServiceResult() +{} + +InvokeServiceResult::InvokeServiceResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +InvokeServiceResult::~InvokeServiceResult() +{} + +void InvokeServiceResult::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(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string InvokeServiceResult::getMessage()const +{ + return message_; +} + +std::string InvokeServiceResult::getData()const +{ + return data_; +} + +std::string InvokeServiceResult::getCode()const +{ + return code_; +} +