diff --git a/VERSION b/VERSION index 56f10811a..4db419c1c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.2017 \ No newline at end of file +1.36.2018 \ No newline at end of file diff --git a/aimath/CMakeLists.txt b/aimath/CMakeLists.txt new file mode 100644 index 000000000..539eed036 --- /dev/null +++ b/aimath/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(aimath_public_header + include/alibabacloud/aimath/AIMathClient.h + include/alibabacloud/aimath/AIMathExport.h ) + +set(aimath_public_header_model + include/alibabacloud/aimath/model/GenAnalysisRequest.h + include/alibabacloud/aimath/model/GenAnalysisResult.h + include/alibabacloud/aimath/model/GenStepRequest.h + include/alibabacloud/aimath/model/GenStepResult.h + include/alibabacloud/aimath/model/GlobalConfirmRequest.h + include/alibabacloud/aimath/model/GlobalConfirmResult.h + include/alibabacloud/aimath/model/UpdateAnalysisRequest.h + include/alibabacloud/aimath/model/UpdateAnalysisResult.h + include/alibabacloud/aimath/model/UpdateStepRequest.h + include/alibabacloud/aimath/model/UpdateStepResult.h ) + +set(aimath_src + src/AIMathClient.cc + src/model/GenAnalysisRequest.cc + src/model/GenAnalysisResult.cc + src/model/GenStepRequest.cc + src/model/GenStepResult.cc + src/model/GlobalConfirmRequest.cc + src/model/GlobalConfirmResult.cc + src/model/UpdateAnalysisRequest.cc + src/model/UpdateAnalysisResult.cc + src/model/UpdateStepRequest.cc + src/model/UpdateStepResult.cc ) + +add_library(aimath ${LIB_TYPE} + ${aimath_public_header} + ${aimath_public_header_model} + ${aimath_src}) + +set_target_properties(aimath + 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}aimath + ) + +if(${LIB_TYPE} STREQUAL "SHARED") + set_target_properties(aimath + PROPERTIES + DEFINE_SYMBOL ALIBABACLOUD_AIMATH_LIBRARY) +endif() + +target_include_directories(aimath + PRIVATE include + ${CMAKE_SOURCE_DIR}/core/include + ) +target_link_libraries(aimath + core) + +if(CMAKE_HOST_WIN32) + ExternalProject_Get_Property(jsoncpp INSTALL_DIR) + set(jsoncpp_install_dir ${INSTALL_DIR}) + add_dependencies(aimath + jsoncpp) + target_include_directories(aimath + PRIVATE ${jsoncpp_install_dir}/include) + target_link_libraries(aimath + ${jsoncpp_install_dir}/lib/jsoncpp.lib) + set_target_properties(aimath + PROPERTIES + COMPILE_OPTIONS "/bigobj") +else() + target_include_directories(aimath + PRIVATE /usr/include/jsoncpp) + target_link_libraries(aimath + jsoncpp) +endif() + +install(FILES ${aimath_public_header} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/aimath) +install(FILES ${aimath_public_header_model} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/aimath/model) +install(TARGETS aimath + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) \ No newline at end of file diff --git a/aimath/include/alibabacloud/aimath/AIMathClient.h b/aimath/include/alibabacloud/aimath/AIMathClient.h new file mode 100644 index 000000000..fcd3dfa85 --- /dev/null +++ b/aimath/include/alibabacloud/aimath/AIMathClient.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_AIMATH_AIMATHCLIENT_H_ +#define ALIBABACLOUD_AIMATH_AIMATHCLIENT_H_ + +#include +#include +#include +#include +#include "AIMathExport.h" +#include "model/GenAnalysisRequest.h" +#include "model/GenAnalysisResult.h" +#include "model/GenStepRequest.h" +#include "model/GenStepResult.h" +#include "model/GlobalConfirmRequest.h" +#include "model/GlobalConfirmResult.h" +#include "model/UpdateAnalysisRequest.h" +#include "model/UpdateAnalysisResult.h" +#include "model/UpdateStepRequest.h" +#include "model/UpdateStepResult.h" + + +namespace AlibabaCloud +{ + namespace AIMath + { + class ALIBABACLOUD_AIMATH_EXPORT AIMathClient : public RpcServiceClient + { + public: + typedef Outcome GenAnalysisOutcome; + typedef std::future GenAnalysisOutcomeCallable; + typedef std::function&)> GenAnalysisAsyncHandler; + typedef Outcome GenStepOutcome; + typedef std::future GenStepOutcomeCallable; + typedef std::function&)> GenStepAsyncHandler; + typedef Outcome GlobalConfirmOutcome; + typedef std::future GlobalConfirmOutcomeCallable; + typedef std::function&)> GlobalConfirmAsyncHandler; + typedef Outcome UpdateAnalysisOutcome; + typedef std::future UpdateAnalysisOutcomeCallable; + typedef std::function&)> UpdateAnalysisAsyncHandler; + typedef Outcome UpdateStepOutcome; + typedef std::future UpdateStepOutcomeCallable; + typedef std::function&)> UpdateStepAsyncHandler; + + AIMathClient(const Credentials &credentials, const ClientConfiguration &configuration); + AIMathClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); + AIMathClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); + ~AIMathClient(); + GenAnalysisOutcome genAnalysis(const Model::GenAnalysisRequest &request)const; + void genAnalysisAsync(const Model::GenAnalysisRequest& request, const GenAnalysisAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GenAnalysisOutcomeCallable genAnalysisCallable(const Model::GenAnalysisRequest& request) const; + GenStepOutcome genStep(const Model::GenStepRequest &request)const; + void genStepAsync(const Model::GenStepRequest& request, const GenStepAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GenStepOutcomeCallable genStepCallable(const Model::GenStepRequest& request) const; + GlobalConfirmOutcome globalConfirm(const Model::GlobalConfirmRequest &request)const; + void globalConfirmAsync(const Model::GlobalConfirmRequest& request, const GlobalConfirmAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GlobalConfirmOutcomeCallable globalConfirmCallable(const Model::GlobalConfirmRequest& request) const; + UpdateAnalysisOutcome updateAnalysis(const Model::UpdateAnalysisRequest &request)const; + void updateAnalysisAsync(const Model::UpdateAnalysisRequest& request, const UpdateAnalysisAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UpdateAnalysisOutcomeCallable updateAnalysisCallable(const Model::UpdateAnalysisRequest& request) const; + UpdateStepOutcome updateStep(const Model::UpdateStepRequest &request)const; + void updateStepAsync(const Model::UpdateStepRequest& request, const UpdateStepAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UpdateStepOutcomeCallable updateStepCallable(const Model::UpdateStepRequest& request) const; + + private: + std::shared_ptr endpointProvider_; + }; + } +} + +#endif // !ALIBABACLOUD_AIMATH_AIMATHCLIENT_H_ diff --git a/aimath/include/alibabacloud/aimath/AIMathExport.h b/aimath/include/alibabacloud/aimath/AIMathExport.h new file mode 100644 index 000000000..9d064a610 --- /dev/null +++ b/aimath/include/alibabacloud/aimath/AIMathExport.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_AIMATH_AIMATHEXPORT_H_ +#define ALIBABACLOUD_AIMATH_AIMATHEXPORT_H_ + +#include + +#if defined(ALIBABACLOUD_SHARED) +# if defined(ALIBABACLOUD_AIMATH_LIBRARY) +# define ALIBABACLOUD_AIMATH_EXPORT ALIBABACLOUD_DECL_EXPORT +# else +# define ALIBABACLOUD_AIMATH_EXPORT ALIBABACLOUD_DECL_IMPORT +# endif +#else +# define ALIBABACLOUD_AIMATH_EXPORT +#endif + +#endif // !ALIBABACLOUD_AIMATH_AIMATHEXPORT_H_ \ No newline at end of file diff --git a/aimath/include/alibabacloud/aimath/model/GenAnalysisRequest.h b/aimath/include/alibabacloud/aimath/model/GenAnalysisRequest.h new file mode 100644 index 000000000..ef201eff8 --- /dev/null +++ b/aimath/include/alibabacloud/aimath/model/GenAnalysisRequest.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_AIMATH_MODEL_GENANALYSISREQUEST_H_ +#define ALIBABACLOUD_AIMATH_MODEL_GENANALYSISREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace AIMath { +namespace Model { +class ALIBABACLOUD_AIMATH_EXPORT GenAnalysisRequest : public RpcServiceRequest { +public: + GenAnalysisRequest(); + ~GenAnalysisRequest(); + std::string getExerciseContent() const; + void setExerciseContent(const std::string &exerciseContent); + +private: + std::string exerciseContent_; +}; +} // namespace Model +} // namespace AIMath +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_AIMATH_MODEL_GENANALYSISREQUEST_H_ diff --git a/aimath/include/alibabacloud/aimath/model/GenAnalysisResult.h b/aimath/include/alibabacloud/aimath/model/GenAnalysisResult.h new file mode 100644 index 000000000..e604fe8d6 --- /dev/null +++ b/aimath/include/alibabacloud/aimath/model/GenAnalysisResult.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_AIMATH_MODEL_GENANALYSISRESULT_H_ +#define ALIBABACLOUD_AIMATH_MODEL_GENANALYSISRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace AIMath + { + namespace Model + { + class ALIBABACLOUD_AIMATH_EXPORT GenAnalysisResult : public ServiceResult + { + public: + + + GenAnalysisResult(); + explicit GenAnalysisResult(const std::string &payload); + ~GenAnalysisResult(); + std::string getEventType()const; + std::string getErrMsg()const; + std::string getContent()const; + std::string getErrCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string eventType_; + std::string errMsg_; + std::string content_; + std::string errCode_; + + }; + } + } +} +#endif // !ALIBABACLOUD_AIMATH_MODEL_GENANALYSISRESULT_H_ \ No newline at end of file diff --git a/aimath/include/alibabacloud/aimath/model/GenStepRequest.h b/aimath/include/alibabacloud/aimath/model/GenStepRequest.h new file mode 100644 index 000000000..6fae8becc --- /dev/null +++ b/aimath/include/alibabacloud/aimath/model/GenStepRequest.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_AIMATH_MODEL_GENSTEPREQUEST_H_ +#define ALIBABACLOUD_AIMATH_MODEL_GENSTEPREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace AIMath { +namespace Model { +class ALIBABACLOUD_AIMATH_EXPORT GenStepRequest : public RpcServiceRequest { +public: + GenStepRequest(); + ~GenStepRequest(); + std::string getExerciseCode() const; + void setExerciseCode(const std::string &exerciseCode); + +private: + std::string exerciseCode_; +}; +} // namespace Model +} // namespace AIMath +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_AIMATH_MODEL_GENSTEPREQUEST_H_ diff --git a/aimath/include/alibabacloud/aimath/model/GenStepResult.h b/aimath/include/alibabacloud/aimath/model/GenStepResult.h new file mode 100644 index 000000000..6e9d306c9 --- /dev/null +++ b/aimath/include/alibabacloud/aimath/model/GenStepResult.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_AIMATH_MODEL_GENSTEPRESULT_H_ +#define ALIBABACLOUD_AIMATH_MODEL_GENSTEPRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace AIMath + { + namespace Model + { + class ALIBABACLOUD_AIMATH_EXPORT GenStepResult : public ServiceResult + { + public: + + + GenStepResult(); + explicit GenStepResult(const std::string &payload); + ~GenStepResult(); + std::string getEventType()const; + std::string getErrMsg()const; + std::string getContent()const; + std::string getErrCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string eventType_; + std::string errMsg_; + std::string content_; + std::string errCode_; + + }; + } + } +} +#endif // !ALIBABACLOUD_AIMATH_MODEL_GENSTEPRESULT_H_ \ No newline at end of file diff --git a/aimath/include/alibabacloud/aimath/model/GlobalConfirmRequest.h b/aimath/include/alibabacloud/aimath/model/GlobalConfirmRequest.h new file mode 100644 index 000000000..3e4a20e2a --- /dev/null +++ b/aimath/include/alibabacloud/aimath/model/GlobalConfirmRequest.h @@ -0,0 +1,45 @@ +/* + * 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_AIMATH_MODEL_GLOBALCONFIRMREQUEST_H_ +#define ALIBABACLOUD_AIMATH_MODEL_GLOBALCONFIRMREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace AIMath { +namespace Model { +class ALIBABACLOUD_AIMATH_EXPORT GlobalConfirmRequest : public RpcServiceRequest { +public: + GlobalConfirmRequest(); + ~GlobalConfirmRequest(); + std::string getTag() const; + void setTag(const std::string &tag); + std::string getExerciseCode() const; + void setExerciseCode(const std::string &exerciseCode); + +private: + std::string tag_; + std::string exerciseCode_; +}; +} // namespace Model +} // namespace AIMath +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_AIMATH_MODEL_GLOBALCONFIRMREQUEST_H_ diff --git a/aimath/include/alibabacloud/aimath/model/GlobalConfirmResult.h b/aimath/include/alibabacloud/aimath/model/GlobalConfirmResult.h new file mode 100644 index 000000000..b6647c0bd --- /dev/null +++ b/aimath/include/alibabacloud/aimath/model/GlobalConfirmResult.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_AIMATH_MODEL_GLOBALCONFIRMRESULT_H_ +#define ALIBABACLOUD_AIMATH_MODEL_GLOBALCONFIRMRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace AIMath + { + namespace Model + { + class ALIBABACLOUD_AIMATH_EXPORT GlobalConfirmResult : public ServiceResult + { + public: + + + GlobalConfirmResult(); + explicit GlobalConfirmResult(const std::string &payload); + ~GlobalConfirmResult(); + std::string getErrMsg()const; + bool getSuccess()const; + std::string getErrCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string errMsg_; + bool success_; + std::string errCode_; + + }; + } + } +} +#endif // !ALIBABACLOUD_AIMATH_MODEL_GLOBALCONFIRMRESULT_H_ \ No newline at end of file diff --git a/aimath/include/alibabacloud/aimath/model/UpdateAnalysisRequest.h b/aimath/include/alibabacloud/aimath/model/UpdateAnalysisRequest.h new file mode 100644 index 000000000..bbff1cf71 --- /dev/null +++ b/aimath/include/alibabacloud/aimath/model/UpdateAnalysisRequest.h @@ -0,0 +1,48 @@ +/* + * 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_AIMATH_MODEL_UPDATEANALYSISREQUEST_H_ +#define ALIBABACLOUD_AIMATH_MODEL_UPDATEANALYSISREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace AIMath { +namespace Model { +class ALIBABACLOUD_AIMATH_EXPORT UpdateAnalysisRequest : public RpcServiceRequest { +public: + UpdateAnalysisRequest(); + ~UpdateAnalysisRequest(); + std::string getContent() const; + void setContent(const std::string &content); + std::string getContentCode() const; + void setContentCode(const std::string &contentCode); + std::string getExerciseCode() const; + void setExerciseCode(const std::string &exerciseCode); + +private: + std::string content_; + std::string contentCode_; + std::string exerciseCode_; +}; +} // namespace Model +} // namespace AIMath +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_AIMATH_MODEL_UPDATEANALYSISREQUEST_H_ diff --git a/aimath/include/alibabacloud/aimath/model/UpdateAnalysisResult.h b/aimath/include/alibabacloud/aimath/model/UpdateAnalysisResult.h new file mode 100644 index 000000000..15ab41c58 --- /dev/null +++ b/aimath/include/alibabacloud/aimath/model/UpdateAnalysisResult.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_AIMATH_MODEL_UPDATEANALYSISRESULT_H_ +#define ALIBABACLOUD_AIMATH_MODEL_UPDATEANALYSISRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace AIMath + { + namespace Model + { + class ALIBABACLOUD_AIMATH_EXPORT UpdateAnalysisResult : public ServiceResult + { + public: + + + UpdateAnalysisResult(); + explicit UpdateAnalysisResult(const std::string &payload); + ~UpdateAnalysisResult(); + std::string getErrMsg()const; + bool getSuccess()const; + std::string getErrCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string errMsg_; + bool success_; + std::string errCode_; + + }; + } + } +} +#endif // !ALIBABACLOUD_AIMATH_MODEL_UPDATEANALYSISRESULT_H_ \ No newline at end of file diff --git a/aimath/include/alibabacloud/aimath/model/UpdateStepRequest.h b/aimath/include/alibabacloud/aimath/model/UpdateStepRequest.h new file mode 100644 index 000000000..b880ba476 --- /dev/null +++ b/aimath/include/alibabacloud/aimath/model/UpdateStepRequest.h @@ -0,0 +1,48 @@ +/* + * 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_AIMATH_MODEL_UPDATESTEPREQUEST_H_ +#define ALIBABACLOUD_AIMATH_MODEL_UPDATESTEPREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace AIMath { +namespace Model { +class ALIBABACLOUD_AIMATH_EXPORT UpdateStepRequest : public RpcServiceRequest { +public: + UpdateStepRequest(); + ~UpdateStepRequest(); + std::string getContent() const; + void setContent(const std::string &content); + std::string getContentCode() const; + void setContentCode(const std::string &contentCode); + std::string getExerciseCode() const; + void setExerciseCode(const std::string &exerciseCode); + +private: + std::string content_; + std::string contentCode_; + std::string exerciseCode_; +}; +} // namespace Model +} // namespace AIMath +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_AIMATH_MODEL_UPDATESTEPREQUEST_H_ diff --git a/aimath/include/alibabacloud/aimath/model/UpdateStepResult.h b/aimath/include/alibabacloud/aimath/model/UpdateStepResult.h new file mode 100644 index 000000000..df3a89150 --- /dev/null +++ b/aimath/include/alibabacloud/aimath/model/UpdateStepResult.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_AIMATH_MODEL_UPDATESTEPRESULT_H_ +#define ALIBABACLOUD_AIMATH_MODEL_UPDATESTEPRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace AIMath + { + namespace Model + { + class ALIBABACLOUD_AIMATH_EXPORT UpdateStepResult : public ServiceResult + { + public: + + + UpdateStepResult(); + explicit UpdateStepResult(const std::string &payload); + ~UpdateStepResult(); + std::string getErrMsg()const; + bool getSuccess()const; + std::string getErrCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string errMsg_; + bool success_; + std::string errCode_; + + }; + } + } +} +#endif // !ALIBABACLOUD_AIMATH_MODEL_UPDATESTEPRESULT_H_ \ No newline at end of file diff --git a/aimath/src/AIMathClient.cc b/aimath/src/AIMathClient.cc new file mode 100644 index 000000000..d8a14f4ea --- /dev/null +++ b/aimath/src/AIMathClient.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::AIMath; +using namespace AlibabaCloud::AIMath::Model; + +namespace +{ + const std::string SERVICE_NAME = "AIMath"; +} + +AIMathClient::AIMathClient(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, ""); +} + +AIMathClient::AIMathClient(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, ""); +} + +AIMathClient::AIMathClient(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, ""); +} + +AIMathClient::~AIMathClient() +{} + +AIMathClient::GenAnalysisOutcome AIMathClient::genAnalysis(const GenAnalysisRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GenAnalysisOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GenAnalysisOutcome(GenAnalysisResult(outcome.result())); + else + return GenAnalysisOutcome(outcome.error()); +} + +void AIMathClient::genAnalysisAsync(const GenAnalysisRequest& request, const GenAnalysisAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, genAnalysis(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +AIMathClient::GenAnalysisOutcomeCallable AIMathClient::genAnalysisCallable(const GenAnalysisRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->genAnalysis(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +AIMathClient::GenStepOutcome AIMathClient::genStep(const GenStepRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GenStepOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GenStepOutcome(GenStepResult(outcome.result())); + else + return GenStepOutcome(outcome.error()); +} + +void AIMathClient::genStepAsync(const GenStepRequest& request, const GenStepAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, genStep(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +AIMathClient::GenStepOutcomeCallable AIMathClient::genStepCallable(const GenStepRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->genStep(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +AIMathClient::GlobalConfirmOutcome AIMathClient::globalConfirm(const GlobalConfirmRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GlobalConfirmOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GlobalConfirmOutcome(GlobalConfirmResult(outcome.result())); + else + return GlobalConfirmOutcome(outcome.error()); +} + +void AIMathClient::globalConfirmAsync(const GlobalConfirmRequest& request, const GlobalConfirmAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, globalConfirm(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +AIMathClient::GlobalConfirmOutcomeCallable AIMathClient::globalConfirmCallable(const GlobalConfirmRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->globalConfirm(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +AIMathClient::UpdateAnalysisOutcome AIMathClient::updateAnalysis(const UpdateAnalysisRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UpdateAnalysisOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UpdateAnalysisOutcome(UpdateAnalysisResult(outcome.result())); + else + return UpdateAnalysisOutcome(outcome.error()); +} + +void AIMathClient::updateAnalysisAsync(const UpdateAnalysisRequest& request, const UpdateAnalysisAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, updateAnalysis(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +AIMathClient::UpdateAnalysisOutcomeCallable AIMathClient::updateAnalysisCallable(const UpdateAnalysisRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->updateAnalysis(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +AIMathClient::UpdateStepOutcome AIMathClient::updateStep(const UpdateStepRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UpdateStepOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UpdateStepOutcome(UpdateStepResult(outcome.result())); + else + return UpdateStepOutcome(outcome.error()); +} + +void AIMathClient::updateStepAsync(const UpdateStepRequest& request, const UpdateStepAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, updateStep(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +AIMathClient::UpdateStepOutcomeCallable AIMathClient::updateStepCallable(const UpdateStepRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->updateStep(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + diff --git a/aimath/src/model/GenAnalysisRequest.cc b/aimath/src/model/GenAnalysisRequest.cc new file mode 100644 index 000000000..c410a4da6 --- /dev/null +++ b/aimath/src/model/GenAnalysisRequest.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::AIMath::Model::GenAnalysisRequest; + +GenAnalysisRequest::GenAnalysisRequest() + : RpcServiceRequest("aimath", "2024-11-14", "GenAnalysis") { + setMethod(HttpRequest::Method::Post); +} + +GenAnalysisRequest::~GenAnalysisRequest() {} + +std::string GenAnalysisRequest::getExerciseContent() const { + return exerciseContent_; +} + +void GenAnalysisRequest::setExerciseContent(const std::string &exerciseContent) { + exerciseContent_ = exerciseContent; + setBodyParameter(std::string("ExerciseContent"), exerciseContent); +} + diff --git a/aimath/src/model/GenAnalysisResult.cc b/aimath/src/model/GenAnalysisResult.cc new file mode 100644 index 000000000..583de4cbf --- /dev/null +++ b/aimath/src/model/GenAnalysisResult.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::AIMath; +using namespace AlibabaCloud::AIMath::Model; + +GenAnalysisResult::GenAnalysisResult() : + ServiceResult() +{} + +GenAnalysisResult::GenAnalysisResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GenAnalysisResult::~GenAnalysisResult() +{} + +void GenAnalysisResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["EventType"].isNull()) + eventType_ = value["EventType"].asString(); + if(!value["Content"].isNull()) + content_ = value["Content"].asString(); + if(!value["ErrCode"].isNull()) + errCode_ = value["ErrCode"].asString(); + if(!value["ErrMsg"].isNull()) + errMsg_ = value["ErrMsg"].asString(); + +} + +std::string GenAnalysisResult::getEventType()const +{ + return eventType_; +} + +std::string GenAnalysisResult::getErrMsg()const +{ + return errMsg_; +} + +std::string GenAnalysisResult::getContent()const +{ + return content_; +} + +std::string GenAnalysisResult::getErrCode()const +{ + return errCode_; +} + diff --git a/aimath/src/model/GenStepRequest.cc b/aimath/src/model/GenStepRequest.cc new file mode 100644 index 000000000..3abf96c14 --- /dev/null +++ b/aimath/src/model/GenStepRequest.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::AIMath::Model::GenStepRequest; + +GenStepRequest::GenStepRequest() + : RpcServiceRequest("aimath", "2024-11-14", "GenStep") { + setMethod(HttpRequest::Method::Post); +} + +GenStepRequest::~GenStepRequest() {} + +std::string GenStepRequest::getExerciseCode() const { + return exerciseCode_; +} + +void GenStepRequest::setExerciseCode(const std::string &exerciseCode) { + exerciseCode_ = exerciseCode; + setBodyParameter(std::string("ExerciseCode"), exerciseCode); +} + diff --git a/aimath/src/model/GenStepResult.cc b/aimath/src/model/GenStepResult.cc new file mode 100644 index 000000000..1b69dc1af --- /dev/null +++ b/aimath/src/model/GenStepResult.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::AIMath; +using namespace AlibabaCloud::AIMath::Model; + +GenStepResult::GenStepResult() : + ServiceResult() +{} + +GenStepResult::GenStepResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GenStepResult::~GenStepResult() +{} + +void GenStepResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["EventType"].isNull()) + eventType_ = value["EventType"].asString(); + if(!value["Content"].isNull()) + content_ = value["Content"].asString(); + if(!value["ErrCode"].isNull()) + errCode_ = value["ErrCode"].asString(); + if(!value["ErrMsg"].isNull()) + errMsg_ = value["ErrMsg"].asString(); + +} + +std::string GenStepResult::getEventType()const +{ + return eventType_; +} + +std::string GenStepResult::getErrMsg()const +{ + return errMsg_; +} + +std::string GenStepResult::getContent()const +{ + return content_; +} + +std::string GenStepResult::getErrCode()const +{ + return errCode_; +} + diff --git a/aimath/src/model/GlobalConfirmRequest.cc b/aimath/src/model/GlobalConfirmRequest.cc new file mode 100644 index 000000000..bce2dfec3 --- /dev/null +++ b/aimath/src/model/GlobalConfirmRequest.cc @@ -0,0 +1,45 @@ +/* + * 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::AIMath::Model::GlobalConfirmRequest; + +GlobalConfirmRequest::GlobalConfirmRequest() + : RpcServiceRequest("aimath", "2024-11-14", "GlobalConfirm") { + setMethod(HttpRequest::Method::Post); +} + +GlobalConfirmRequest::~GlobalConfirmRequest() {} + +std::string GlobalConfirmRequest::getTag() const { + return tag_; +} + +void GlobalConfirmRequest::setTag(const std::string &tag) { + tag_ = tag; + setBodyParameter(std::string("Tag"), tag); +} + +std::string GlobalConfirmRequest::getExerciseCode() const { + return exerciseCode_; +} + +void GlobalConfirmRequest::setExerciseCode(const std::string &exerciseCode) { + exerciseCode_ = exerciseCode; + setBodyParameter(std::string("ExerciseCode"), exerciseCode); +} + diff --git a/aimath/src/model/GlobalConfirmResult.cc b/aimath/src/model/GlobalConfirmResult.cc new file mode 100644 index 000000000..4aaf3e60c --- /dev/null +++ b/aimath/src/model/GlobalConfirmResult.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::AIMath; +using namespace AlibabaCloud::AIMath::Model; + +GlobalConfirmResult::GlobalConfirmResult() : + ServiceResult() +{} + +GlobalConfirmResult::GlobalConfirmResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GlobalConfirmResult::~GlobalConfirmResult() +{} + +void GlobalConfirmResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["ErrCode"].isNull()) + errCode_ = value["ErrCode"].asString(); + if(!value["ErrMsg"].isNull()) + errMsg_ = value["ErrMsg"].asString(); + +} + +std::string GlobalConfirmResult::getErrMsg()const +{ + return errMsg_; +} + +bool GlobalConfirmResult::getSuccess()const +{ + return success_; +} + +std::string GlobalConfirmResult::getErrCode()const +{ + return errCode_; +} + diff --git a/aimath/src/model/UpdateAnalysisRequest.cc b/aimath/src/model/UpdateAnalysisRequest.cc new file mode 100644 index 000000000..dd8037355 --- /dev/null +++ b/aimath/src/model/UpdateAnalysisRequest.cc @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::AIMath::Model::UpdateAnalysisRequest; + +UpdateAnalysisRequest::UpdateAnalysisRequest() + : RpcServiceRequest("aimath", "2024-11-14", "UpdateAnalysis") { + setMethod(HttpRequest::Method::Post); +} + +UpdateAnalysisRequest::~UpdateAnalysisRequest() {} + +std::string UpdateAnalysisRequest::getContent() const { + return content_; +} + +void UpdateAnalysisRequest::setContent(const std::string &content) { + content_ = content; + setBodyParameter(std::string("Content"), content); +} + +std::string UpdateAnalysisRequest::getContentCode() const { + return contentCode_; +} + +void UpdateAnalysisRequest::setContentCode(const std::string &contentCode) { + contentCode_ = contentCode; + setBodyParameter(std::string("ContentCode"), contentCode); +} + +std::string UpdateAnalysisRequest::getExerciseCode() const { + return exerciseCode_; +} + +void UpdateAnalysisRequest::setExerciseCode(const std::string &exerciseCode) { + exerciseCode_ = exerciseCode; + setBodyParameter(std::string("ExerciseCode"), exerciseCode); +} + diff --git a/aimath/src/model/UpdateAnalysisResult.cc b/aimath/src/model/UpdateAnalysisResult.cc new file mode 100644 index 000000000..1b6e362d4 --- /dev/null +++ b/aimath/src/model/UpdateAnalysisResult.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::AIMath; +using namespace AlibabaCloud::AIMath::Model; + +UpdateAnalysisResult::UpdateAnalysisResult() : + ServiceResult() +{} + +UpdateAnalysisResult::UpdateAnalysisResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UpdateAnalysisResult::~UpdateAnalysisResult() +{} + +void UpdateAnalysisResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["ErrCode"].isNull()) + errCode_ = value["ErrCode"].asString(); + if(!value["ErrMsg"].isNull()) + errMsg_ = value["ErrMsg"].asString(); + +} + +std::string UpdateAnalysisResult::getErrMsg()const +{ + return errMsg_; +} + +bool UpdateAnalysisResult::getSuccess()const +{ + return success_; +} + +std::string UpdateAnalysisResult::getErrCode()const +{ + return errCode_; +} + diff --git a/aimath/src/model/UpdateStepRequest.cc b/aimath/src/model/UpdateStepRequest.cc new file mode 100644 index 000000000..f63d3ffc4 --- /dev/null +++ b/aimath/src/model/UpdateStepRequest.cc @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::AIMath::Model::UpdateStepRequest; + +UpdateStepRequest::UpdateStepRequest() + : RpcServiceRequest("aimath", "2024-11-14", "UpdateStep") { + setMethod(HttpRequest::Method::Post); +} + +UpdateStepRequest::~UpdateStepRequest() {} + +std::string UpdateStepRequest::getContent() const { + return content_; +} + +void UpdateStepRequest::setContent(const std::string &content) { + content_ = content; + setBodyParameter(std::string("Content"), content); +} + +std::string UpdateStepRequest::getContentCode() const { + return contentCode_; +} + +void UpdateStepRequest::setContentCode(const std::string &contentCode) { + contentCode_ = contentCode; + setBodyParameter(std::string("ContentCode"), contentCode); +} + +std::string UpdateStepRequest::getExerciseCode() const { + return exerciseCode_; +} + +void UpdateStepRequest::setExerciseCode(const std::string &exerciseCode) { + exerciseCode_ = exerciseCode; + setBodyParameter(std::string("ExerciseCode"), exerciseCode); +} + diff --git a/aimath/src/model/UpdateStepResult.cc b/aimath/src/model/UpdateStepResult.cc new file mode 100644 index 000000000..7f4ed3a57 --- /dev/null +++ b/aimath/src/model/UpdateStepResult.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::AIMath; +using namespace AlibabaCloud::AIMath::Model; + +UpdateStepResult::UpdateStepResult() : + ServiceResult() +{} + +UpdateStepResult::UpdateStepResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UpdateStepResult::~UpdateStepResult() +{} + +void UpdateStepResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["ErrCode"].isNull()) + errCode_ = value["ErrCode"].asString(); + if(!value["ErrMsg"].isNull()) + errMsg_ = value["ErrMsg"].asString(); + +} + +std::string UpdateStepResult::getErrMsg()const +{ + return errMsg_; +} + +bool UpdateStepResult::getSuccess()const +{ + return success_; +} + +std::string UpdateStepResult::getErrCode()const +{ + return errCode_; +} +