Compare commits

..

1 Commits

Author SHA1 Message Date
sdk-team
055e9fa24d Init. 2024-11-19 08:27:29 +00:00
25 changed files with 1522 additions and 1 deletions

View File

@@ -1 +1 @@
1.36.2017
1.36.2018

102
aimath/CMakeLists.txt Normal file
View File

@@ -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}
)

View File

@@ -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 <future>
#include <alibabacloud/core/AsyncCallerContext.h>
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RpcServiceClient.h>
#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<Error, Model::GenAnalysisResult> GenAnalysisOutcome;
typedef std::future<GenAnalysisOutcome> GenAnalysisOutcomeCallable;
typedef std::function<void(const AIMathClient*, const Model::GenAnalysisRequest&, const GenAnalysisOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GenAnalysisAsyncHandler;
typedef Outcome<Error, Model::GenStepResult> GenStepOutcome;
typedef std::future<GenStepOutcome> GenStepOutcomeCallable;
typedef std::function<void(const AIMathClient*, const Model::GenStepRequest&, const GenStepOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GenStepAsyncHandler;
typedef Outcome<Error, Model::GlobalConfirmResult> GlobalConfirmOutcome;
typedef std::future<GlobalConfirmOutcome> GlobalConfirmOutcomeCallable;
typedef std::function<void(const AIMathClient*, const Model::GlobalConfirmRequest&, const GlobalConfirmOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GlobalConfirmAsyncHandler;
typedef Outcome<Error, Model::UpdateAnalysisResult> UpdateAnalysisOutcome;
typedef std::future<UpdateAnalysisOutcome> UpdateAnalysisOutcomeCallable;
typedef std::function<void(const AIMathClient*, const Model::UpdateAnalysisRequest&, const UpdateAnalysisOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateAnalysisAsyncHandler;
typedef Outcome<Error, Model::UpdateStepResult> UpdateStepOutcome;
typedef std::future<UpdateStepOutcome> UpdateStepOutcomeCallable;
typedef std::function<void(const AIMathClient*, const Model::UpdateStepRequest&, const UpdateStepOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateStepAsyncHandler;
AIMathClient(const Credentials &credentials, const ClientConfiguration &configuration);
AIMathClient(const std::shared_ptr<CredentialsProvider> &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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& context = nullptr) const;
UpdateStepOutcomeCallable updateStepCallable(const Model::UpdateStepRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;
};
}
}
#endif // !ALIBABACLOUD_AIMATH_AIMATHCLIENT_H_

View File

@@ -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 <alibabacloud/core/Global.h>
#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_

View File

@@ -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 <alibabacloud/aimath/AIMathExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
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_

View File

@@ -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 <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aimath/AIMathExport.h>
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_

View File

@@ -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 <alibabacloud/aimath/AIMathExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
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_

View File

@@ -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 <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aimath/AIMathExport.h>
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_

View File

@@ -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 <alibabacloud/aimath/AIMathExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
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_

View File

@@ -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 <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aimath/AIMathExport.h>
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_

View File

@@ -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 <alibabacloud/aimath/AIMathExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
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_

View File

@@ -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 <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aimath/AIMathExport.h>
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_

View File

@@ -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 <alibabacloud/aimath/AIMathExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
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_

View File

@@ -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 <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aimath/AIMathExport.h>
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_

233
aimath/src/AIMathClient.cc Normal file
View File

@@ -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 <alibabacloud/aimath/AIMathClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
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<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
AIMathClient::AIMathClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
AIMathClient::AIMathClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(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<const AsyncCallerContext>& 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<std::packaged_task<GenAnalysisOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<GenStepOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<GlobalConfirmOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<UpdateAnalysisOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<UpdateStepOutcome()>>(
[this, request]()
{
return this->updateStep(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -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 <alibabacloud/aimath/model/GenAnalysisRequest.h>
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);
}

View File

@@ -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 <alibabacloud/aimath/model/GenAnalysisResult.h>
#include <json/json.h>
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_;
}

View File

@@ -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 <alibabacloud/aimath/model/GenStepRequest.h>
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);
}

View File

@@ -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 <alibabacloud/aimath/model/GenStepResult.h>
#include <json/json.h>
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_;
}

View File

@@ -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 <alibabacloud/aimath/model/GlobalConfirmRequest.h>
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);
}

View File

@@ -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 <alibabacloud/aimath/model/GlobalConfirmResult.h>
#include <json/json.h>
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_;
}

View File

@@ -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 <alibabacloud/aimath/model/UpdateAnalysisRequest.h>
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);
}

View File

@@ -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 <alibabacloud/aimath/model/UpdateAnalysisResult.h>
#include <json/json.h>
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_;
}

View File

@@ -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 <alibabacloud/aimath/model/UpdateStepRequest.h>
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);
}

View File

@@ -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 <alibabacloud/aimath/model/UpdateStepResult.h>
#include <json/json.h>
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_;
}