Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e2ee6d530 | ||
|
|
51d167c03c | ||
|
|
f6470e6c02 | ||
|
|
d77681a132 | ||
|
|
7ceaff6c6e | ||
|
|
5048e01469 | ||
|
|
322f1ef667 | ||
|
|
b52edc6252 | ||
|
|
ac468a852e | ||
|
|
6abf1431b6 | ||
|
|
f22a078c0d | ||
|
|
5b357e5604 | ||
|
|
479a50df98 |
134
anytrans/CMakeLists.txt
Normal file
134
anytrans/CMakeLists.txt
Normal file
@@ -0,0 +1,134 @@
|
||||
#
|
||||
# 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(anytrans_public_header
|
||||
include/alibabacloud/anytrans/AnyTransClient.h
|
||||
include/alibabacloud/anytrans/AnyTransExport.h )
|
||||
|
||||
set(anytrans_public_header_model
|
||||
include/alibabacloud/anytrans/model/BatchTranslateRequest.h
|
||||
include/alibabacloud/anytrans/model/BatchTranslateResult.h
|
||||
include/alibabacloud/anytrans/model/BatchTranslateForHtmlRequest.h
|
||||
include/alibabacloud/anytrans/model/BatchTranslateForHtmlResult.h
|
||||
include/alibabacloud/anytrans/model/GetDocTranslateTaskRequest.h
|
||||
include/alibabacloud/anytrans/model/GetDocTranslateTaskResult.h
|
||||
include/alibabacloud/anytrans/model/GetHtmlTranslateTaskRequest.h
|
||||
include/alibabacloud/anytrans/model/GetHtmlTranslateTaskResult.h
|
||||
include/alibabacloud/anytrans/model/GetImageTranslateTaskRequest.h
|
||||
include/alibabacloud/anytrans/model/GetImageTranslateTaskResult.h
|
||||
include/alibabacloud/anytrans/model/GetLongTextTranslateTaskRequest.h
|
||||
include/alibabacloud/anytrans/model/GetLongTextTranslateTaskResult.h
|
||||
include/alibabacloud/anytrans/model/SubmitDocTranslateTaskRequest.h
|
||||
include/alibabacloud/anytrans/model/SubmitDocTranslateTaskResult.h
|
||||
include/alibabacloud/anytrans/model/SubmitHtmlTranslateTaskRequest.h
|
||||
include/alibabacloud/anytrans/model/SubmitHtmlTranslateTaskResult.h
|
||||
include/alibabacloud/anytrans/model/SubmitImageTranslateTaskRequest.h
|
||||
include/alibabacloud/anytrans/model/SubmitImageTranslateTaskResult.h
|
||||
include/alibabacloud/anytrans/model/SubmitLongTextTranslateTaskRequest.h
|
||||
include/alibabacloud/anytrans/model/SubmitLongTextTranslateTaskResult.h
|
||||
include/alibabacloud/anytrans/model/TermEditRequest.h
|
||||
include/alibabacloud/anytrans/model/TermEditResult.h
|
||||
include/alibabacloud/anytrans/model/TermQueryRequest.h
|
||||
include/alibabacloud/anytrans/model/TermQueryResult.h
|
||||
include/alibabacloud/anytrans/model/TextTranslateRequest.h
|
||||
include/alibabacloud/anytrans/model/TextTranslateResult.h )
|
||||
|
||||
set(anytrans_src
|
||||
src/AnyTransClient.cc
|
||||
src/model/BatchTranslateRequest.cc
|
||||
src/model/BatchTranslateResult.cc
|
||||
src/model/BatchTranslateForHtmlRequest.cc
|
||||
src/model/BatchTranslateForHtmlResult.cc
|
||||
src/model/GetDocTranslateTaskRequest.cc
|
||||
src/model/GetDocTranslateTaskResult.cc
|
||||
src/model/GetHtmlTranslateTaskRequest.cc
|
||||
src/model/GetHtmlTranslateTaskResult.cc
|
||||
src/model/GetImageTranslateTaskRequest.cc
|
||||
src/model/GetImageTranslateTaskResult.cc
|
||||
src/model/GetLongTextTranslateTaskRequest.cc
|
||||
src/model/GetLongTextTranslateTaskResult.cc
|
||||
src/model/SubmitDocTranslateTaskRequest.cc
|
||||
src/model/SubmitDocTranslateTaskResult.cc
|
||||
src/model/SubmitHtmlTranslateTaskRequest.cc
|
||||
src/model/SubmitHtmlTranslateTaskResult.cc
|
||||
src/model/SubmitImageTranslateTaskRequest.cc
|
||||
src/model/SubmitImageTranslateTaskResult.cc
|
||||
src/model/SubmitLongTextTranslateTaskRequest.cc
|
||||
src/model/SubmitLongTextTranslateTaskResult.cc
|
||||
src/model/TermEditRequest.cc
|
||||
src/model/TermEditResult.cc
|
||||
src/model/TermQueryRequest.cc
|
||||
src/model/TermQueryResult.cc
|
||||
src/model/TextTranslateRequest.cc
|
||||
src/model/TextTranslateResult.cc )
|
||||
|
||||
add_library(anytrans ${LIB_TYPE}
|
||||
${anytrans_public_header}
|
||||
${anytrans_public_header_model}
|
||||
${anytrans_src})
|
||||
|
||||
set_target_properties(anytrans
|
||||
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}anytrans
|
||||
)
|
||||
|
||||
if(${LIB_TYPE} STREQUAL "SHARED")
|
||||
set_target_properties(anytrans
|
||||
PROPERTIES
|
||||
DEFINE_SYMBOL ALIBABACLOUD_ANYTRANS_LIBRARY)
|
||||
endif()
|
||||
|
||||
target_include_directories(anytrans
|
||||
PRIVATE include
|
||||
${CMAKE_SOURCE_DIR}/core/include
|
||||
)
|
||||
target_link_libraries(anytrans
|
||||
core)
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
|
||||
set(jsoncpp_install_dir ${INSTALL_DIR})
|
||||
add_dependencies(anytrans
|
||||
jsoncpp)
|
||||
target_include_directories(anytrans
|
||||
PRIVATE ${jsoncpp_install_dir}/include)
|
||||
target_link_libraries(anytrans
|
||||
${jsoncpp_install_dir}/lib/jsoncpp.lib)
|
||||
set_target_properties(anytrans
|
||||
PROPERTIES
|
||||
COMPILE_OPTIONS "/bigobj")
|
||||
else()
|
||||
target_include_directories(anytrans
|
||||
PRIVATE /usr/include/jsoncpp)
|
||||
target_link_libraries(anytrans
|
||||
jsoncpp)
|
||||
endif()
|
||||
|
||||
install(FILES ${anytrans_public_header}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/anytrans)
|
||||
install(FILES ${anytrans_public_header_model}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/anytrans/model)
|
||||
install(TARGETS anytrans
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
150
anytrans/include/alibabacloud/anytrans/AnyTransClient.h
Normal file
150
anytrans/include/alibabacloud/anytrans/AnyTransClient.h
Normal file
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* 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_ANYTRANS_ANYTRANSCLIENT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_ANYTRANSCLIENT_H_
|
||||
|
||||
#include <future>
|
||||
#include <alibabacloud/core/AsyncCallerContext.h>
|
||||
#include <alibabacloud/core/EndpointProvider.h>
|
||||
#include <alibabacloud/core/RoaServiceClient.h>
|
||||
#include "AnyTransExport.h"
|
||||
#include "model/BatchTranslateRequest.h"
|
||||
#include "model/BatchTranslateResult.h"
|
||||
#include "model/BatchTranslateForHtmlRequest.h"
|
||||
#include "model/BatchTranslateForHtmlResult.h"
|
||||
#include "model/GetDocTranslateTaskRequest.h"
|
||||
#include "model/GetDocTranslateTaskResult.h"
|
||||
#include "model/GetHtmlTranslateTaskRequest.h"
|
||||
#include "model/GetHtmlTranslateTaskResult.h"
|
||||
#include "model/GetImageTranslateTaskRequest.h"
|
||||
#include "model/GetImageTranslateTaskResult.h"
|
||||
#include "model/GetLongTextTranslateTaskRequest.h"
|
||||
#include "model/GetLongTextTranslateTaskResult.h"
|
||||
#include "model/SubmitDocTranslateTaskRequest.h"
|
||||
#include "model/SubmitDocTranslateTaskResult.h"
|
||||
#include "model/SubmitHtmlTranslateTaskRequest.h"
|
||||
#include "model/SubmitHtmlTranslateTaskResult.h"
|
||||
#include "model/SubmitImageTranslateTaskRequest.h"
|
||||
#include "model/SubmitImageTranslateTaskResult.h"
|
||||
#include "model/SubmitLongTextTranslateTaskRequest.h"
|
||||
#include "model/SubmitLongTextTranslateTaskResult.h"
|
||||
#include "model/TermEditRequest.h"
|
||||
#include "model/TermEditResult.h"
|
||||
#include "model/TermQueryRequest.h"
|
||||
#include "model/TermQueryResult.h"
|
||||
#include "model/TextTranslateRequest.h"
|
||||
#include "model/TextTranslateResult.h"
|
||||
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT AnyTransClient : public RoaServiceClient
|
||||
{
|
||||
public:
|
||||
typedef Outcome<Error, Model::BatchTranslateResult> BatchTranslateOutcome;
|
||||
typedef std::future<BatchTranslateOutcome> BatchTranslateOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::BatchTranslateRequest&, const BatchTranslateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BatchTranslateAsyncHandler;
|
||||
typedef Outcome<Error, Model::BatchTranslateForHtmlResult> BatchTranslateForHtmlOutcome;
|
||||
typedef std::future<BatchTranslateForHtmlOutcome> BatchTranslateForHtmlOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::BatchTranslateForHtmlRequest&, const BatchTranslateForHtmlOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BatchTranslateForHtmlAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetDocTranslateTaskResult> GetDocTranslateTaskOutcome;
|
||||
typedef std::future<GetDocTranslateTaskOutcome> GetDocTranslateTaskOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::GetDocTranslateTaskRequest&, const GetDocTranslateTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetDocTranslateTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetHtmlTranslateTaskResult> GetHtmlTranslateTaskOutcome;
|
||||
typedef std::future<GetHtmlTranslateTaskOutcome> GetHtmlTranslateTaskOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::GetHtmlTranslateTaskRequest&, const GetHtmlTranslateTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetHtmlTranslateTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetImageTranslateTaskResult> GetImageTranslateTaskOutcome;
|
||||
typedef std::future<GetImageTranslateTaskOutcome> GetImageTranslateTaskOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::GetImageTranslateTaskRequest&, const GetImageTranslateTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetImageTranslateTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetLongTextTranslateTaskResult> GetLongTextTranslateTaskOutcome;
|
||||
typedef std::future<GetLongTextTranslateTaskOutcome> GetLongTextTranslateTaskOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::GetLongTextTranslateTaskRequest&, const GetLongTextTranslateTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetLongTextTranslateTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::SubmitDocTranslateTaskResult> SubmitDocTranslateTaskOutcome;
|
||||
typedef std::future<SubmitDocTranslateTaskOutcome> SubmitDocTranslateTaskOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::SubmitDocTranslateTaskRequest&, const SubmitDocTranslateTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SubmitDocTranslateTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::SubmitHtmlTranslateTaskResult> SubmitHtmlTranslateTaskOutcome;
|
||||
typedef std::future<SubmitHtmlTranslateTaskOutcome> SubmitHtmlTranslateTaskOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::SubmitHtmlTranslateTaskRequest&, const SubmitHtmlTranslateTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SubmitHtmlTranslateTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::SubmitImageTranslateTaskResult> SubmitImageTranslateTaskOutcome;
|
||||
typedef std::future<SubmitImageTranslateTaskOutcome> SubmitImageTranslateTaskOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::SubmitImageTranslateTaskRequest&, const SubmitImageTranslateTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SubmitImageTranslateTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::SubmitLongTextTranslateTaskResult> SubmitLongTextTranslateTaskOutcome;
|
||||
typedef std::future<SubmitLongTextTranslateTaskOutcome> SubmitLongTextTranslateTaskOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::SubmitLongTextTranslateTaskRequest&, const SubmitLongTextTranslateTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SubmitLongTextTranslateTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::TermEditResult> TermEditOutcome;
|
||||
typedef std::future<TermEditOutcome> TermEditOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::TermEditRequest&, const TermEditOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> TermEditAsyncHandler;
|
||||
typedef Outcome<Error, Model::TermQueryResult> TermQueryOutcome;
|
||||
typedef std::future<TermQueryOutcome> TermQueryOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::TermQueryRequest&, const TermQueryOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> TermQueryAsyncHandler;
|
||||
typedef Outcome<Error, Model::TextTranslateResult> TextTranslateOutcome;
|
||||
typedef std::future<TextTranslateOutcome> TextTranslateOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::TextTranslateRequest&, const TextTranslateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> TextTranslateAsyncHandler;
|
||||
|
||||
AnyTransClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||
AnyTransClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||
AnyTransClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||
~AnyTransClient();
|
||||
BatchTranslateOutcome batchTranslate(const Model::BatchTranslateRequest &request)const;
|
||||
void batchTranslateAsync(const Model::BatchTranslateRequest& request, const BatchTranslateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
BatchTranslateOutcomeCallable batchTranslateCallable(const Model::BatchTranslateRequest& request) const;
|
||||
BatchTranslateForHtmlOutcome batchTranslateForHtml(const Model::BatchTranslateForHtmlRequest &request)const;
|
||||
void batchTranslateForHtmlAsync(const Model::BatchTranslateForHtmlRequest& request, const BatchTranslateForHtmlAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
BatchTranslateForHtmlOutcomeCallable batchTranslateForHtmlCallable(const Model::BatchTranslateForHtmlRequest& request) const;
|
||||
GetDocTranslateTaskOutcome getDocTranslateTask(const Model::GetDocTranslateTaskRequest &request)const;
|
||||
void getDocTranslateTaskAsync(const Model::GetDocTranslateTaskRequest& request, const GetDocTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetDocTranslateTaskOutcomeCallable getDocTranslateTaskCallable(const Model::GetDocTranslateTaskRequest& request) const;
|
||||
GetHtmlTranslateTaskOutcome getHtmlTranslateTask(const Model::GetHtmlTranslateTaskRequest &request)const;
|
||||
void getHtmlTranslateTaskAsync(const Model::GetHtmlTranslateTaskRequest& request, const GetHtmlTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetHtmlTranslateTaskOutcomeCallable getHtmlTranslateTaskCallable(const Model::GetHtmlTranslateTaskRequest& request) const;
|
||||
GetImageTranslateTaskOutcome getImageTranslateTask(const Model::GetImageTranslateTaskRequest &request)const;
|
||||
void getImageTranslateTaskAsync(const Model::GetImageTranslateTaskRequest& request, const GetImageTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetImageTranslateTaskOutcomeCallable getImageTranslateTaskCallable(const Model::GetImageTranslateTaskRequest& request) const;
|
||||
GetLongTextTranslateTaskOutcome getLongTextTranslateTask(const Model::GetLongTextTranslateTaskRequest &request)const;
|
||||
void getLongTextTranslateTaskAsync(const Model::GetLongTextTranslateTaskRequest& request, const GetLongTextTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetLongTextTranslateTaskOutcomeCallable getLongTextTranslateTaskCallable(const Model::GetLongTextTranslateTaskRequest& request) const;
|
||||
SubmitDocTranslateTaskOutcome submitDocTranslateTask(const Model::SubmitDocTranslateTaskRequest &request)const;
|
||||
void submitDocTranslateTaskAsync(const Model::SubmitDocTranslateTaskRequest& request, const SubmitDocTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
SubmitDocTranslateTaskOutcomeCallable submitDocTranslateTaskCallable(const Model::SubmitDocTranslateTaskRequest& request) const;
|
||||
SubmitHtmlTranslateTaskOutcome submitHtmlTranslateTask(const Model::SubmitHtmlTranslateTaskRequest &request)const;
|
||||
void submitHtmlTranslateTaskAsync(const Model::SubmitHtmlTranslateTaskRequest& request, const SubmitHtmlTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
SubmitHtmlTranslateTaskOutcomeCallable submitHtmlTranslateTaskCallable(const Model::SubmitHtmlTranslateTaskRequest& request) const;
|
||||
SubmitImageTranslateTaskOutcome submitImageTranslateTask(const Model::SubmitImageTranslateTaskRequest &request)const;
|
||||
void submitImageTranslateTaskAsync(const Model::SubmitImageTranslateTaskRequest& request, const SubmitImageTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
SubmitImageTranslateTaskOutcomeCallable submitImageTranslateTaskCallable(const Model::SubmitImageTranslateTaskRequest& request) const;
|
||||
SubmitLongTextTranslateTaskOutcome submitLongTextTranslateTask(const Model::SubmitLongTextTranslateTaskRequest &request)const;
|
||||
void submitLongTextTranslateTaskAsync(const Model::SubmitLongTextTranslateTaskRequest& request, const SubmitLongTextTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
SubmitLongTextTranslateTaskOutcomeCallable submitLongTextTranslateTaskCallable(const Model::SubmitLongTextTranslateTaskRequest& request) const;
|
||||
TermEditOutcome termEdit(const Model::TermEditRequest &request)const;
|
||||
void termEditAsync(const Model::TermEditRequest& request, const TermEditAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
TermEditOutcomeCallable termEditCallable(const Model::TermEditRequest& request) const;
|
||||
TermQueryOutcome termQuery(const Model::TermQueryRequest &request)const;
|
||||
void termQueryAsync(const Model::TermQueryRequest& request, const TermQueryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
TermQueryOutcomeCallable termQueryCallable(const Model::TermQueryRequest& request) const;
|
||||
TextTranslateOutcome textTranslate(const Model::TextTranslateRequest &request)const;
|
||||
void textTranslateAsync(const Model::TextTranslateRequest& request, const TextTranslateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
TextTranslateOutcomeCallable textTranslateCallable(const Model::TextTranslateRequest& request) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_ANYTRANSCLIENT_H_
|
||||
32
anytrans/include/alibabacloud/anytrans/AnyTransExport.h
Normal file
32
anytrans/include/alibabacloud/anytrans/AnyTransExport.h
Normal 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_ANYTRANS_ANYTRANSEXPORT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_ANYTRANSEXPORT_H_
|
||||
|
||||
#include <alibabacloud/core/Global.h>
|
||||
|
||||
#if defined(ALIBABACLOUD_SHARED)
|
||||
# if defined(ALIBABACLOUD_ANYTRANS_LIBRARY)
|
||||
# define ALIBABACLOUD_ANYTRANS_EXPORT ALIBABACLOUD_DECL_EXPORT
|
||||
# else
|
||||
# define ALIBABACLOUD_ANYTRANS_EXPORT ALIBABACLOUD_DECL_IMPORT
|
||||
# endif
|
||||
#else
|
||||
# define ALIBABACLOUD_ANYTRANS_EXPORT
|
||||
#endif
|
||||
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_ANYTRANSEXPORT_H_
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* 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_ANYTRANS_MODEL_BATCHTRANSLATEFORHTMLREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_BATCHTRANSLATEFORHTMLREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT BatchTranslateForHtmlRequest : public RoaServiceRequest {
|
||||
public:
|
||||
struct Ext {
|
||||
std::string string;
|
||||
std::vector<std::string> sensitives;
|
||||
struct TerminologiesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
terminologiesItem terminologiesItem;
|
||||
std::vector<terminologiesItem> terminologies;
|
||||
struct TextTransform {
|
||||
bool toLower;
|
||||
bool toUpper;
|
||||
bool toTitle;
|
||||
};
|
||||
textTransform textTransform;
|
||||
struct ExamplesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
examplesItem examplesItem;
|
||||
std::vector<examplesItem> examples;
|
||||
struct Config {
|
||||
bool skipCsiCheck;
|
||||
};
|
||||
config config;
|
||||
std::string domainHint;
|
||||
};
|
||||
BatchTranslateForHtmlRequest();
|
||||
~BatchTranslateForHtmlRequest();
|
||||
ext getExt() const;
|
||||
void setExt(const ext &ext);
|
||||
std::string getSourceLanguage() const;
|
||||
void setSourceLanguage(const std::string &sourceLanguage);
|
||||
std::string getFormat() const;
|
||||
void setFormat(const std::string &format);
|
||||
std::string getScene() const;
|
||||
void setScene(const std::string &scene);
|
||||
std::string getAppName() const;
|
||||
void setAppName(const std::string &appName);
|
||||
std::string getTargetLanguage() const;
|
||||
void setTargetLanguage(const std::string &targetLanguage);
|
||||
std::map<std::string, std::string> getText() const;
|
||||
void setText(const std::map<std::string, std::string> &text);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
ext ext_;
|
||||
std::string sourceLanguage_;
|
||||
std::string format_;
|
||||
std::string scene_;
|
||||
std::string appName_;
|
||||
std::string targetLanguage_;
|
||||
std::map<std::string, std::string> text_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_BATCHTRANSLATEFORHTMLREQUEST_H_
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* 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_ANYTRANS_MODEL_BATCHTRANSLATEFORHTMLRESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_BATCHTRANSLATEFORHTMLRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT BatchTranslateForHtmlResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct TranslationListItem
|
||||
{
|
||||
struct Usage
|
||||
{
|
||||
long inputTokens;
|
||||
long totalTokens;
|
||||
long outputTokens;
|
||||
};
|
||||
Usage usage;
|
||||
std::string translation;
|
||||
std::string message;
|
||||
std::string index;
|
||||
long code;
|
||||
};
|
||||
std::vector<TranslationListItem> translationList;
|
||||
};
|
||||
|
||||
|
||||
BatchTranslateForHtmlResult();
|
||||
explicit BatchTranslateForHtmlResult(const std::string &payload);
|
||||
~BatchTranslateForHtmlResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_BATCHTRANSLATEFORHTMLRESULT_H_
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* 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_ANYTRANS_MODEL_BATCHTRANSLATEREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_BATCHTRANSLATEREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT BatchTranslateRequest : public RoaServiceRequest {
|
||||
public:
|
||||
struct Ext {
|
||||
std::string string;
|
||||
std::vector<std::string> sensitives;
|
||||
struct TerminologiesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
terminologiesItem terminologiesItem;
|
||||
std::vector<terminologiesItem> terminologies;
|
||||
struct TextTransform {
|
||||
bool toLower;
|
||||
bool toUpper;
|
||||
bool toTitle;
|
||||
};
|
||||
textTransform textTransform;
|
||||
struct ExamplesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
examplesItem examplesItem;
|
||||
std::vector<examplesItem> examples;
|
||||
struct Config {
|
||||
bool skipCsiCheck;
|
||||
};
|
||||
config config;
|
||||
std::string domainHint;
|
||||
};
|
||||
BatchTranslateRequest();
|
||||
~BatchTranslateRequest();
|
||||
ext getExt() const;
|
||||
void setExt(const ext &ext);
|
||||
std::string getSourceLanguage() const;
|
||||
void setSourceLanguage(const std::string &sourceLanguage);
|
||||
std::string getFormat() const;
|
||||
void setFormat(const std::string &format);
|
||||
std::string getScene() const;
|
||||
void setScene(const std::string &scene);
|
||||
std::string getAppName() const;
|
||||
void setAppName(const std::string &appName);
|
||||
std::string getTargetLanguage() const;
|
||||
void setTargetLanguage(const std::string &targetLanguage);
|
||||
std::map<std::string, std::string> getText() const;
|
||||
void setText(const std::map<std::string, std::string> &text);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
ext ext_;
|
||||
std::string sourceLanguage_;
|
||||
std::string format_;
|
||||
std::string scene_;
|
||||
std::string appName_;
|
||||
std::string targetLanguage_;
|
||||
std::map<std::string, std::string> text_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_BATCHTRANSLATEREQUEST_H_
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* 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_ANYTRANS_MODEL_BATCHTRANSLATERESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_BATCHTRANSLATERESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT BatchTranslateResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct TranslationListItem
|
||||
{
|
||||
struct Usage
|
||||
{
|
||||
long inputTokens;
|
||||
long totalTokens;
|
||||
long outputTokens;
|
||||
};
|
||||
Usage usage;
|
||||
std::string translation;
|
||||
std::string message;
|
||||
std::string index;
|
||||
long code;
|
||||
};
|
||||
std::vector<TranslationListItem> translationList;
|
||||
};
|
||||
|
||||
|
||||
BatchTranslateResult();
|
||||
explicit BatchTranslateResult(const std::string &payload);
|
||||
~BatchTranslateResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_BATCHTRANSLATERESULT_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_ANYTRANS_MODEL_GETDOCTRANSLATETASKREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_GETDOCTRANSLATETASKREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT GetDocTranslateTaskRequest : public RoaServiceRequest {
|
||||
public:
|
||||
GetDocTranslateTaskRequest();
|
||||
~GetDocTranslateTaskRequest();
|
||||
std::string getTaskId() const;
|
||||
void setTaskId(const std::string &taskId);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
std::string taskId_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_GETDOCTRANSLATETASKREQUEST_H_
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* 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_ANYTRANS_MODEL_GETDOCTRANSLATETASKRESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_GETDOCTRANSLATETASKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT GetDocTranslateTaskResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string status;
|
||||
int charactersCount;
|
||||
std::string taskId;
|
||||
int pageCount;
|
||||
std::string translateFileUrl;
|
||||
};
|
||||
|
||||
|
||||
GetDocTranslateTaskResult();
|
||||
explicit GetDocTranslateTaskResult(const std::string &payload);
|
||||
~GetDocTranslateTaskResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_GETDOCTRANSLATETASKRESULT_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_ANYTRANS_MODEL_GETHTMLTRANSLATETASKREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_GETHTMLTRANSLATETASKREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT GetHtmlTranslateTaskRequest : public RoaServiceRequest {
|
||||
public:
|
||||
GetHtmlTranslateTaskRequest();
|
||||
~GetHtmlTranslateTaskRequest();
|
||||
std::string getTaskId() const;
|
||||
void setTaskId(const std::string &taskId);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
std::string taskId_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_GETHTMLTRANSLATETASKREQUEST_H_
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_GETHTMLTRANSLATETASKRESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_GETHTMLTRANSLATETASKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT GetHtmlTranslateTaskResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct Usage
|
||||
{
|
||||
long inputTokens;
|
||||
long totalTokens;
|
||||
long outputTokens;
|
||||
};
|
||||
Usage usage;
|
||||
std::string translation;
|
||||
};
|
||||
|
||||
|
||||
GetHtmlTranslateTaskResult();
|
||||
explicit GetHtmlTranslateTaskResult(const std::string &payload);
|
||||
~GetHtmlTranslateTaskResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_GETHTMLTRANSLATETASKRESULT_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_ANYTRANS_MODEL_GETIMAGETRANSLATETASKREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_GETIMAGETRANSLATETASKREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT GetImageTranslateTaskRequest : public RoaServiceRequest {
|
||||
public:
|
||||
GetImageTranslateTaskRequest();
|
||||
~GetImageTranslateTaskRequest();
|
||||
std::string getTaskId() const;
|
||||
void setTaskId(const std::string &taskId);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
std::string taskId_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_GETIMAGETRANSLATETASKREQUEST_H_
|
||||
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
* 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_ANYTRANS_MODEL_GETIMAGETRANSLATETASKRESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_GETIMAGETRANSLATETASKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT GetImageTranslateTaskResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct Translation
|
||||
{
|
||||
struct BoundingBoxesItem
|
||||
{
|
||||
struct UpLeft
|
||||
{
|
||||
long x;
|
||||
long y;
|
||||
};
|
||||
struct UpRight
|
||||
{
|
||||
long x;
|
||||
long y;
|
||||
};
|
||||
struct DownLeft
|
||||
{
|
||||
long x;
|
||||
long y;
|
||||
};
|
||||
struct DownRight
|
||||
{
|
||||
long x;
|
||||
long y;
|
||||
};
|
||||
long tableId;
|
||||
long tableCellId;
|
||||
std::string translation;
|
||||
UpRight upRight;
|
||||
DownRight downRight;
|
||||
float confidence;
|
||||
UpLeft upLeft;
|
||||
std::string text;
|
||||
long direction;
|
||||
DownLeft downLeft;
|
||||
};
|
||||
struct TableInfosItem
|
||||
{
|
||||
struct CellInfosItem
|
||||
{
|
||||
struct PosItem
|
||||
{
|
||||
long x;
|
||||
long y;
|
||||
};
|
||||
long tableCellId;
|
||||
std::vector<CellInfosItem::PosItem> pos;
|
||||
long yec;
|
||||
long xec;
|
||||
long ysc;
|
||||
long xsc;
|
||||
std::string text;
|
||||
};
|
||||
long tableId;
|
||||
std::vector<TableInfosItem::CellInfosItem> cellInfos;
|
||||
long xCellSize;
|
||||
long yCellSize;
|
||||
};
|
||||
long orgWidth;
|
||||
std::vector<BoundingBoxesItem> boundingBoxes;
|
||||
long angle;
|
||||
long orgHeight;
|
||||
long boxesCount;
|
||||
long height;
|
||||
std::vector<TableInfosItem> tableInfos;
|
||||
long width;
|
||||
};
|
||||
Translation translation;
|
||||
std::string traceId;
|
||||
};
|
||||
|
||||
|
||||
GetImageTranslateTaskResult();
|
||||
explicit GetImageTranslateTaskResult(const std::string &payload);
|
||||
~GetImageTranslateTaskResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
bool getSynchro()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
bool synchro_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_GETIMAGETRANSLATETASKRESULT_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_ANYTRANS_MODEL_GETLONGTEXTTRANSLATETASKREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_GETLONGTEXTTRANSLATETASKREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT GetLongTextTranslateTaskRequest : public RoaServiceRequest {
|
||||
public:
|
||||
GetLongTextTranslateTaskRequest();
|
||||
~GetLongTextTranslateTaskRequest();
|
||||
std::string getTaskId() const;
|
||||
void setTaskId(const std::string &taskId);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
std::string taskId_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_GETLONGTEXTTRANSLATETASKREQUEST_H_
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_GETLONGTEXTTRANSLATETASKRESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_GETLONGTEXTTRANSLATETASKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT GetLongTextTranslateTaskResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct Usage
|
||||
{
|
||||
long inputTokens;
|
||||
long totalTokens;
|
||||
long outputTokens;
|
||||
};
|
||||
Usage usage;
|
||||
std::string translation;
|
||||
};
|
||||
|
||||
|
||||
GetLongTextTranslateTaskResult();
|
||||
explicit GetLongTextTranslateTaskResult(const std::string &payload);
|
||||
~GetLongTextTranslateTaskResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_GETLONGTEXTTRANSLATETASKRESULT_H_
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_SUBMITDOCTRANSLATETASKREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_SUBMITDOCTRANSLATETASKREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT SubmitDocTranslateTaskRequest : public RoaServiceRequest {
|
||||
public:
|
||||
struct Ext {
|
||||
struct TerminologiesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
terminologiesItem terminologiesItem;
|
||||
std::vector<terminologiesItem> terminologies;
|
||||
struct Config {
|
||||
bool skipImgTrans;
|
||||
};
|
||||
config config;
|
||||
std::string domainHint;
|
||||
};
|
||||
SubmitDocTranslateTaskRequest();
|
||||
~SubmitDocTranslateTaskRequest();
|
||||
ext getExt() const;
|
||||
void setExt(const ext &ext);
|
||||
std::string getSourceLanguage() const;
|
||||
void setSourceLanguage(const std::string &sourceLanguage);
|
||||
std::string getFormat() const;
|
||||
void setFormat(const std::string &format);
|
||||
std::string getScene() const;
|
||||
void setScene(const std::string &scene);
|
||||
std::string getTargetLanguage() const;
|
||||
void setTargetLanguage(const std::string &targetLanguage);
|
||||
std::string getText() const;
|
||||
void setText(const std::string &text);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
ext ext_;
|
||||
std::string sourceLanguage_;
|
||||
std::string format_;
|
||||
std::string scene_;
|
||||
std::string targetLanguage_;
|
||||
std::string text_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_SUBMITDOCTRANSLATETASKREQUEST_H_
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_SUBMITDOCTRANSLATETASKRESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_SUBMITDOCTRANSLATETASKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT SubmitDocTranslateTaskResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string status;
|
||||
std::string taskId;
|
||||
};
|
||||
|
||||
|
||||
SubmitDocTranslateTaskResult();
|
||||
explicit SubmitDocTranslateTaskResult(const std::string &payload);
|
||||
~SubmitDocTranslateTaskResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_SUBMITDOCTRANSLATETASKRESULT_H_
|
||||
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* 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_ANYTRANS_MODEL_SUBMITHTMLTRANSLATETASKREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_SUBMITHTMLTRANSLATETASKREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT SubmitHtmlTranslateTaskRequest : public RoaServiceRequest {
|
||||
public:
|
||||
struct Ext {
|
||||
std::string string;
|
||||
std::vector<std::string> sensitives;
|
||||
struct TerminologiesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
terminologiesItem terminologiesItem;
|
||||
std::vector<terminologiesItem> terminologies;
|
||||
struct TextTransform {
|
||||
bool toLower;
|
||||
bool toUpper;
|
||||
bool toTitle;
|
||||
};
|
||||
textTransform textTransform;
|
||||
struct ExamplesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
examplesItem examplesItem;
|
||||
std::vector<examplesItem> examples;
|
||||
struct Config {
|
||||
bool skipCsiCheck;
|
||||
std::string callbackUrl;
|
||||
};
|
||||
config config;
|
||||
std::string domainHint;
|
||||
};
|
||||
SubmitHtmlTranslateTaskRequest();
|
||||
~SubmitHtmlTranslateTaskRequest();
|
||||
ext getExt() const;
|
||||
void setExt(const ext &ext);
|
||||
std::string getSourceLanguage() const;
|
||||
void setSourceLanguage(const std::string &sourceLanguage);
|
||||
std::string getFormat() const;
|
||||
void setFormat(const std::string &format);
|
||||
std::string getScene() const;
|
||||
void setScene(const std::string &scene);
|
||||
std::string getTargetLanguage() const;
|
||||
void setTargetLanguage(const std::string &targetLanguage);
|
||||
std::string getText() const;
|
||||
void setText(const std::string &text);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
ext ext_;
|
||||
std::string sourceLanguage_;
|
||||
std::string format_;
|
||||
std::string scene_;
|
||||
std::string targetLanguage_;
|
||||
std::string text_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_SUBMITHTMLTRANSLATETASKREQUEST_H_
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_SUBMITHTMLTRANSLATETASKRESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_SUBMITHTMLTRANSLATETASKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT SubmitHtmlTranslateTaskResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string status;
|
||||
std::string taskId;
|
||||
};
|
||||
|
||||
|
||||
SubmitHtmlTranslateTaskResult();
|
||||
explicit SubmitHtmlTranslateTaskResult(const std::string &payload);
|
||||
~SubmitHtmlTranslateTaskResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_SUBMITHTMLTRANSLATETASKRESULT_H_
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* 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_ANYTRANS_MODEL_SUBMITIMAGETRANSLATETASKREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_SUBMITIMAGETRANSLATETASKREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT SubmitImageTranslateTaskRequest : public RoaServiceRequest {
|
||||
public:
|
||||
struct Ext {
|
||||
std::string string;
|
||||
std::vector<std::string> sensitives;
|
||||
struct TerminologiesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
terminologiesItem terminologiesItem;
|
||||
std::vector<terminologiesItem> terminologies;
|
||||
struct TextTransform {
|
||||
bool toLower;
|
||||
bool toUpper;
|
||||
bool toTitle;
|
||||
};
|
||||
textTransform textTransform;
|
||||
struct ExamplesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
examplesItem examplesItem;
|
||||
std::vector<examplesItem> examples;
|
||||
std::string domainHint;
|
||||
};
|
||||
SubmitImageTranslateTaskRequest();
|
||||
~SubmitImageTranslateTaskRequest();
|
||||
ext getExt() const;
|
||||
void setExt(const ext &ext);
|
||||
std::string getSourceLanguage() const;
|
||||
void setSourceLanguage(const std::string &sourceLanguage);
|
||||
std::string getFormat() const;
|
||||
void setFormat(const std::string &format);
|
||||
std::string getScene() const;
|
||||
void setScene(const std::string &scene);
|
||||
std::string getText() const;
|
||||
void setText(const std::string &text);
|
||||
std::vector<std::string> getTargetLanguage() const;
|
||||
void setTargetLanguage(const std::vector<std::string> &targetLanguage);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
ext ext_;
|
||||
std::string sourceLanguage_;
|
||||
std::string format_;
|
||||
std::string scene_;
|
||||
std::string text_;
|
||||
std::vector<std::string> targetLanguage_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_SUBMITIMAGETRANSLATETASKREQUEST_H_
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_SUBMITIMAGETRANSLATETASKRESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_SUBMITIMAGETRANSLATETASKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT SubmitImageTranslateTaskResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string status;
|
||||
std::string taskId;
|
||||
};
|
||||
|
||||
|
||||
SubmitImageTranslateTaskResult();
|
||||
explicit SubmitImageTranslateTaskResult(const std::string &payload);
|
||||
~SubmitImageTranslateTaskResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_SUBMITIMAGETRANSLATETASKRESULT_H_
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 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_ANYTRANS_MODEL_SUBMITLONGTEXTTRANSLATETASKREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_SUBMITLONGTEXTTRANSLATETASKREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT SubmitLongTextTranslateTaskRequest : public RoaServiceRequest {
|
||||
public:
|
||||
struct Ext {
|
||||
std::string string;
|
||||
std::vector<std::string> sensitives;
|
||||
struct TerminologiesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
terminologiesItem terminologiesItem;
|
||||
std::vector<terminologiesItem> terminologies;
|
||||
struct TextTransform {
|
||||
bool toLower;
|
||||
bool toUpper;
|
||||
bool toTitle;
|
||||
};
|
||||
textTransform textTransform;
|
||||
struct ExamplesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
examplesItem examplesItem;
|
||||
std::vector<examplesItem> examples;
|
||||
struct Config {
|
||||
bool skipCsiCheck;
|
||||
};
|
||||
config config;
|
||||
std::string domainHint;
|
||||
};
|
||||
SubmitLongTextTranslateTaskRequest();
|
||||
~SubmitLongTextTranslateTaskRequest();
|
||||
ext getExt() const;
|
||||
void setExt(const ext &ext);
|
||||
std::string getSourceLanguage() const;
|
||||
void setSourceLanguage(const std::string &sourceLanguage);
|
||||
std::string getFormat() const;
|
||||
void setFormat(const std::string &format);
|
||||
std::string getScene() const;
|
||||
void setScene(const std::string &scene);
|
||||
std::string getTargetLanguage() const;
|
||||
void setTargetLanguage(const std::string &targetLanguage);
|
||||
std::string getText() const;
|
||||
void setText(const std::string &text);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
ext ext_;
|
||||
std::string sourceLanguage_;
|
||||
std::string format_;
|
||||
std::string scene_;
|
||||
std::string targetLanguage_;
|
||||
std::string text_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_SUBMITLONGTEXTTRANSLATETASKREQUEST_H_
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_SUBMITLONGTEXTTRANSLATETASKRESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_SUBMITLONGTEXTTRANSLATETASKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT SubmitLongTextTranslateTaskResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string status;
|
||||
std::string taskId;
|
||||
};
|
||||
|
||||
|
||||
SubmitLongTextTranslateTaskResult();
|
||||
explicit SubmitLongTextTranslateTaskResult(const std::string &payload);
|
||||
~SubmitLongTextTranslateTaskResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_SUBMITLONGTEXTTRANSLATETASKRESULT_H_
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_TERMEDITREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_TERMEDITREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT TermEditRequest : public RoaServiceRequest {
|
||||
public:
|
||||
struct Ext {
|
||||
struct TermsItem {
|
||||
std::string tgt;
|
||||
std::string termId;
|
||||
std::string src;
|
||||
};
|
||||
termsItem termsItem;
|
||||
std::vector<termsItem> terms;
|
||||
};
|
||||
TermEditRequest();
|
||||
~TermEditRequest();
|
||||
ext getExt() const;
|
||||
void setExt(const ext &ext);
|
||||
std::string getSourceLanguage() const;
|
||||
void setSourceLanguage(const std::string &sourceLanguage);
|
||||
std::string getScene() const;
|
||||
void setScene(const std::string &scene);
|
||||
std::string getAction() const;
|
||||
void setAction(const std::string &action);
|
||||
std::string getTargetLanguage() const;
|
||||
void setTargetLanguage(const std::string &targetLanguage);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
ext ext_;
|
||||
std::string sourceLanguage_;
|
||||
std::string scene_;
|
||||
std::string action_;
|
||||
std::string targetLanguage_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_TERMEDITREQUEST_H_
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_TERMEDITRESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_TERMEDITRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT TermEditResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct TermsItem
|
||||
{
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
std::string termId;
|
||||
};
|
||||
std::vector<TermsItem> terms;
|
||||
long failCount;
|
||||
};
|
||||
|
||||
|
||||
TermEditResult();
|
||||
explicit TermEditResult(const std::string &payload);
|
||||
~TermEditResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_TERMEDITRESULT_H_
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_TERMQUERYREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_TERMQUERYREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT TermQueryRequest : public RoaServiceRequest {
|
||||
public:
|
||||
TermQueryRequest();
|
||||
~TermQueryRequest();
|
||||
std::string getSourceLanguage() const;
|
||||
void setSourceLanguage(const std::string &sourceLanguage);
|
||||
std::string getScene() const;
|
||||
void setScene(const std::string &scene);
|
||||
std::string getTargetLanguage() const;
|
||||
void setTargetLanguage(const std::string &targetLanguage);
|
||||
std::string getText() const;
|
||||
void setText(const std::string &text);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
std::string sourceLanguage_;
|
||||
std::string scene_;
|
||||
std::string targetLanguage_;
|
||||
std::string text_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_TERMQUERYREQUEST_H_
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_TERMQUERYRESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_TERMQUERYRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT TermQueryResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct TermsItem
|
||||
{
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
std::string termId;
|
||||
};
|
||||
std::vector<TermsItem> terms;
|
||||
long failCount;
|
||||
};
|
||||
|
||||
|
||||
TermQueryResult();
|
||||
explicit TermQueryResult(const std::string &payload);
|
||||
~TermQueryResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_TERMQUERYRESULT_H_
|
||||
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* 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_ANYTRANS_MODEL_TEXTTRANSLATEREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_TEXTTRANSLATEREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT TextTranslateRequest : public RoaServiceRequest {
|
||||
public:
|
||||
struct Ext {
|
||||
std::string string;
|
||||
std::vector<std::string> sensitives;
|
||||
struct TerminologiesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
terminologiesItem terminologiesItem;
|
||||
std::vector<terminologiesItem> terminologies;
|
||||
struct TextTransform {
|
||||
bool toLower;
|
||||
bool toUpper;
|
||||
bool toTitle;
|
||||
};
|
||||
textTransform textTransform;
|
||||
std::string agent;
|
||||
struct ExamplesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
examplesItem examplesItem;
|
||||
std::vector<examplesItem> examples;
|
||||
struct Config {
|
||||
bool skipCsiCheck;
|
||||
};
|
||||
config config;
|
||||
std::string domainHint;
|
||||
};
|
||||
TextTranslateRequest();
|
||||
~TextTranslateRequest();
|
||||
ext getExt() const;
|
||||
void setExt(const ext &ext);
|
||||
std::string getSourceLanguage() const;
|
||||
void setSourceLanguage(const std::string &sourceLanguage);
|
||||
std::string getFormat() const;
|
||||
void setFormat(const std::string &format);
|
||||
std::string getScene() const;
|
||||
void setScene(const std::string &scene);
|
||||
std::string getTargetLanguage() const;
|
||||
void setTargetLanguage(const std::string &targetLanguage);
|
||||
std::string getText() const;
|
||||
void setText(const std::string &text);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
ext ext_;
|
||||
std::string sourceLanguage_;
|
||||
std::string format_;
|
||||
std::string scene_;
|
||||
std::string targetLanguage_;
|
||||
std::string text_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_TEXTTRANSLATEREQUEST_H_
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_TEXTTRANSLATERESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_TEXTTRANSLATERESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT TextTranslateResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct Usage
|
||||
{
|
||||
long inputTokens;
|
||||
long totalTokens;
|
||||
long outputTokens;
|
||||
};
|
||||
Usage usage;
|
||||
std::string translation;
|
||||
};
|
||||
|
||||
|
||||
TextTranslateResult();
|
||||
explicit TextTranslateResult(const std::string &payload);
|
||||
~TextTranslateResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_TEXTTRANSLATERESULT_H_
|
||||
521
anytrans/src/AnyTransClient.cc
Normal file
521
anytrans/src/AnyTransClient.cc
Normal file
@@ -0,0 +1,521 @@
|
||||
/*
|
||||
* 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/anytrans/AnyTransClient.h>
|
||||
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||
|
||||
using namespace AlibabaCloud;
|
||||
using namespace AlibabaCloud::Location;
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
namespace
|
||||
{
|
||||
const std::string SERVICE_NAME = "AnyTrans";
|
||||
}
|
||||
|
||||
AnyTransClient::AnyTransClient(const Credentials &credentials, const ClientConfiguration &configuration) :
|
||||
RoaServiceClient(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, "");
|
||||
}
|
||||
|
||||
AnyTransClient::AnyTransClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||
RoaServiceClient(SERVICE_NAME, credentialsProvider, configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
AnyTransClient::AnyTransClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
|
||||
RoaServiceClient(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, "");
|
||||
}
|
||||
|
||||
AnyTransClient::~AnyTransClient()
|
||||
{}
|
||||
|
||||
AnyTransClient::BatchTranslateOutcome AnyTransClient::batchTranslate(const BatchTranslateRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return BatchTranslateOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return BatchTranslateOutcome(BatchTranslateResult(outcome.result()));
|
||||
else
|
||||
return BatchTranslateOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::batchTranslateAsync(const BatchTranslateRequest& request, const BatchTranslateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, batchTranslate(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::BatchTranslateOutcomeCallable AnyTransClient::batchTranslateCallable(const BatchTranslateRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<BatchTranslateOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->batchTranslate(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::BatchTranslateForHtmlOutcome AnyTransClient::batchTranslateForHtml(const BatchTranslateForHtmlRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return BatchTranslateForHtmlOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return BatchTranslateForHtmlOutcome(BatchTranslateForHtmlResult(outcome.result()));
|
||||
else
|
||||
return BatchTranslateForHtmlOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::batchTranslateForHtmlAsync(const BatchTranslateForHtmlRequest& request, const BatchTranslateForHtmlAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, batchTranslateForHtml(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::BatchTranslateForHtmlOutcomeCallable AnyTransClient::batchTranslateForHtmlCallable(const BatchTranslateForHtmlRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<BatchTranslateForHtmlOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->batchTranslateForHtml(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::GetDocTranslateTaskOutcome AnyTransClient::getDocTranslateTask(const GetDocTranslateTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetDocTranslateTaskOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetDocTranslateTaskOutcome(GetDocTranslateTaskResult(outcome.result()));
|
||||
else
|
||||
return GetDocTranslateTaskOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::getDocTranslateTaskAsync(const GetDocTranslateTaskRequest& request, const GetDocTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getDocTranslateTask(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::GetDocTranslateTaskOutcomeCallable AnyTransClient::getDocTranslateTaskCallable(const GetDocTranslateTaskRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetDocTranslateTaskOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getDocTranslateTask(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::GetHtmlTranslateTaskOutcome AnyTransClient::getHtmlTranslateTask(const GetHtmlTranslateTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetHtmlTranslateTaskOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetHtmlTranslateTaskOutcome(GetHtmlTranslateTaskResult(outcome.result()));
|
||||
else
|
||||
return GetHtmlTranslateTaskOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::getHtmlTranslateTaskAsync(const GetHtmlTranslateTaskRequest& request, const GetHtmlTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getHtmlTranslateTask(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::GetHtmlTranslateTaskOutcomeCallable AnyTransClient::getHtmlTranslateTaskCallable(const GetHtmlTranslateTaskRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetHtmlTranslateTaskOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getHtmlTranslateTask(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::GetImageTranslateTaskOutcome AnyTransClient::getImageTranslateTask(const GetImageTranslateTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetImageTranslateTaskOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetImageTranslateTaskOutcome(GetImageTranslateTaskResult(outcome.result()));
|
||||
else
|
||||
return GetImageTranslateTaskOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::getImageTranslateTaskAsync(const GetImageTranslateTaskRequest& request, const GetImageTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getImageTranslateTask(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::GetImageTranslateTaskOutcomeCallable AnyTransClient::getImageTranslateTaskCallable(const GetImageTranslateTaskRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetImageTranslateTaskOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getImageTranslateTask(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::GetLongTextTranslateTaskOutcome AnyTransClient::getLongTextTranslateTask(const GetLongTextTranslateTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetLongTextTranslateTaskOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetLongTextTranslateTaskOutcome(GetLongTextTranslateTaskResult(outcome.result()));
|
||||
else
|
||||
return GetLongTextTranslateTaskOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::getLongTextTranslateTaskAsync(const GetLongTextTranslateTaskRequest& request, const GetLongTextTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getLongTextTranslateTask(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::GetLongTextTranslateTaskOutcomeCallable AnyTransClient::getLongTextTranslateTaskCallable(const GetLongTextTranslateTaskRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetLongTextTranslateTaskOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getLongTextTranslateTask(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::SubmitDocTranslateTaskOutcome AnyTransClient::submitDocTranslateTask(const SubmitDocTranslateTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return SubmitDocTranslateTaskOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return SubmitDocTranslateTaskOutcome(SubmitDocTranslateTaskResult(outcome.result()));
|
||||
else
|
||||
return SubmitDocTranslateTaskOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::submitDocTranslateTaskAsync(const SubmitDocTranslateTaskRequest& request, const SubmitDocTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, submitDocTranslateTask(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::SubmitDocTranslateTaskOutcomeCallable AnyTransClient::submitDocTranslateTaskCallable(const SubmitDocTranslateTaskRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<SubmitDocTranslateTaskOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->submitDocTranslateTask(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::SubmitHtmlTranslateTaskOutcome AnyTransClient::submitHtmlTranslateTask(const SubmitHtmlTranslateTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return SubmitHtmlTranslateTaskOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return SubmitHtmlTranslateTaskOutcome(SubmitHtmlTranslateTaskResult(outcome.result()));
|
||||
else
|
||||
return SubmitHtmlTranslateTaskOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::submitHtmlTranslateTaskAsync(const SubmitHtmlTranslateTaskRequest& request, const SubmitHtmlTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, submitHtmlTranslateTask(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::SubmitHtmlTranslateTaskOutcomeCallable AnyTransClient::submitHtmlTranslateTaskCallable(const SubmitHtmlTranslateTaskRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<SubmitHtmlTranslateTaskOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->submitHtmlTranslateTask(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::SubmitImageTranslateTaskOutcome AnyTransClient::submitImageTranslateTask(const SubmitImageTranslateTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return SubmitImageTranslateTaskOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return SubmitImageTranslateTaskOutcome(SubmitImageTranslateTaskResult(outcome.result()));
|
||||
else
|
||||
return SubmitImageTranslateTaskOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::submitImageTranslateTaskAsync(const SubmitImageTranslateTaskRequest& request, const SubmitImageTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, submitImageTranslateTask(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::SubmitImageTranslateTaskOutcomeCallable AnyTransClient::submitImageTranslateTaskCallable(const SubmitImageTranslateTaskRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<SubmitImageTranslateTaskOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->submitImageTranslateTask(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::SubmitLongTextTranslateTaskOutcome AnyTransClient::submitLongTextTranslateTask(const SubmitLongTextTranslateTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return SubmitLongTextTranslateTaskOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return SubmitLongTextTranslateTaskOutcome(SubmitLongTextTranslateTaskResult(outcome.result()));
|
||||
else
|
||||
return SubmitLongTextTranslateTaskOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::submitLongTextTranslateTaskAsync(const SubmitLongTextTranslateTaskRequest& request, const SubmitLongTextTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, submitLongTextTranslateTask(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::SubmitLongTextTranslateTaskOutcomeCallable AnyTransClient::submitLongTextTranslateTaskCallable(const SubmitLongTextTranslateTaskRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<SubmitLongTextTranslateTaskOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->submitLongTextTranslateTask(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::TermEditOutcome AnyTransClient::termEdit(const TermEditRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return TermEditOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return TermEditOutcome(TermEditResult(outcome.result()));
|
||||
else
|
||||
return TermEditOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::termEditAsync(const TermEditRequest& request, const TermEditAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, termEdit(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::TermEditOutcomeCallable AnyTransClient::termEditCallable(const TermEditRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<TermEditOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->termEdit(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::TermQueryOutcome AnyTransClient::termQuery(const TermQueryRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return TermQueryOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return TermQueryOutcome(TermQueryResult(outcome.result()));
|
||||
else
|
||||
return TermQueryOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::termQueryAsync(const TermQueryRequest& request, const TermQueryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, termQuery(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::TermQueryOutcomeCallable AnyTransClient::termQueryCallable(const TermQueryRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<TermQueryOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->termQuery(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::TextTranslateOutcome AnyTransClient::textTranslate(const TextTranslateRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return TextTranslateOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return TextTranslateOutcome(TextTranslateResult(outcome.result()));
|
||||
else
|
||||
return TextTranslateOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::textTranslateAsync(const TextTranslateRequest& request, const TextTranslateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, textTranslate(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::TextTranslateOutcomeCallable AnyTransClient::textTranslateCallable(const TextTranslateRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<TextTranslateOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->textTranslate(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
117
anytrans/src/model/BatchTranslateForHtmlRequest.cc
Normal file
117
anytrans/src/model/BatchTranslateForHtmlRequest.cc
Normal file
@@ -0,0 +1,117 @@
|
||||
/*
|
||||
* 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/anytrans/model/BatchTranslateForHtmlRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::BatchTranslateForHtmlRequest;
|
||||
|
||||
BatchTranslateForHtmlRequest::BatchTranslateForHtmlRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/batchForHtml"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
BatchTranslateForHtmlRequest::~BatchTranslateForHtmlRequest() {}
|
||||
|
||||
BatchTranslateForHtmlRequest::ext BatchTranslateForHtmlRequest::getExt() const {
|
||||
return ext_;
|
||||
}
|
||||
|
||||
void BatchTranslateForHtmlRequest::setExt(const BatchTranslateForHtmlRequest::ext &ext) {
|
||||
ext_ = ext;
|
||||
for(int dep1 = 0; dep1 != ext.sensitives.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".sensitives." + std::to_string(dep1 + 1), ext.sensitives[dep1]);
|
||||
}
|
||||
for(int dep1 = 0; dep1 != ext.terminologies.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".tgt", ext.terminologies[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".src", ext.terminologies[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toLower", ext.textTransform.toLower ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toUpper", ext.textTransform.toUpper ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toTitle", ext.textTransform.toTitle ? "true" : "false");
|
||||
for(int dep1 = 0; dep1 != ext.examples.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".tgt", ext.examples[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".src", ext.examples[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".config.skipCsiCheck", ext.config.skipCsiCheck ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".domainHint", ext.domainHint);
|
||||
}
|
||||
|
||||
std::string BatchTranslateForHtmlRequest::getSourceLanguage() const {
|
||||
return sourceLanguage_;
|
||||
}
|
||||
|
||||
void BatchTranslateForHtmlRequest::setSourceLanguage(const std::string &sourceLanguage) {
|
||||
sourceLanguage_ = sourceLanguage;
|
||||
setBodyParameter(std::string("sourceLanguage"), sourceLanguage);
|
||||
}
|
||||
|
||||
std::string BatchTranslateForHtmlRequest::getFormat() const {
|
||||
return format_;
|
||||
}
|
||||
|
||||
void BatchTranslateForHtmlRequest::setFormat(const std::string &format) {
|
||||
format_ = format;
|
||||
setBodyParameter(std::string("format"), format);
|
||||
}
|
||||
|
||||
std::string BatchTranslateForHtmlRequest::getScene() const {
|
||||
return scene_;
|
||||
}
|
||||
|
||||
void BatchTranslateForHtmlRequest::setScene(const std::string &scene) {
|
||||
scene_ = scene;
|
||||
setBodyParameter(std::string("scene"), scene);
|
||||
}
|
||||
|
||||
std::string BatchTranslateForHtmlRequest::getAppName() const {
|
||||
return appName_;
|
||||
}
|
||||
|
||||
void BatchTranslateForHtmlRequest::setAppName(const std::string &appName) {
|
||||
appName_ = appName;
|
||||
setBodyParameter(std::string("appName"), appName);
|
||||
}
|
||||
|
||||
std::string BatchTranslateForHtmlRequest::getTargetLanguage() const {
|
||||
return targetLanguage_;
|
||||
}
|
||||
|
||||
void BatchTranslateForHtmlRequest::setTargetLanguage(const std::string &targetLanguage) {
|
||||
targetLanguage_ = targetLanguage;
|
||||
setBodyParameter(std::string("targetLanguage"), targetLanguage);
|
||||
}
|
||||
|
||||
std::map<std::string, std::string> BatchTranslateForHtmlRequest::getText() const {
|
||||
return text_;
|
||||
}
|
||||
|
||||
void BatchTranslateForHtmlRequest::setText(const std::map<std::string, std::string> &text) {
|
||||
text_ = text;
|
||||
for(auto const &iter1 : text) {
|
||||
setBodyParameter(std::string("text") + "." + iter1.first, iter1.second);
|
||||
}
|
||||
}
|
||||
|
||||
std::string BatchTranslateForHtmlRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void BatchTranslateForHtmlRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
106
anytrans/src/model/BatchTranslateForHtmlResult.cc
Normal file
106
anytrans/src/model/BatchTranslateForHtmlResult.cc
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/BatchTranslateForHtmlResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
BatchTranslateForHtmlResult::BatchTranslateForHtmlResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
BatchTranslateForHtmlResult::BatchTranslateForHtmlResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
BatchTranslateForHtmlResult::~BatchTranslateForHtmlResult()
|
||||
{}
|
||||
|
||||
void BatchTranslateForHtmlResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
auto alltranslationListNode = dataNode["translationList"]["translationListItem"];
|
||||
for (auto dataNodetranslationListtranslationListItem : alltranslationListNode)
|
||||
{
|
||||
Data::TranslationListItem translationListItemObject;
|
||||
if(!dataNodetranslationListtranslationListItem["code"].isNull())
|
||||
translationListItemObject.code = std::stol(dataNodetranslationListtranslationListItem["code"].asString());
|
||||
if(!dataNodetranslationListtranslationListItem["message"].isNull())
|
||||
translationListItemObject.message = dataNodetranslationListtranslationListItem["message"].asString();
|
||||
if(!dataNodetranslationListtranslationListItem["index"].isNull())
|
||||
translationListItemObject.index = dataNodetranslationListtranslationListItem["index"].asString();
|
||||
if(!dataNodetranslationListtranslationListItem["translation"].isNull())
|
||||
translationListItemObject.translation = dataNodetranslationListtranslationListItem["translation"].asString();
|
||||
auto usageNode = value["usage"];
|
||||
if(!usageNode["inputTokens"].isNull())
|
||||
translationListItemObject.usage.inputTokens = std::stol(usageNode["inputTokens"].asString());
|
||||
if(!usageNode["outputTokens"].isNull())
|
||||
translationListItemObject.usage.outputTokens = std::stol(usageNode["outputTokens"].asString());
|
||||
if(!usageNode["totalTokens"].isNull())
|
||||
translationListItemObject.usage.totalTokens = std::stol(usageNode["totalTokens"].asString());
|
||||
data_.translationList.push_back(translationListItemObject);
|
||||
}
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string BatchTranslateForHtmlResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string BatchTranslateForHtmlResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string BatchTranslateForHtmlResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
BatchTranslateForHtmlResult::Data BatchTranslateForHtmlResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string BatchTranslateForHtmlResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool BatchTranslateForHtmlResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
117
anytrans/src/model/BatchTranslateRequest.cc
Normal file
117
anytrans/src/model/BatchTranslateRequest.cc
Normal file
@@ -0,0 +1,117 @@
|
||||
/*
|
||||
* 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/anytrans/model/BatchTranslateRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::BatchTranslateRequest;
|
||||
|
||||
BatchTranslateRequest::BatchTranslateRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/batch"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
BatchTranslateRequest::~BatchTranslateRequest() {}
|
||||
|
||||
BatchTranslateRequest::ext BatchTranslateRequest::getExt() const {
|
||||
return ext_;
|
||||
}
|
||||
|
||||
void BatchTranslateRequest::setExt(const BatchTranslateRequest::ext &ext) {
|
||||
ext_ = ext;
|
||||
for(int dep1 = 0; dep1 != ext.sensitives.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".sensitives." + std::to_string(dep1 + 1), ext.sensitives[dep1]);
|
||||
}
|
||||
for(int dep1 = 0; dep1 != ext.terminologies.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".tgt", ext.terminologies[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".src", ext.terminologies[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toLower", ext.textTransform.toLower ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toUpper", ext.textTransform.toUpper ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toTitle", ext.textTransform.toTitle ? "true" : "false");
|
||||
for(int dep1 = 0; dep1 != ext.examples.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".tgt", ext.examples[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".src", ext.examples[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".config.skipCsiCheck", ext.config.skipCsiCheck ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".domainHint", ext.domainHint);
|
||||
}
|
||||
|
||||
std::string BatchTranslateRequest::getSourceLanguage() const {
|
||||
return sourceLanguage_;
|
||||
}
|
||||
|
||||
void BatchTranslateRequest::setSourceLanguage(const std::string &sourceLanguage) {
|
||||
sourceLanguage_ = sourceLanguage;
|
||||
setBodyParameter(std::string("sourceLanguage"), sourceLanguage);
|
||||
}
|
||||
|
||||
std::string BatchTranslateRequest::getFormat() const {
|
||||
return format_;
|
||||
}
|
||||
|
||||
void BatchTranslateRequest::setFormat(const std::string &format) {
|
||||
format_ = format;
|
||||
setBodyParameter(std::string("format"), format);
|
||||
}
|
||||
|
||||
std::string BatchTranslateRequest::getScene() const {
|
||||
return scene_;
|
||||
}
|
||||
|
||||
void BatchTranslateRequest::setScene(const std::string &scene) {
|
||||
scene_ = scene;
|
||||
setBodyParameter(std::string("scene"), scene);
|
||||
}
|
||||
|
||||
std::string BatchTranslateRequest::getAppName() const {
|
||||
return appName_;
|
||||
}
|
||||
|
||||
void BatchTranslateRequest::setAppName(const std::string &appName) {
|
||||
appName_ = appName;
|
||||
setBodyParameter(std::string("appName"), appName);
|
||||
}
|
||||
|
||||
std::string BatchTranslateRequest::getTargetLanguage() const {
|
||||
return targetLanguage_;
|
||||
}
|
||||
|
||||
void BatchTranslateRequest::setTargetLanguage(const std::string &targetLanguage) {
|
||||
targetLanguage_ = targetLanguage;
|
||||
setBodyParameter(std::string("targetLanguage"), targetLanguage);
|
||||
}
|
||||
|
||||
std::map<std::string, std::string> BatchTranslateRequest::getText() const {
|
||||
return text_;
|
||||
}
|
||||
|
||||
void BatchTranslateRequest::setText(const std::map<std::string, std::string> &text) {
|
||||
text_ = text;
|
||||
for(auto const &iter1 : text) {
|
||||
setBodyParameter(std::string("text") + "." + iter1.first, iter1.second);
|
||||
}
|
||||
}
|
||||
|
||||
std::string BatchTranslateRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void BatchTranslateRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
106
anytrans/src/model/BatchTranslateResult.cc
Normal file
106
anytrans/src/model/BatchTranslateResult.cc
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/BatchTranslateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
BatchTranslateResult::BatchTranslateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
BatchTranslateResult::BatchTranslateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
BatchTranslateResult::~BatchTranslateResult()
|
||||
{}
|
||||
|
||||
void BatchTranslateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
auto alltranslationListNode = dataNode["translationList"]["translationListItem"];
|
||||
for (auto dataNodetranslationListtranslationListItem : alltranslationListNode)
|
||||
{
|
||||
Data::TranslationListItem translationListItemObject;
|
||||
if(!dataNodetranslationListtranslationListItem["code"].isNull())
|
||||
translationListItemObject.code = std::stol(dataNodetranslationListtranslationListItem["code"].asString());
|
||||
if(!dataNodetranslationListtranslationListItem["message"].isNull())
|
||||
translationListItemObject.message = dataNodetranslationListtranslationListItem["message"].asString();
|
||||
if(!dataNodetranslationListtranslationListItem["index"].isNull())
|
||||
translationListItemObject.index = dataNodetranslationListtranslationListItem["index"].asString();
|
||||
if(!dataNodetranslationListtranslationListItem["translation"].isNull())
|
||||
translationListItemObject.translation = dataNodetranslationListtranslationListItem["translation"].asString();
|
||||
auto usageNode = value["usage"];
|
||||
if(!usageNode["inputTokens"].isNull())
|
||||
translationListItemObject.usage.inputTokens = std::stol(usageNode["inputTokens"].asString());
|
||||
if(!usageNode["outputTokens"].isNull())
|
||||
translationListItemObject.usage.outputTokens = std::stol(usageNode["outputTokens"].asString());
|
||||
if(!usageNode["totalTokens"].isNull())
|
||||
translationListItemObject.usage.totalTokens = std::stol(usageNode["totalTokens"].asString());
|
||||
data_.translationList.push_back(translationListItemObject);
|
||||
}
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string BatchTranslateResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string BatchTranslateResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string BatchTranslateResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
BatchTranslateResult::Data BatchTranslateResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string BatchTranslateResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool BatchTranslateResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
46
anytrans/src/model/GetDocTranslateTaskRequest.cc
Normal file
46
anytrans/src/model/GetDocTranslateTaskRequest.cc
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* 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/anytrans/model/GetDocTranslateTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::GetDocTranslateTaskRequest;
|
||||
|
||||
GetDocTranslateTaskRequest::GetDocTranslateTaskRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/doc/get"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetDocTranslateTaskRequest::~GetDocTranslateTaskRequest() {}
|
||||
|
||||
std::string GetDocTranslateTaskRequest::getTaskId() const {
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
void GetDocTranslateTaskRequest::setTaskId(const std::string &taskId) {
|
||||
taskId_ = taskId;
|
||||
setBodyParameter(std::string("taskId"), taskId);
|
||||
}
|
||||
|
||||
std::string GetDocTranslateTaskRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void GetDocTranslateTaskRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
95
anytrans/src/model/GetDocTranslateTaskResult.cc
Normal file
95
anytrans/src/model/GetDocTranslateTaskResult.cc
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/GetDocTranslateTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
GetDocTranslateTaskResult::GetDocTranslateTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetDocTranslateTaskResult::GetDocTranslateTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetDocTranslateTaskResult::~GetDocTranslateTaskResult()
|
||||
{}
|
||||
|
||||
void GetDocTranslateTaskResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
if(!dataNode["taskId"].isNull())
|
||||
data_.taskId = dataNode["taskId"].asString();
|
||||
if(!dataNode["status"].isNull())
|
||||
data_.status = dataNode["status"].asString();
|
||||
if(!dataNode["charactersCount"].isNull())
|
||||
data_.charactersCount = std::stoi(dataNode["charactersCount"].asString());
|
||||
if(!dataNode["pageCount"].isNull())
|
||||
data_.pageCount = std::stoi(dataNode["pageCount"].asString());
|
||||
if(!dataNode["translateFileUrl"].isNull())
|
||||
data_.translateFileUrl = dataNode["translateFileUrl"].asString();
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetDocTranslateTaskResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string GetDocTranslateTaskResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string GetDocTranslateTaskResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
GetDocTranslateTaskResult::Data GetDocTranslateTaskResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string GetDocTranslateTaskResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool GetDocTranslateTaskResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
46
anytrans/src/model/GetHtmlTranslateTaskRequest.cc
Normal file
46
anytrans/src/model/GetHtmlTranslateTaskRequest.cc
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* 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/anytrans/model/GetHtmlTranslateTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::GetHtmlTranslateTaskRequest;
|
||||
|
||||
GetHtmlTranslateTaskRequest::GetHtmlTranslateTaskRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/html/get"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetHtmlTranslateTaskRequest::~GetHtmlTranslateTaskRequest() {}
|
||||
|
||||
std::string GetHtmlTranslateTaskRequest::getTaskId() const {
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
void GetHtmlTranslateTaskRequest::setTaskId(const std::string &taskId) {
|
||||
taskId_ = taskId;
|
||||
setBodyParameter(std::string("taskId"), taskId);
|
||||
}
|
||||
|
||||
std::string GetHtmlTranslateTaskRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void GetHtmlTranslateTaskRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
94
anytrans/src/model/GetHtmlTranslateTaskResult.cc
Normal file
94
anytrans/src/model/GetHtmlTranslateTaskResult.cc
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* 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/anytrans/model/GetHtmlTranslateTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
GetHtmlTranslateTaskResult::GetHtmlTranslateTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetHtmlTranslateTaskResult::GetHtmlTranslateTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetHtmlTranslateTaskResult::~GetHtmlTranslateTaskResult()
|
||||
{}
|
||||
|
||||
void GetHtmlTranslateTaskResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
if(!dataNode["translation"].isNull())
|
||||
data_.translation = dataNode["translation"].asString();
|
||||
auto usageNode = dataNode["usage"];
|
||||
if(!usageNode["inputTokens"].isNull())
|
||||
data_.usage.inputTokens = std::stol(usageNode["inputTokens"].asString());
|
||||
if(!usageNode["outputTokens"].isNull())
|
||||
data_.usage.outputTokens = std::stol(usageNode["outputTokens"].asString());
|
||||
if(!usageNode["totalTokens"].isNull())
|
||||
data_.usage.totalTokens = std::stol(usageNode["totalTokens"].asString());
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetHtmlTranslateTaskResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string GetHtmlTranslateTaskResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string GetHtmlTranslateTaskResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
GetHtmlTranslateTaskResult::Data GetHtmlTranslateTaskResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string GetHtmlTranslateTaskResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool GetHtmlTranslateTaskResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
46
anytrans/src/model/GetImageTranslateTaskRequest.cc
Normal file
46
anytrans/src/model/GetImageTranslateTaskRequest.cc
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* 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/anytrans/model/GetImageTranslateTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::GetImageTranslateTaskRequest;
|
||||
|
||||
GetImageTranslateTaskRequest::GetImageTranslateTaskRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/image/get"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetImageTranslateTaskRequest::~GetImageTranslateTaskRequest() {}
|
||||
|
||||
std::string GetImageTranslateTaskRequest::getTaskId() const {
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
void GetImageTranslateTaskRequest::setTaskId(const std::string &taskId) {
|
||||
taskId_ = taskId;
|
||||
setBodyParameter(std::string("taskId"), taskId);
|
||||
}
|
||||
|
||||
std::string GetImageTranslateTaskRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void GetImageTranslateTaskRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
185
anytrans/src/model/GetImageTranslateTaskResult.cc
Normal file
185
anytrans/src/model/GetImageTranslateTaskResult.cc
Normal file
@@ -0,0 +1,185 @@
|
||||
/*
|
||||
* 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/anytrans/model/GetImageTranslateTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
GetImageTranslateTaskResult::GetImageTranslateTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetImageTranslateTaskResult::GetImageTranslateTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetImageTranslateTaskResult::~GetImageTranslateTaskResult()
|
||||
{}
|
||||
|
||||
void GetImageTranslateTaskResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
if(!dataNode["traceId"].isNull())
|
||||
data_.traceId = dataNode["traceId"].asString();
|
||||
auto translationNode = dataNode["translation"];
|
||||
if(!translationNode["angle"].isNull())
|
||||
data_.translation.angle = std::stol(translationNode["angle"].asString());
|
||||
if(!translationNode["width"].isNull())
|
||||
data_.translation.width = std::stol(translationNode["width"].asString());
|
||||
if(!translationNode["height"].isNull())
|
||||
data_.translation.height = std::stol(translationNode["height"].asString());
|
||||
if(!translationNode["orgWidth"].isNull())
|
||||
data_.translation.orgWidth = std::stol(translationNode["orgWidth"].asString());
|
||||
if(!translationNode["orgHeight"].isNull())
|
||||
data_.translation.orgHeight = std::stol(translationNode["orgHeight"].asString());
|
||||
if(!translationNode["boxesCount"].isNull())
|
||||
data_.translation.boxesCount = std::stol(translationNode["boxesCount"].asString());
|
||||
auto allboundingBoxesNode = translationNode["boundingBoxes"]["boundingBoxesItem"];
|
||||
for (auto translationNodeboundingBoxesboundingBoxesItem : allboundingBoxesNode)
|
||||
{
|
||||
Data::Translation::BoundingBoxesItem boundingBoxesItemObject;
|
||||
if(!translationNodeboundingBoxesboundingBoxesItem["confidence"].isNull())
|
||||
boundingBoxesItemObject.confidence = std::stof(translationNodeboundingBoxesboundingBoxesItem["confidence"].asString());
|
||||
if(!translationNodeboundingBoxesboundingBoxesItem["text"].isNull())
|
||||
boundingBoxesItemObject.text = translationNodeboundingBoxesboundingBoxesItem["text"].asString();
|
||||
if(!translationNodeboundingBoxesboundingBoxesItem["direction"].isNull())
|
||||
boundingBoxesItemObject.direction = std::stol(translationNodeboundingBoxesboundingBoxesItem["direction"].asString());
|
||||
if(!translationNodeboundingBoxesboundingBoxesItem["tableId"].isNull())
|
||||
boundingBoxesItemObject.tableId = std::stol(translationNodeboundingBoxesboundingBoxesItem["tableId"].asString());
|
||||
if(!translationNodeboundingBoxesboundingBoxesItem["tableCellId"].isNull())
|
||||
boundingBoxesItemObject.tableCellId = std::stol(translationNodeboundingBoxesboundingBoxesItem["tableCellId"].asString());
|
||||
if(!translationNodeboundingBoxesboundingBoxesItem["translation"].isNull())
|
||||
boundingBoxesItemObject.translation = translationNodeboundingBoxesboundingBoxesItem["translation"].asString();
|
||||
auto upLeftNode = value["upLeft"];
|
||||
if(!upLeftNode["x"].isNull())
|
||||
boundingBoxesItemObject.upLeft.x = std::stol(upLeftNode["x"].asString());
|
||||
if(!upLeftNode["y"].isNull())
|
||||
boundingBoxesItemObject.upLeft.y = std::stol(upLeftNode["y"].asString());
|
||||
auto upRightNode = value["upRight"];
|
||||
if(!upRightNode["x"].isNull())
|
||||
boundingBoxesItemObject.upRight.x = std::stol(upRightNode["x"].asString());
|
||||
if(!upRightNode["y"].isNull())
|
||||
boundingBoxesItemObject.upRight.y = std::stol(upRightNode["y"].asString());
|
||||
auto downLeftNode = value["downLeft"];
|
||||
if(!downLeftNode["x"].isNull())
|
||||
boundingBoxesItemObject.downLeft.x = std::stol(downLeftNode["x"].asString());
|
||||
if(!downLeftNode["y"].isNull())
|
||||
boundingBoxesItemObject.downLeft.y = std::stol(downLeftNode["y"].asString());
|
||||
auto downRightNode = value["downRight"];
|
||||
if(!downRightNode["x"].isNull())
|
||||
boundingBoxesItemObject.downRight.x = std::stol(downRightNode["x"].asString());
|
||||
if(!downRightNode["y"].isNull())
|
||||
boundingBoxesItemObject.downRight.y = std::stol(downRightNode["y"].asString());
|
||||
data_.translation.boundingBoxes.push_back(boundingBoxesItemObject);
|
||||
}
|
||||
auto alltableInfosNode = translationNode["tableInfos"]["tableInfosItem"];
|
||||
for (auto translationNodetableInfostableInfosItem : alltableInfosNode)
|
||||
{
|
||||
Data::Translation::TableInfosItem tableInfosItemObject;
|
||||
if(!translationNodetableInfostableInfosItem["tableId"].isNull())
|
||||
tableInfosItemObject.tableId = std::stol(translationNodetableInfostableInfosItem["tableId"].asString());
|
||||
if(!translationNodetableInfostableInfosItem["xCellSize"].isNull())
|
||||
tableInfosItemObject.xCellSize = std::stol(translationNodetableInfostableInfosItem["xCellSize"].asString());
|
||||
if(!translationNodetableInfostableInfosItem["yCellSize"].isNull())
|
||||
tableInfosItemObject.yCellSize = std::stol(translationNodetableInfostableInfosItem["yCellSize"].asString());
|
||||
auto allcellInfosNode = translationNodetableInfostableInfosItem["cellInfos"]["cellInfosItem"];
|
||||
for (auto translationNodetableInfostableInfosItemcellInfoscellInfosItem : allcellInfosNode)
|
||||
{
|
||||
Data::Translation::TableInfosItem::CellInfosItem cellInfosObject;
|
||||
if(!translationNodetableInfostableInfosItemcellInfoscellInfosItem["tableCellId"].isNull())
|
||||
cellInfosObject.tableCellId = std::stol(translationNodetableInfostableInfosItemcellInfoscellInfosItem["tableCellId"].asString());
|
||||
if(!translationNodetableInfostableInfosItemcellInfoscellInfosItem["text"].isNull())
|
||||
cellInfosObject.text = translationNodetableInfostableInfosItemcellInfoscellInfosItem["text"].asString();
|
||||
if(!translationNodetableInfostableInfosItemcellInfoscellInfosItem["xsc"].isNull())
|
||||
cellInfosObject.xsc = std::stol(translationNodetableInfostableInfosItemcellInfoscellInfosItem["xsc"].asString());
|
||||
if(!translationNodetableInfostableInfosItemcellInfoscellInfosItem["xec"].isNull())
|
||||
cellInfosObject.xec = std::stol(translationNodetableInfostableInfosItemcellInfoscellInfosItem["xec"].asString());
|
||||
if(!translationNodetableInfostableInfosItemcellInfoscellInfosItem["ysc"].isNull())
|
||||
cellInfosObject.ysc = std::stol(translationNodetableInfostableInfosItemcellInfoscellInfosItem["ysc"].asString());
|
||||
if(!translationNodetableInfostableInfosItemcellInfoscellInfosItem["yec"].isNull())
|
||||
cellInfosObject.yec = std::stol(translationNodetableInfostableInfosItemcellInfoscellInfosItem["yec"].asString());
|
||||
auto allposNode = translationNodetableInfostableInfosItemcellInfoscellInfosItem["pos"]["posItem"];
|
||||
for (auto translationNodetableInfostableInfosItemcellInfoscellInfosItemposposItem : allposNode)
|
||||
{
|
||||
Data::Translation::TableInfosItem::CellInfosItem::PosItem posObject;
|
||||
if(!translationNodetableInfostableInfosItemcellInfoscellInfosItemposposItem["x"].isNull())
|
||||
posObject.x = std::stol(translationNodetableInfostableInfosItemcellInfoscellInfosItemposposItem["x"].asString());
|
||||
if(!translationNodetableInfostableInfosItemcellInfoscellInfosItemposposItem["y"].isNull())
|
||||
posObject.y = std::stol(translationNodetableInfostableInfosItemcellInfoscellInfosItemposposItem["y"].asString());
|
||||
cellInfosObject.pos.push_back(posObject);
|
||||
}
|
||||
tableInfosItemObject.cellInfos.push_back(cellInfosObject);
|
||||
}
|
||||
data_.translation.tableInfos.push_back(tableInfosItemObject);
|
||||
}
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
if(!value["synchro"].isNull())
|
||||
synchro_ = value["synchro"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::string GetImageTranslateTaskResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string GetImageTranslateTaskResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
bool GetImageTranslateTaskResult::getSynchro()const
|
||||
{
|
||||
return synchro_;
|
||||
}
|
||||
|
||||
std::string GetImageTranslateTaskResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
GetImageTranslateTaskResult::Data GetImageTranslateTaskResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string GetImageTranslateTaskResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool GetImageTranslateTaskResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
46
anytrans/src/model/GetLongTextTranslateTaskRequest.cc
Normal file
46
anytrans/src/model/GetLongTextTranslateTaskRequest.cc
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* 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/anytrans/model/GetLongTextTranslateTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::GetLongTextTranslateTaskRequest;
|
||||
|
||||
GetLongTextTranslateTaskRequest::GetLongTextTranslateTaskRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/longText/get"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetLongTextTranslateTaskRequest::~GetLongTextTranslateTaskRequest() {}
|
||||
|
||||
std::string GetLongTextTranslateTaskRequest::getTaskId() const {
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
void GetLongTextTranslateTaskRequest::setTaskId(const std::string &taskId) {
|
||||
taskId_ = taskId;
|
||||
setBodyParameter(std::string("taskId"), taskId);
|
||||
}
|
||||
|
||||
std::string GetLongTextTranslateTaskRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void GetLongTextTranslateTaskRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
94
anytrans/src/model/GetLongTextTranslateTaskResult.cc
Normal file
94
anytrans/src/model/GetLongTextTranslateTaskResult.cc
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* 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/anytrans/model/GetLongTextTranslateTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
GetLongTextTranslateTaskResult::GetLongTextTranslateTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetLongTextTranslateTaskResult::GetLongTextTranslateTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetLongTextTranslateTaskResult::~GetLongTextTranslateTaskResult()
|
||||
{}
|
||||
|
||||
void GetLongTextTranslateTaskResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
if(!dataNode["translation"].isNull())
|
||||
data_.translation = dataNode["translation"].asString();
|
||||
auto usageNode = dataNode["usage"];
|
||||
if(!usageNode["inputTokens"].isNull())
|
||||
data_.usage.inputTokens = std::stol(usageNode["inputTokens"].asString());
|
||||
if(!usageNode["outputTokens"].isNull())
|
||||
data_.usage.outputTokens = std::stol(usageNode["outputTokens"].asString());
|
||||
if(!usageNode["totalTokens"].isNull())
|
||||
data_.usage.totalTokens = std::stol(usageNode["totalTokens"].asString());
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetLongTextTranslateTaskResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string GetLongTextTranslateTaskResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string GetLongTextTranslateTaskResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
GetLongTextTranslateTaskResult::Data GetLongTextTranslateTaskResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string GetLongTextTranslateTaskResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool GetLongTextTranslateTaskResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
96
anytrans/src/model/SubmitDocTranslateTaskRequest.cc
Normal file
96
anytrans/src/model/SubmitDocTranslateTaskRequest.cc
Normal file
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* 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/anytrans/model/SubmitDocTranslateTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::SubmitDocTranslateTaskRequest;
|
||||
|
||||
SubmitDocTranslateTaskRequest::SubmitDocTranslateTaskRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/doc/submit"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
SubmitDocTranslateTaskRequest::~SubmitDocTranslateTaskRequest() {}
|
||||
|
||||
SubmitDocTranslateTaskRequest::ext SubmitDocTranslateTaskRequest::getExt() const {
|
||||
return ext_;
|
||||
}
|
||||
|
||||
void SubmitDocTranslateTaskRequest::setExt(const SubmitDocTranslateTaskRequest::ext &ext) {
|
||||
ext_ = ext;
|
||||
for(int dep1 = 0; dep1 != ext.terminologies.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".tgt", ext.terminologies[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".src", ext.terminologies[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".config.skipImgTrans", ext.config.skipImgTrans ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".domainHint", ext.domainHint);
|
||||
}
|
||||
|
||||
std::string SubmitDocTranslateTaskRequest::getSourceLanguage() const {
|
||||
return sourceLanguage_;
|
||||
}
|
||||
|
||||
void SubmitDocTranslateTaskRequest::setSourceLanguage(const std::string &sourceLanguage) {
|
||||
sourceLanguage_ = sourceLanguage;
|
||||
setBodyParameter(std::string("sourceLanguage"), sourceLanguage);
|
||||
}
|
||||
|
||||
std::string SubmitDocTranslateTaskRequest::getFormat() const {
|
||||
return format_;
|
||||
}
|
||||
|
||||
void SubmitDocTranslateTaskRequest::setFormat(const std::string &format) {
|
||||
format_ = format;
|
||||
setBodyParameter(std::string("format"), format);
|
||||
}
|
||||
|
||||
std::string SubmitDocTranslateTaskRequest::getScene() const {
|
||||
return scene_;
|
||||
}
|
||||
|
||||
void SubmitDocTranslateTaskRequest::setScene(const std::string &scene) {
|
||||
scene_ = scene;
|
||||
setBodyParameter(std::string("scene"), scene);
|
||||
}
|
||||
|
||||
std::string SubmitDocTranslateTaskRequest::getTargetLanguage() const {
|
||||
return targetLanguage_;
|
||||
}
|
||||
|
||||
void SubmitDocTranslateTaskRequest::setTargetLanguage(const std::string &targetLanguage) {
|
||||
targetLanguage_ = targetLanguage;
|
||||
setBodyParameter(std::string("targetLanguage"), targetLanguage);
|
||||
}
|
||||
|
||||
std::string SubmitDocTranslateTaskRequest::getText() const {
|
||||
return text_;
|
||||
}
|
||||
|
||||
void SubmitDocTranslateTaskRequest::setText(const std::string &text) {
|
||||
text_ = text;
|
||||
setBodyParameter(std::string("text"), text);
|
||||
}
|
||||
|
||||
std::string SubmitDocTranslateTaskRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void SubmitDocTranslateTaskRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
89
anytrans/src/model/SubmitDocTranslateTaskResult.cc
Normal file
89
anytrans/src/model/SubmitDocTranslateTaskResult.cc
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* 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/anytrans/model/SubmitDocTranslateTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
SubmitDocTranslateTaskResult::SubmitDocTranslateTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
SubmitDocTranslateTaskResult::SubmitDocTranslateTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
SubmitDocTranslateTaskResult::~SubmitDocTranslateTaskResult()
|
||||
{}
|
||||
|
||||
void SubmitDocTranslateTaskResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
if(!dataNode["taskId"].isNull())
|
||||
data_.taskId = dataNode["taskId"].asString();
|
||||
if(!dataNode["status"].isNull())
|
||||
data_.status = dataNode["status"].asString();
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string SubmitDocTranslateTaskResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string SubmitDocTranslateTaskResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string SubmitDocTranslateTaskResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
SubmitDocTranslateTaskResult::Data SubmitDocTranslateTaskResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string SubmitDocTranslateTaskResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool SubmitDocTranslateTaskResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
107
anytrans/src/model/SubmitHtmlTranslateTaskRequest.cc
Normal file
107
anytrans/src/model/SubmitHtmlTranslateTaskRequest.cc
Normal file
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* 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/anytrans/model/SubmitHtmlTranslateTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::SubmitHtmlTranslateTaskRequest;
|
||||
|
||||
SubmitHtmlTranslateTaskRequest::SubmitHtmlTranslateTaskRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/html/submit"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
SubmitHtmlTranslateTaskRequest::~SubmitHtmlTranslateTaskRequest() {}
|
||||
|
||||
SubmitHtmlTranslateTaskRequest::ext SubmitHtmlTranslateTaskRequest::getExt() const {
|
||||
return ext_;
|
||||
}
|
||||
|
||||
void SubmitHtmlTranslateTaskRequest::setExt(const SubmitHtmlTranslateTaskRequest::ext &ext) {
|
||||
ext_ = ext;
|
||||
for(int dep1 = 0; dep1 != ext.sensitives.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".sensitives." + std::to_string(dep1 + 1), ext.sensitives[dep1]);
|
||||
}
|
||||
for(int dep1 = 0; dep1 != ext.terminologies.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".tgt", ext.terminologies[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".src", ext.terminologies[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toLower", ext.textTransform.toLower ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toUpper", ext.textTransform.toUpper ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toTitle", ext.textTransform.toTitle ? "true" : "false");
|
||||
for(int dep1 = 0; dep1 != ext.examples.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".tgt", ext.examples[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".src", ext.examples[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".config.skipCsiCheck", ext.config.skipCsiCheck ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".config.callbackUrl", ext.config.callbackUrl);
|
||||
setBodyParameter(std::string("ext") + ".domainHint", ext.domainHint);
|
||||
}
|
||||
|
||||
std::string SubmitHtmlTranslateTaskRequest::getSourceLanguage() const {
|
||||
return sourceLanguage_;
|
||||
}
|
||||
|
||||
void SubmitHtmlTranslateTaskRequest::setSourceLanguage(const std::string &sourceLanguage) {
|
||||
sourceLanguage_ = sourceLanguage;
|
||||
setBodyParameter(std::string("sourceLanguage"), sourceLanguage);
|
||||
}
|
||||
|
||||
std::string SubmitHtmlTranslateTaskRequest::getFormat() const {
|
||||
return format_;
|
||||
}
|
||||
|
||||
void SubmitHtmlTranslateTaskRequest::setFormat(const std::string &format) {
|
||||
format_ = format;
|
||||
setBodyParameter(std::string("format"), format);
|
||||
}
|
||||
|
||||
std::string SubmitHtmlTranslateTaskRequest::getScene() const {
|
||||
return scene_;
|
||||
}
|
||||
|
||||
void SubmitHtmlTranslateTaskRequest::setScene(const std::string &scene) {
|
||||
scene_ = scene;
|
||||
setBodyParameter(std::string("scene"), scene);
|
||||
}
|
||||
|
||||
std::string SubmitHtmlTranslateTaskRequest::getTargetLanguage() const {
|
||||
return targetLanguage_;
|
||||
}
|
||||
|
||||
void SubmitHtmlTranslateTaskRequest::setTargetLanguage(const std::string &targetLanguage) {
|
||||
targetLanguage_ = targetLanguage;
|
||||
setBodyParameter(std::string("targetLanguage"), targetLanguage);
|
||||
}
|
||||
|
||||
std::string SubmitHtmlTranslateTaskRequest::getText() const {
|
||||
return text_;
|
||||
}
|
||||
|
||||
void SubmitHtmlTranslateTaskRequest::setText(const std::string &text) {
|
||||
text_ = text;
|
||||
setBodyParameter(std::string("text"), text);
|
||||
}
|
||||
|
||||
std::string SubmitHtmlTranslateTaskRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void SubmitHtmlTranslateTaskRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
89
anytrans/src/model/SubmitHtmlTranslateTaskResult.cc
Normal file
89
anytrans/src/model/SubmitHtmlTranslateTaskResult.cc
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* 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/anytrans/model/SubmitHtmlTranslateTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
SubmitHtmlTranslateTaskResult::SubmitHtmlTranslateTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
SubmitHtmlTranslateTaskResult::SubmitHtmlTranslateTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
SubmitHtmlTranslateTaskResult::~SubmitHtmlTranslateTaskResult()
|
||||
{}
|
||||
|
||||
void SubmitHtmlTranslateTaskResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
if(!dataNode["taskId"].isNull())
|
||||
data_.taskId = dataNode["taskId"].asString();
|
||||
if(!dataNode["status"].isNull())
|
||||
data_.status = dataNode["status"].asString();
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string SubmitHtmlTranslateTaskResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string SubmitHtmlTranslateTaskResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string SubmitHtmlTranslateTaskResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
SubmitHtmlTranslateTaskResult::Data SubmitHtmlTranslateTaskResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string SubmitHtmlTranslateTaskResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool SubmitHtmlTranslateTaskResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
107
anytrans/src/model/SubmitImageTranslateTaskRequest.cc
Normal file
107
anytrans/src/model/SubmitImageTranslateTaskRequest.cc
Normal file
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* 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/anytrans/model/SubmitImageTranslateTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::SubmitImageTranslateTaskRequest;
|
||||
|
||||
SubmitImageTranslateTaskRequest::SubmitImageTranslateTaskRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/image/submit"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
SubmitImageTranslateTaskRequest::~SubmitImageTranslateTaskRequest() {}
|
||||
|
||||
SubmitImageTranslateTaskRequest::ext SubmitImageTranslateTaskRequest::getExt() const {
|
||||
return ext_;
|
||||
}
|
||||
|
||||
void SubmitImageTranslateTaskRequest::setExt(const SubmitImageTranslateTaskRequest::ext &ext) {
|
||||
ext_ = ext;
|
||||
for(int dep1 = 0; dep1 != ext.sensitives.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".sensitives." + std::to_string(dep1 + 1), ext.sensitives[dep1]);
|
||||
}
|
||||
for(int dep1 = 0; dep1 != ext.terminologies.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".tgt", ext.terminologies[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".src", ext.terminologies[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toLower", ext.textTransform.toLower ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toUpper", ext.textTransform.toUpper ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toTitle", ext.textTransform.toTitle ? "true" : "false");
|
||||
for(int dep1 = 0; dep1 != ext.examples.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".tgt", ext.examples[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".src", ext.examples[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".domainHint", ext.domainHint);
|
||||
}
|
||||
|
||||
std::string SubmitImageTranslateTaskRequest::getSourceLanguage() const {
|
||||
return sourceLanguage_;
|
||||
}
|
||||
|
||||
void SubmitImageTranslateTaskRequest::setSourceLanguage(const std::string &sourceLanguage) {
|
||||
sourceLanguage_ = sourceLanguage;
|
||||
setBodyParameter(std::string("sourceLanguage"), sourceLanguage);
|
||||
}
|
||||
|
||||
std::string SubmitImageTranslateTaskRequest::getFormat() const {
|
||||
return format_;
|
||||
}
|
||||
|
||||
void SubmitImageTranslateTaskRequest::setFormat(const std::string &format) {
|
||||
format_ = format;
|
||||
setBodyParameter(std::string("format"), format);
|
||||
}
|
||||
|
||||
std::string SubmitImageTranslateTaskRequest::getScene() const {
|
||||
return scene_;
|
||||
}
|
||||
|
||||
void SubmitImageTranslateTaskRequest::setScene(const std::string &scene) {
|
||||
scene_ = scene;
|
||||
setBodyParameter(std::string("scene"), scene);
|
||||
}
|
||||
|
||||
std::string SubmitImageTranslateTaskRequest::getText() const {
|
||||
return text_;
|
||||
}
|
||||
|
||||
void SubmitImageTranslateTaskRequest::setText(const std::string &text) {
|
||||
text_ = text;
|
||||
setBodyParameter(std::string("text"), text);
|
||||
}
|
||||
|
||||
std::vector<SubmitImageTranslateTaskRequest::std::string> SubmitImageTranslateTaskRequest::getTargetLanguage() const {
|
||||
return targetLanguage_;
|
||||
}
|
||||
|
||||
void SubmitImageTranslateTaskRequest::setTargetLanguage(const std::vector<SubmitImageTranslateTaskRequest::std::string> &targetLanguage) {
|
||||
targetLanguage_ = targetLanguage;
|
||||
for(int dep1 = 0; dep1 != targetLanguage.size(); dep1++) {
|
||||
setBodyParameter(std::string("targetLanguage") + "." + std::to_string(dep1 + 1), targetLanguage[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
std::string SubmitImageTranslateTaskRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void SubmitImageTranslateTaskRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
89
anytrans/src/model/SubmitImageTranslateTaskResult.cc
Normal file
89
anytrans/src/model/SubmitImageTranslateTaskResult.cc
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* 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/anytrans/model/SubmitImageTranslateTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
SubmitImageTranslateTaskResult::SubmitImageTranslateTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
SubmitImageTranslateTaskResult::SubmitImageTranslateTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
SubmitImageTranslateTaskResult::~SubmitImageTranslateTaskResult()
|
||||
{}
|
||||
|
||||
void SubmitImageTranslateTaskResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
if(!dataNode["taskId"].isNull())
|
||||
data_.taskId = dataNode["taskId"].asString();
|
||||
if(!dataNode["status"].isNull())
|
||||
data_.status = dataNode["status"].asString();
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string SubmitImageTranslateTaskResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string SubmitImageTranslateTaskResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string SubmitImageTranslateTaskResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
SubmitImageTranslateTaskResult::Data SubmitImageTranslateTaskResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string SubmitImageTranslateTaskResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool SubmitImageTranslateTaskResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
106
anytrans/src/model/SubmitLongTextTranslateTaskRequest.cc
Normal file
106
anytrans/src/model/SubmitLongTextTranslateTaskRequest.cc
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/SubmitLongTextTranslateTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::SubmitLongTextTranslateTaskRequest;
|
||||
|
||||
SubmitLongTextTranslateTaskRequest::SubmitLongTextTranslateTaskRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/longText/submit"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
SubmitLongTextTranslateTaskRequest::~SubmitLongTextTranslateTaskRequest() {}
|
||||
|
||||
SubmitLongTextTranslateTaskRequest::ext SubmitLongTextTranslateTaskRequest::getExt() const {
|
||||
return ext_;
|
||||
}
|
||||
|
||||
void SubmitLongTextTranslateTaskRequest::setExt(const SubmitLongTextTranslateTaskRequest::ext &ext) {
|
||||
ext_ = ext;
|
||||
for(int dep1 = 0; dep1 != ext.sensitives.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".sensitives." + std::to_string(dep1 + 1), ext.sensitives[dep1]);
|
||||
}
|
||||
for(int dep1 = 0; dep1 != ext.terminologies.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".tgt", ext.terminologies[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".src", ext.terminologies[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toLower", ext.textTransform.toLower ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toUpper", ext.textTransform.toUpper ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toTitle", ext.textTransform.toTitle ? "true" : "false");
|
||||
for(int dep1 = 0; dep1 != ext.examples.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".tgt", ext.examples[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".src", ext.examples[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".config.skipCsiCheck", ext.config.skipCsiCheck ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".domainHint", ext.domainHint);
|
||||
}
|
||||
|
||||
std::string SubmitLongTextTranslateTaskRequest::getSourceLanguage() const {
|
||||
return sourceLanguage_;
|
||||
}
|
||||
|
||||
void SubmitLongTextTranslateTaskRequest::setSourceLanguage(const std::string &sourceLanguage) {
|
||||
sourceLanguage_ = sourceLanguage;
|
||||
setBodyParameter(std::string("sourceLanguage"), sourceLanguage);
|
||||
}
|
||||
|
||||
std::string SubmitLongTextTranslateTaskRequest::getFormat() const {
|
||||
return format_;
|
||||
}
|
||||
|
||||
void SubmitLongTextTranslateTaskRequest::setFormat(const std::string &format) {
|
||||
format_ = format;
|
||||
setBodyParameter(std::string("format"), format);
|
||||
}
|
||||
|
||||
std::string SubmitLongTextTranslateTaskRequest::getScene() const {
|
||||
return scene_;
|
||||
}
|
||||
|
||||
void SubmitLongTextTranslateTaskRequest::setScene(const std::string &scene) {
|
||||
scene_ = scene;
|
||||
setBodyParameter(std::string("scene"), scene);
|
||||
}
|
||||
|
||||
std::string SubmitLongTextTranslateTaskRequest::getTargetLanguage() const {
|
||||
return targetLanguage_;
|
||||
}
|
||||
|
||||
void SubmitLongTextTranslateTaskRequest::setTargetLanguage(const std::string &targetLanguage) {
|
||||
targetLanguage_ = targetLanguage;
|
||||
setBodyParameter(std::string("targetLanguage"), targetLanguage);
|
||||
}
|
||||
|
||||
std::string SubmitLongTextTranslateTaskRequest::getText() const {
|
||||
return text_;
|
||||
}
|
||||
|
||||
void SubmitLongTextTranslateTaskRequest::setText(const std::string &text) {
|
||||
text_ = text;
|
||||
setBodyParameter(std::string("text"), text);
|
||||
}
|
||||
|
||||
std::string SubmitLongTextTranslateTaskRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void SubmitLongTextTranslateTaskRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
89
anytrans/src/model/SubmitLongTextTranslateTaskResult.cc
Normal file
89
anytrans/src/model/SubmitLongTextTranslateTaskResult.cc
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* 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/anytrans/model/SubmitLongTextTranslateTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
SubmitLongTextTranslateTaskResult::SubmitLongTextTranslateTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
SubmitLongTextTranslateTaskResult::SubmitLongTextTranslateTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
SubmitLongTextTranslateTaskResult::~SubmitLongTextTranslateTaskResult()
|
||||
{}
|
||||
|
||||
void SubmitLongTextTranslateTaskResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
if(!dataNode["taskId"].isNull())
|
||||
data_.taskId = dataNode["taskId"].asString();
|
||||
if(!dataNode["status"].isNull())
|
||||
data_.status = dataNode["status"].asString();
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string SubmitLongTextTranslateTaskResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string SubmitLongTextTranslateTaskResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string SubmitLongTextTranslateTaskResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
SubmitLongTextTranslateTaskResult::Data SubmitLongTextTranslateTaskResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string SubmitLongTextTranslateTaskResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool SubmitLongTextTranslateTaskResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
86
anytrans/src/model/TermEditRequest.cc
Normal file
86
anytrans/src/model/TermEditRequest.cc
Normal 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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/TermEditRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::TermEditRequest;
|
||||
|
||||
TermEditRequest::TermEditRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/intervene/edit"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
TermEditRequest::~TermEditRequest() {}
|
||||
|
||||
TermEditRequest::ext TermEditRequest::getExt() const {
|
||||
return ext_;
|
||||
}
|
||||
|
||||
void TermEditRequest::setExt(const TermEditRequest::ext &ext) {
|
||||
ext_ = ext;
|
||||
for(int dep1 = 0; dep1 != ext.terms.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".terms." + std::to_string(dep1 + 1) + ".tgt", ext.terms[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".terms." + std::to_string(dep1 + 1) + ".termId", ext.terms[dep1].termId);
|
||||
setBodyParameter(std::string("ext") + ".terms." + std::to_string(dep1 + 1) + ".src", ext.terms[dep1].src);
|
||||
}
|
||||
}
|
||||
|
||||
std::string TermEditRequest::getSourceLanguage() const {
|
||||
return sourceLanguage_;
|
||||
}
|
||||
|
||||
void TermEditRequest::setSourceLanguage(const std::string &sourceLanguage) {
|
||||
sourceLanguage_ = sourceLanguage;
|
||||
setBodyParameter(std::string("sourceLanguage"), sourceLanguage);
|
||||
}
|
||||
|
||||
std::string TermEditRequest::getScene() const {
|
||||
return scene_;
|
||||
}
|
||||
|
||||
void TermEditRequest::setScene(const std::string &scene) {
|
||||
scene_ = scene;
|
||||
setBodyParameter(std::string("scene"), scene);
|
||||
}
|
||||
|
||||
std::string TermEditRequest::getAction() const {
|
||||
return action_;
|
||||
}
|
||||
|
||||
void TermEditRequest::setAction(const std::string &action) {
|
||||
action_ = action;
|
||||
setBodyParameter(std::string("action"), action);
|
||||
}
|
||||
|
||||
std::string TermEditRequest::getTargetLanguage() const {
|
||||
return targetLanguage_;
|
||||
}
|
||||
|
||||
void TermEditRequest::setTargetLanguage(const std::string &targetLanguage) {
|
||||
targetLanguage_ = targetLanguage;
|
||||
setBodyParameter(std::string("targetLanguage"), targetLanguage);
|
||||
}
|
||||
|
||||
std::string TermEditRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void TermEditRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
99
anytrans/src/model/TermEditResult.cc
Normal file
99
anytrans/src/model/TermEditResult.cc
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* 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/anytrans/model/TermEditResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
TermEditResult::TermEditResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
TermEditResult::TermEditResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
TermEditResult::~TermEditResult()
|
||||
{}
|
||||
|
||||
void TermEditResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
if(!dataNode["failCount"].isNull())
|
||||
data_.failCount = std::stol(dataNode["failCount"].asString());
|
||||
auto alltermsNode = dataNode["terms"]["termsItem"];
|
||||
for (auto dataNodetermstermsItem : alltermsNode)
|
||||
{
|
||||
Data::TermsItem termsItemObject;
|
||||
if(!dataNodetermstermsItem["termId"].isNull())
|
||||
termsItemObject.termId = dataNodetermstermsItem["termId"].asString();
|
||||
if(!dataNodetermstermsItem["src"].isNull())
|
||||
termsItemObject.src = dataNodetermstermsItem["src"].asString();
|
||||
if(!dataNodetermstermsItem["tgt"].isNull())
|
||||
termsItemObject.tgt = dataNodetermstermsItem["tgt"].asString();
|
||||
data_.terms.push_back(termsItemObject);
|
||||
}
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string TermEditResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string TermEditResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string TermEditResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
TermEditResult::Data TermEditResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string TermEditResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool TermEditResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
73
anytrans/src/model/TermQueryRequest.cc
Normal file
73
anytrans/src/model/TermQueryRequest.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/TermQueryRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::TermQueryRequest;
|
||||
|
||||
TermQueryRequest::TermQueryRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/intervene/query"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
TermQueryRequest::~TermQueryRequest() {}
|
||||
|
||||
std::string TermQueryRequest::getSourceLanguage() const {
|
||||
return sourceLanguage_;
|
||||
}
|
||||
|
||||
void TermQueryRequest::setSourceLanguage(const std::string &sourceLanguage) {
|
||||
sourceLanguage_ = sourceLanguage;
|
||||
setBodyParameter(std::string("sourceLanguage"), sourceLanguage);
|
||||
}
|
||||
|
||||
std::string TermQueryRequest::getScene() const {
|
||||
return scene_;
|
||||
}
|
||||
|
||||
void TermQueryRequest::setScene(const std::string &scene) {
|
||||
scene_ = scene;
|
||||
setBodyParameter(std::string("scene"), scene);
|
||||
}
|
||||
|
||||
std::string TermQueryRequest::getTargetLanguage() const {
|
||||
return targetLanguage_;
|
||||
}
|
||||
|
||||
void TermQueryRequest::setTargetLanguage(const std::string &targetLanguage) {
|
||||
targetLanguage_ = targetLanguage;
|
||||
setBodyParameter(std::string("targetLanguage"), targetLanguage);
|
||||
}
|
||||
|
||||
std::string TermQueryRequest::getText() const {
|
||||
return text_;
|
||||
}
|
||||
|
||||
void TermQueryRequest::setText(const std::string &text) {
|
||||
text_ = text;
|
||||
setBodyParameter(std::string("text"), text);
|
||||
}
|
||||
|
||||
std::string TermQueryRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void TermQueryRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
99
anytrans/src/model/TermQueryResult.cc
Normal file
99
anytrans/src/model/TermQueryResult.cc
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* 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/anytrans/model/TermQueryResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
TermQueryResult::TermQueryResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
TermQueryResult::TermQueryResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
TermQueryResult::~TermQueryResult()
|
||||
{}
|
||||
|
||||
void TermQueryResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
if(!dataNode["failCount"].isNull())
|
||||
data_.failCount = std::stol(dataNode["failCount"].asString());
|
||||
auto alltermsNode = dataNode["terms"]["termsItem"];
|
||||
for (auto dataNodetermstermsItem : alltermsNode)
|
||||
{
|
||||
Data::TermsItem termsItemObject;
|
||||
if(!dataNodetermstermsItem["termId"].isNull())
|
||||
termsItemObject.termId = dataNodetermstermsItem["termId"].asString();
|
||||
if(!dataNodetermstermsItem["src"].isNull())
|
||||
termsItemObject.src = dataNodetermstermsItem["src"].asString();
|
||||
if(!dataNodetermstermsItem["tgt"].isNull())
|
||||
termsItemObject.tgt = dataNodetermstermsItem["tgt"].asString();
|
||||
data_.terms.push_back(termsItemObject);
|
||||
}
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string TermQueryResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string TermQueryResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string TermQueryResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
TermQueryResult::Data TermQueryResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string TermQueryResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool TermQueryResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
107
anytrans/src/model/TextTranslateRequest.cc
Normal file
107
anytrans/src/model/TextTranslateRequest.cc
Normal file
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* 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/anytrans/model/TextTranslateRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::TextTranslateRequest;
|
||||
|
||||
TextTranslateRequest::TextTranslateRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/text"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
TextTranslateRequest::~TextTranslateRequest() {}
|
||||
|
||||
TextTranslateRequest::ext TextTranslateRequest::getExt() const {
|
||||
return ext_;
|
||||
}
|
||||
|
||||
void TextTranslateRequest::setExt(const TextTranslateRequest::ext &ext) {
|
||||
ext_ = ext;
|
||||
for(int dep1 = 0; dep1 != ext.sensitives.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".sensitives." + std::to_string(dep1 + 1), ext.sensitives[dep1]);
|
||||
}
|
||||
for(int dep1 = 0; dep1 != ext.terminologies.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".tgt", ext.terminologies[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".src", ext.terminologies[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toLower", ext.textTransform.toLower ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toUpper", ext.textTransform.toUpper ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toTitle", ext.textTransform.toTitle ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".agent", ext.agent);
|
||||
for(int dep1 = 0; dep1 != ext.examples.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".tgt", ext.examples[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".src", ext.examples[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".config.skipCsiCheck", ext.config.skipCsiCheck ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".domainHint", ext.domainHint);
|
||||
}
|
||||
|
||||
std::string TextTranslateRequest::getSourceLanguage() const {
|
||||
return sourceLanguage_;
|
||||
}
|
||||
|
||||
void TextTranslateRequest::setSourceLanguage(const std::string &sourceLanguage) {
|
||||
sourceLanguage_ = sourceLanguage;
|
||||
setBodyParameter(std::string("sourceLanguage"), sourceLanguage);
|
||||
}
|
||||
|
||||
std::string TextTranslateRequest::getFormat() const {
|
||||
return format_;
|
||||
}
|
||||
|
||||
void TextTranslateRequest::setFormat(const std::string &format) {
|
||||
format_ = format;
|
||||
setBodyParameter(std::string("format"), format);
|
||||
}
|
||||
|
||||
std::string TextTranslateRequest::getScene() const {
|
||||
return scene_;
|
||||
}
|
||||
|
||||
void TextTranslateRequest::setScene(const std::string &scene) {
|
||||
scene_ = scene;
|
||||
setBodyParameter(std::string("scene"), scene);
|
||||
}
|
||||
|
||||
std::string TextTranslateRequest::getTargetLanguage() const {
|
||||
return targetLanguage_;
|
||||
}
|
||||
|
||||
void TextTranslateRequest::setTargetLanguage(const std::string &targetLanguage) {
|
||||
targetLanguage_ = targetLanguage;
|
||||
setBodyParameter(std::string("targetLanguage"), targetLanguage);
|
||||
}
|
||||
|
||||
std::string TextTranslateRequest::getText() const {
|
||||
return text_;
|
||||
}
|
||||
|
||||
void TextTranslateRequest::setText(const std::string &text) {
|
||||
text_ = text;
|
||||
setBodyParameter(std::string("text"), text);
|
||||
}
|
||||
|
||||
std::string TextTranslateRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void TextTranslateRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
94
anytrans/src/model/TextTranslateResult.cc
Normal file
94
anytrans/src/model/TextTranslateResult.cc
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* 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/anytrans/model/TextTranslateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
TextTranslateResult::TextTranslateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
TextTranslateResult::TextTranslateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
TextTranslateResult::~TextTranslateResult()
|
||||
{}
|
||||
|
||||
void TextTranslateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
if(!dataNode["translation"].isNull())
|
||||
data_.translation = dataNode["translation"].asString();
|
||||
auto usageNode = dataNode["usage"];
|
||||
if(!usageNode["inputTokens"].isNull())
|
||||
data_.usage.inputTokens = std::stol(usageNode["inputTokens"].asString());
|
||||
if(!usageNode["outputTokens"].isNull())
|
||||
data_.usage.outputTokens = std::stol(usageNode["outputTokens"].asString());
|
||||
if(!usageNode["totalTokens"].isNull())
|
||||
data_.usage.totalTokens = std::stol(usageNode["totalTokens"].asString());
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string TextTranslateResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string TextTranslateResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string TextTranslateResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
TextTranslateResult::Data TextTranslateResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string TextTranslateResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool TextTranslateResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@ set(dds_public_header
|
||||
include/alibabacloud/dds/DdsExport.h )
|
||||
|
||||
set(dds_public_header_model
|
||||
include/alibabacloud/dds/model/AllocateDBInstanceSrvNetworkAddressRequest.h
|
||||
include/alibabacloud/dds/model/AllocateDBInstanceSrvNetworkAddressResult.h
|
||||
include/alibabacloud/dds/model/AllocateNodePrivateNetworkAddressRequest.h
|
||||
include/alibabacloud/dds/model/AllocateNodePrivateNetworkAddressResult.h
|
||||
include/alibabacloud/dds/model/AllocatePublicNetworkAddressRequest.h
|
||||
@@ -229,6 +231,8 @@ set(dds_public_header_model
|
||||
include/alibabacloud/dds/model/ModifySecurityGroupConfigurationResult.h
|
||||
include/alibabacloud/dds/model/ModifySecurityIpsRequest.h
|
||||
include/alibabacloud/dds/model/ModifySecurityIpsResult.h
|
||||
include/alibabacloud/dds/model/ModifySrvNetworkAddressRequest.h
|
||||
include/alibabacloud/dds/model/ModifySrvNetworkAddressResult.h
|
||||
include/alibabacloud/dds/model/ModifyTaskInfoRequest.h
|
||||
include/alibabacloud/dds/model/ModifyTaskInfoResult.h
|
||||
include/alibabacloud/dds/model/ReleaseNodePrivateNetworkAddressRequest.h
|
||||
@@ -262,6 +266,8 @@ set(dds_public_header_model
|
||||
|
||||
set(dds_src
|
||||
src/DdsClient.cc
|
||||
src/model/AllocateDBInstanceSrvNetworkAddressRequest.cc
|
||||
src/model/AllocateDBInstanceSrvNetworkAddressResult.cc
|
||||
src/model/AllocateNodePrivateNetworkAddressRequest.cc
|
||||
src/model/AllocateNodePrivateNetworkAddressResult.cc
|
||||
src/model/AllocatePublicNetworkAddressRequest.cc
|
||||
@@ -470,6 +476,8 @@ set(dds_src
|
||||
src/model/ModifySecurityGroupConfigurationResult.cc
|
||||
src/model/ModifySecurityIpsRequest.cc
|
||||
src/model/ModifySecurityIpsResult.cc
|
||||
src/model/ModifySrvNetworkAddressRequest.cc
|
||||
src/model/ModifySrvNetworkAddressResult.cc
|
||||
src/model/ModifyTaskInfoRequest.cc
|
||||
src/model/ModifyTaskInfoResult.cc
|
||||
src/model/ReleaseNodePrivateNetworkAddressRequest.cc
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#include <alibabacloud/core/EndpointProvider.h>
|
||||
#include <alibabacloud/core/RpcServiceClient.h>
|
||||
#include "DdsExport.h"
|
||||
#include "model/AllocateDBInstanceSrvNetworkAddressRequest.h"
|
||||
#include "model/AllocateDBInstanceSrvNetworkAddressResult.h"
|
||||
#include "model/AllocateNodePrivateNetworkAddressRequest.h"
|
||||
#include "model/AllocateNodePrivateNetworkAddressResult.h"
|
||||
#include "model/AllocatePublicNetworkAddressRequest.h"
|
||||
@@ -230,6 +232,8 @@
|
||||
#include "model/ModifySecurityGroupConfigurationResult.h"
|
||||
#include "model/ModifySecurityIpsRequest.h"
|
||||
#include "model/ModifySecurityIpsResult.h"
|
||||
#include "model/ModifySrvNetworkAddressRequest.h"
|
||||
#include "model/ModifySrvNetworkAddressResult.h"
|
||||
#include "model/ModifyTaskInfoRequest.h"
|
||||
#include "model/ModifyTaskInfoResult.h"
|
||||
#include "model/ReleaseNodePrivateNetworkAddressRequest.h"
|
||||
@@ -269,6 +273,9 @@ namespace AlibabaCloud
|
||||
class ALIBABACLOUD_DDS_EXPORT DdsClient : public RpcServiceClient
|
||||
{
|
||||
public:
|
||||
typedef Outcome<Error, Model::AllocateDBInstanceSrvNetworkAddressResult> AllocateDBInstanceSrvNetworkAddressOutcome;
|
||||
typedef std::future<AllocateDBInstanceSrvNetworkAddressOutcome> AllocateDBInstanceSrvNetworkAddressOutcomeCallable;
|
||||
typedef std::function<void(const DdsClient*, const Model::AllocateDBInstanceSrvNetworkAddressRequest&, const AllocateDBInstanceSrvNetworkAddressOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AllocateDBInstanceSrvNetworkAddressAsyncHandler;
|
||||
typedef Outcome<Error, Model::AllocateNodePrivateNetworkAddressResult> AllocateNodePrivateNetworkAddressOutcome;
|
||||
typedef std::future<AllocateNodePrivateNetworkAddressOutcome> AllocateNodePrivateNetworkAddressOutcomeCallable;
|
||||
typedef std::function<void(const DdsClient*, const Model::AllocateNodePrivateNetworkAddressRequest&, const AllocateNodePrivateNetworkAddressOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AllocateNodePrivateNetworkAddressAsyncHandler;
|
||||
@@ -581,6 +588,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::ModifySecurityIpsResult> ModifySecurityIpsOutcome;
|
||||
typedef std::future<ModifySecurityIpsOutcome> ModifySecurityIpsOutcomeCallable;
|
||||
typedef std::function<void(const DdsClient*, const Model::ModifySecurityIpsRequest&, const ModifySecurityIpsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifySecurityIpsAsyncHandler;
|
||||
typedef Outcome<Error, Model::ModifySrvNetworkAddressResult> ModifySrvNetworkAddressOutcome;
|
||||
typedef std::future<ModifySrvNetworkAddressOutcome> ModifySrvNetworkAddressOutcomeCallable;
|
||||
typedef std::function<void(const DdsClient*, const Model::ModifySrvNetworkAddressRequest&, const ModifySrvNetworkAddressOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifySrvNetworkAddressAsyncHandler;
|
||||
typedef Outcome<Error, Model::ModifyTaskInfoResult> ModifyTaskInfoOutcome;
|
||||
typedef std::future<ModifyTaskInfoOutcome> ModifyTaskInfoOutcomeCallable;
|
||||
typedef std::function<void(const DdsClient*, const Model::ModifyTaskInfoRequest&, const ModifyTaskInfoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyTaskInfoAsyncHandler;
|
||||
@@ -631,6 +641,9 @@ namespace AlibabaCloud
|
||||
DdsClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||
DdsClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||
~DdsClient();
|
||||
AllocateDBInstanceSrvNetworkAddressOutcome allocateDBInstanceSrvNetworkAddress(const Model::AllocateDBInstanceSrvNetworkAddressRequest &request)const;
|
||||
void allocateDBInstanceSrvNetworkAddressAsync(const Model::AllocateDBInstanceSrvNetworkAddressRequest& request, const AllocateDBInstanceSrvNetworkAddressAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
AllocateDBInstanceSrvNetworkAddressOutcomeCallable allocateDBInstanceSrvNetworkAddressCallable(const Model::AllocateDBInstanceSrvNetworkAddressRequest& request) const;
|
||||
AllocateNodePrivateNetworkAddressOutcome allocateNodePrivateNetworkAddress(const Model::AllocateNodePrivateNetworkAddressRequest &request)const;
|
||||
void allocateNodePrivateNetworkAddressAsync(const Model::AllocateNodePrivateNetworkAddressRequest& request, const AllocateNodePrivateNetworkAddressAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
AllocateNodePrivateNetworkAddressOutcomeCallable allocateNodePrivateNetworkAddressCallable(const Model::AllocateNodePrivateNetworkAddressRequest& request) const;
|
||||
@@ -943,6 +956,9 @@ namespace AlibabaCloud
|
||||
ModifySecurityIpsOutcome modifySecurityIps(const Model::ModifySecurityIpsRequest &request)const;
|
||||
void modifySecurityIpsAsync(const Model::ModifySecurityIpsRequest& request, const ModifySecurityIpsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ModifySecurityIpsOutcomeCallable modifySecurityIpsCallable(const Model::ModifySecurityIpsRequest& request) const;
|
||||
ModifySrvNetworkAddressOutcome modifySrvNetworkAddress(const Model::ModifySrvNetworkAddressRequest &request)const;
|
||||
void modifySrvNetworkAddressAsync(const Model::ModifySrvNetworkAddressRequest& request, const ModifySrvNetworkAddressAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ModifySrvNetworkAddressOutcomeCallable modifySrvNetworkAddressCallable(const Model::ModifySrvNetworkAddressRequest& request) const;
|
||||
ModifyTaskInfoOutcome modifyTaskInfo(const Model::ModifyTaskInfoRequest &request)const;
|
||||
void modifyTaskInfoAsync(const Model::ModifyTaskInfoRequest& request, const ModifyTaskInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ModifyTaskInfoOutcomeCallable modifyTaskInfoCallable(const Model::ModifyTaskInfoRequest& request) const;
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_DDS_MODEL_ALLOCATEDBINSTANCESRVNETWORKADDRESSREQUEST_H_
|
||||
#define ALIBABACLOUD_DDS_MODEL_ALLOCATEDBINSTANCESRVNETWORKADDRESSREQUEST_H_
|
||||
|
||||
#include <alibabacloud/dds/DdsExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Dds {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_DDS_EXPORT AllocateDBInstanceSrvNetworkAddressRequest : public RpcServiceRequest {
|
||||
public:
|
||||
AllocateDBInstanceSrvNetworkAddressRequest();
|
||||
~AllocateDBInstanceSrvNetworkAddressRequest();
|
||||
long getResourceOwnerId() const;
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
std::string getAccessKeyId() const;
|
||||
void setAccessKeyId(const std::string &accessKeyId);
|
||||
std::string getDBInstanceId() const;
|
||||
void setDBInstanceId(const std::string &dBInstanceId);
|
||||
std::string getNodeId() const;
|
||||
void setNodeId(const std::string &nodeId);
|
||||
std::string getResourceOwnerAccount() const;
|
||||
void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
|
||||
std::string getSrvConnectionType() const;
|
||||
void setSrvConnectionType(const std::string &srvConnectionType);
|
||||
std::string getOwnerAccount() const;
|
||||
void setOwnerAccount(const std::string &ownerAccount);
|
||||
long getOwnerId() const;
|
||||
void setOwnerId(long ownerId);
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string accessKeyId_;
|
||||
std::string dBInstanceId_;
|
||||
std::string nodeId_;
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string srvConnectionType_;
|
||||
std::string ownerAccount_;
|
||||
long ownerId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Dds
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_DDS_MODEL_ALLOCATEDBINSTANCESRVNETWORKADDRESSREQUEST_H_
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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_DDS_MODEL_ALLOCATEDBINSTANCESRVNETWORKADDRESSRESULT_H_
|
||||
#define ALIBABACLOUD_DDS_MODEL_ALLOCATEDBINSTANCESRVNETWORKADDRESSRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/dds/DdsExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Dds
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_DDS_EXPORT AllocateDBInstanceSrvNetworkAddressResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
AllocateDBInstanceSrvNetworkAddressResult();
|
||||
explicit AllocateDBInstanceSrvNetworkAddressResult(const std::string &payload);
|
||||
~AllocateDBInstanceSrvNetworkAddressResult();
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DDS_MODEL_ALLOCATEDBINSTANCESRVNETWORKADDRESSRESULT_H_
|
||||
@@ -38,11 +38,13 @@ namespace AlibabaCloud
|
||||
explicit CreateBackupResult(const std::string &payload);
|
||||
~CreateBackupResult();
|
||||
std::string getBackupId()const;
|
||||
std::string getBackupJobId()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string backupId_;
|
||||
std::string backupJobId_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ namespace AlibabaCloud
|
||||
std::string insComment;
|
||||
std::string changeLevelEn;
|
||||
std::string allowCancel;
|
||||
std::string taskParams;
|
||||
std::string allowChange;
|
||||
std::vector<std::string> subInsNames;
|
||||
std::string region;
|
||||
|
||||
@@ -30,6 +30,8 @@ class ALIBABACLOUD_DDS_EXPORT DescribeBackupsRequest : public RpcServiceRequest
|
||||
public:
|
||||
DescribeBackupsRequest();
|
||||
~DescribeBackupsRequest();
|
||||
std::string getBackupJobId() const;
|
||||
void setBackupJobId(const std::string &backupJobId);
|
||||
long getResourceOwnerId() const;
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
std::string getStartTime() const;
|
||||
@@ -40,6 +42,8 @@ public:
|
||||
void setPageNumber(int pageNumber);
|
||||
std::string getAccessKeyId() const;
|
||||
void setAccessKeyId(const std::string &accessKeyId);
|
||||
std::string getResourceGroupId() const;
|
||||
void setResourceGroupId(const std::string &resourceGroupId);
|
||||
int getPageSize() const;
|
||||
void setPageSize(int pageSize);
|
||||
std::string getDBInstanceId() const;
|
||||
@@ -60,11 +64,13 @@ public:
|
||||
void setOwnerId(long ownerId);
|
||||
|
||||
private:
|
||||
std::string backupJobId_;
|
||||
long resourceOwnerId_;
|
||||
std::string startTime_;
|
||||
std::string srcRegion_;
|
||||
int pageNumber_;
|
||||
std::string accessKeyId_;
|
||||
std::string resourceGroupId_;
|
||||
int pageSize_;
|
||||
std::string dBInstanceId_;
|
||||
std::string nodeId_;
|
||||
|
||||
@@ -30,6 +30,8 @@ class ALIBABACLOUD_DDS_EXPORT DescribeClusterBackupsRequest : public RpcServiceR
|
||||
public:
|
||||
DescribeClusterBackupsRequest();
|
||||
~DescribeClusterBackupsRequest();
|
||||
std::string getBackupJobId() const;
|
||||
void setBackupJobId(const std::string &backupJobId);
|
||||
long getResourceOwnerId() const;
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
std::string getStartTime() const;
|
||||
@@ -38,6 +40,8 @@ public:
|
||||
void setSrcRegion(const std::string &srcRegion);
|
||||
std::string getAccessKeyId() const;
|
||||
void setAccessKeyId(const std::string &accessKeyId);
|
||||
std::string getResourceGroupId() const;
|
||||
void setResourceGroupId(const std::string &resourceGroupId);
|
||||
int getPageSize() const;
|
||||
void setPageSize(int pageSize);
|
||||
std::string getDBInstanceId() const;
|
||||
@@ -60,10 +64,12 @@ public:
|
||||
void setPageNo(int pageNo);
|
||||
|
||||
private:
|
||||
std::string backupJobId_;
|
||||
long resourceOwnerId_;
|
||||
std::string startTime_;
|
||||
std::string srcRegion_;
|
||||
std::string accessKeyId_;
|
||||
std::string resourceGroupId_;
|
||||
int pageSize_;
|
||||
std::string dBInstanceId_;
|
||||
std::string destRegion_;
|
||||
|
||||
@@ -32,10 +32,16 @@ public:
|
||||
~DescribeClusterRecoverTimeRequest();
|
||||
long getResourceOwnerId() const;
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
std::string getSrcRegion() const;
|
||||
void setSrcRegion(const std::string &srcRegion);
|
||||
std::string getAccessKeyId() const;
|
||||
void setAccessKeyId(const std::string &accessKeyId);
|
||||
std::string getResourceGroupId() const;
|
||||
void setResourceGroupId(const std::string &resourceGroupId);
|
||||
std::string getDBInstanceId() const;
|
||||
void setDBInstanceId(const std::string &dBInstanceId);
|
||||
std::string getDestRegion() const;
|
||||
void setDestRegion(const std::string &destRegion);
|
||||
std::string getResourceOwnerAccount() const;
|
||||
void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
|
||||
std::string getOwnerAccount() const;
|
||||
@@ -45,8 +51,11 @@ public:
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string srcRegion_;
|
||||
std::string accessKeyId_;
|
||||
std::string resourceGroupId_;
|
||||
std::string dBInstanceId_;
|
||||
std::string destRegion_;
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string ownerAccount_;
|
||||
long ownerId_;
|
||||
|
||||
@@ -118,6 +118,7 @@ namespace AlibabaCloud
|
||||
std::string dBInstanceType;
|
||||
std::string replicaSetName;
|
||||
std::vector<DBInstance::ReplicaSet> replicaSets;
|
||||
int searchNodeCount;
|
||||
std::string syncPercent;
|
||||
std::string dBInstanceId;
|
||||
std::string lastDowngradeTime;
|
||||
@@ -160,12 +161,14 @@ namespace AlibabaCloud
|
||||
std::vector<DBInstance::ShardAttribute> shardList;
|
||||
int maxIOPS;
|
||||
std::string secondaryZoneId;
|
||||
int searchNodeStorage;
|
||||
bool useClusterBackup;
|
||||
std::string vpcAuthMode;
|
||||
std::string protocolType;
|
||||
std::string chargeType;
|
||||
std::string regionId;
|
||||
std::string kindCode;
|
||||
std::string searchNodeClass;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -32,12 +32,18 @@ public:
|
||||
~DescribeInstanceRecoverTimeRequest();
|
||||
long getResourceOwnerId() const;
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
std::string getSrcRegion() const;
|
||||
void setSrcRegion(const std::string &srcRegion);
|
||||
std::string getAccessKeyId() const;
|
||||
void setAccessKeyId(const std::string &accessKeyId);
|
||||
std::string getResourceGroupId() const;
|
||||
void setResourceGroupId(const std::string &resourceGroupId);
|
||||
std::string getSecurityToken() const;
|
||||
void setSecurityToken(const std::string &securityToken);
|
||||
std::string getDBInstanceId() const;
|
||||
void setDBInstanceId(const std::string &dBInstanceId);
|
||||
std::string getDestRegion() const;
|
||||
void setDestRegion(const std::string &destRegion);
|
||||
std::string getResourceOwnerAccount() const;
|
||||
void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
|
||||
std::string getOwnerAccount() const;
|
||||
@@ -47,9 +53,12 @@ public:
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string srcRegion_;
|
||||
std::string accessKeyId_;
|
||||
std::string resourceGroupId_;
|
||||
std::string securityToken_;
|
||||
std::string dBInstanceId_;
|
||||
std::string destRegion_;
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string ownerAccount_;
|
||||
long ownerId_;
|
||||
|
||||
@@ -162,6 +162,7 @@ namespace AlibabaCloud
|
||||
std::string priceUnit;
|
||||
bool pricingModule;
|
||||
std::string moduleCode;
|
||||
std::string unitPriceUnit4Buy;
|
||||
DepreciateInfo1 depreciateInfo1;
|
||||
double totalProductFee;
|
||||
std::vector<ModuleInstanceItem::ModuleAttr> moduleAttrs;
|
||||
|
||||
@@ -42,6 +42,8 @@ public:
|
||||
void setOwnerAccount(const std::string &ownerAccount);
|
||||
long getOwnerId() const;
|
||||
void setOwnerId(long ownerId);
|
||||
std::string getRoleARN() const;
|
||||
void setRoleARN(const std::string &roleARN);
|
||||
std::string getTargetRegionId() const;
|
||||
void setTargetRegionId(const std::string &targetRegionId);
|
||||
|
||||
@@ -52,6 +54,7 @@ private:
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string ownerAccount_;
|
||||
long ownerId_;
|
||||
std::string roleARN_;
|
||||
std::string targetRegionId_;
|
||||
};
|
||||
} // namespace Model
|
||||
|
||||
@@ -38,18 +38,24 @@ public:
|
||||
void setReadonlyReplicas(const std::string &readonlyReplicas);
|
||||
std::string getExtraParam() const;
|
||||
void setExtraParam(const std::string &extraParam);
|
||||
std::string getTargetSecondaryZoneId() const;
|
||||
void setTargetSecondaryZoneId(const std::string &targetSecondaryZoneId);
|
||||
std::string getCouponNo() const;
|
||||
void setCouponNo(const std::string &couponNo);
|
||||
std::string getReplicationFactor() const;
|
||||
void setReplicationFactor(const std::string &replicationFactor);
|
||||
std::string getAccessKeyId() const;
|
||||
void setAccessKeyId(const std::string &accessKeyId);
|
||||
std::string getTargetZoneId() const;
|
||||
void setTargetZoneId(const std::string &targetZoneId);
|
||||
std::string getEffectiveTime() const;
|
||||
void setEffectiveTime(const std::string &effectiveTime);
|
||||
std::string getDBInstanceId() const;
|
||||
void setDBInstanceId(const std::string &dBInstanceId);
|
||||
std::string getBusinessInfo() const;
|
||||
void setBusinessInfo(const std::string &businessInfo);
|
||||
std::string getSearchNodeClass() const;
|
||||
void setSearchNodeClass(const std::string &searchNodeClass);
|
||||
bool getAutoPay() const;
|
||||
void setAutoPay(bool autoPay);
|
||||
std::string getFromApp() const;
|
||||
@@ -58,10 +64,18 @@ public:
|
||||
void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
|
||||
std::string getOwnerAccount() const;
|
||||
void setOwnerAccount(const std::string &ownerAccount);
|
||||
long getSearchNodeStorage() const;
|
||||
void setSearchNodeStorage(long searchNodeStorage);
|
||||
std::string getTargetVswitchId() const;
|
||||
void setTargetVswitchId(const std::string &targetVswitchId);
|
||||
long getOwnerId() const;
|
||||
void setOwnerId(long ownerId);
|
||||
std::string getDBInstanceClass() const;
|
||||
void setDBInstanceClass(const std::string &dBInstanceClass);
|
||||
long getSearchNodeCount() const;
|
||||
void setSearchNodeCount(long searchNodeCount);
|
||||
std::string getTargetHiddenZoneId() const;
|
||||
void setTargetHiddenZoneId(const std::string &targetHiddenZoneId);
|
||||
std::string getOrderType() const;
|
||||
void setOrderType(const std::string &orderType);
|
||||
|
||||
@@ -70,18 +84,25 @@ private:
|
||||
std::string dBInstanceStorage_;
|
||||
std::string readonlyReplicas_;
|
||||
std::string extraParam_;
|
||||
std::string targetSecondaryZoneId_;
|
||||
std::string couponNo_;
|
||||
std::string replicationFactor_;
|
||||
std::string accessKeyId_;
|
||||
std::string targetZoneId_;
|
||||
std::string effectiveTime_;
|
||||
std::string dBInstanceId_;
|
||||
std::string businessInfo_;
|
||||
std::string searchNodeClass_;
|
||||
bool autoPay_;
|
||||
std::string fromApp_;
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string ownerAccount_;
|
||||
long searchNodeStorage_;
|
||||
std::string targetVswitchId_;
|
||||
long ownerId_;
|
||||
std::string dBInstanceClass_;
|
||||
long searchNodeCount_;
|
||||
std::string targetHiddenZoneId_;
|
||||
std::string orderType_;
|
||||
};
|
||||
} // namespace Model
|
||||
|
||||
@@ -36,10 +36,14 @@ public:
|
||||
void setClientToken(const std::string &clientToken);
|
||||
std::string getNodesInfo() const;
|
||||
void setNodesInfo(const std::string &nodesInfo);
|
||||
std::string getTargetSecondaryZoneId() const;
|
||||
void setTargetSecondaryZoneId(const std::string &targetSecondaryZoneId);
|
||||
std::string getCouponNo() const;
|
||||
void setCouponNo(const std::string &couponNo);
|
||||
std::string getAccessKeyId() const;
|
||||
void setAccessKeyId(const std::string &accessKeyId);
|
||||
std::string getTargetZoneId() const;
|
||||
void setTargetZoneId(const std::string &targetZoneId);
|
||||
std::string getRegionId() const;
|
||||
void setRegionId(const std::string ®ionId);
|
||||
std::string getEffectiveTime() const;
|
||||
@@ -56,8 +60,12 @@ public:
|
||||
void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
|
||||
std::string getOwnerAccount() const;
|
||||
void setOwnerAccount(const std::string &ownerAccount);
|
||||
std::string getTargetVswitchId() const;
|
||||
void setTargetVswitchId(const std::string &targetVswitchId);
|
||||
long getOwnerId() const;
|
||||
void setOwnerId(long ownerId);
|
||||
std::string getTargetHiddenZoneId() const;
|
||||
void setTargetHiddenZoneId(const std::string &targetHiddenZoneId);
|
||||
std::string getOrderType() const;
|
||||
void setOrderType(const std::string &orderType);
|
||||
|
||||
@@ -65,8 +73,10 @@ private:
|
||||
long resourceOwnerId_;
|
||||
std::string clientToken_;
|
||||
std::string nodesInfo_;
|
||||
std::string targetSecondaryZoneId_;
|
||||
std::string couponNo_;
|
||||
std::string accessKeyId_;
|
||||
std::string targetZoneId_;
|
||||
std::string regionId_;
|
||||
std::string effectiveTime_;
|
||||
std::string dBInstanceId_;
|
||||
@@ -75,7 +85,9 @@ private:
|
||||
std::string fromApp_;
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string ownerAccount_;
|
||||
std::string targetVswitchId_;
|
||||
long ownerId_;
|
||||
std::string targetHiddenZoneId_;
|
||||
std::string orderType_;
|
||||
};
|
||||
} // namespace Model
|
||||
|
||||
@@ -36,12 +36,16 @@ public:
|
||||
void setClientToken(const std::string &clientToken);
|
||||
int getReadonlyReplicas() const;
|
||||
void setReadonlyReplicas(int readonlyReplicas);
|
||||
std::string getTargetSecondaryZoneId() const;
|
||||
void setTargetSecondaryZoneId(const std::string &targetSecondaryZoneId);
|
||||
std::string getCouponNo() const;
|
||||
void setCouponNo(const std::string &couponNo);
|
||||
std::string getNodeClass() const;
|
||||
void setNodeClass(const std::string &nodeClass);
|
||||
std::string getAccessKeyId() const;
|
||||
void setAccessKeyId(const std::string &accessKeyId);
|
||||
std::string getTargetZoneId() const;
|
||||
void setTargetZoneId(const std::string &targetZoneId);
|
||||
std::string getEffectiveTime() const;
|
||||
void setEffectiveTime(const std::string &effectiveTime);
|
||||
std::string getDBInstanceId() const;
|
||||
@@ -62,8 +66,12 @@ public:
|
||||
void setNodeStorage(int nodeStorage);
|
||||
std::string getOwnerAccount() const;
|
||||
void setOwnerAccount(const std::string &ownerAccount);
|
||||
std::string getTargetVswitchId() const;
|
||||
void setTargetVswitchId(const std::string &targetVswitchId);
|
||||
long getOwnerId() const;
|
||||
void setOwnerId(long ownerId);
|
||||
std::string getTargetHiddenZoneId() const;
|
||||
void setTargetHiddenZoneId(const std::string &targetHiddenZoneId);
|
||||
std::string getOrderType() const;
|
||||
void setOrderType(const std::string &orderType);
|
||||
|
||||
@@ -71,9 +79,11 @@ private:
|
||||
long resourceOwnerId_;
|
||||
std::string clientToken_;
|
||||
int readonlyReplicas_;
|
||||
std::string targetSecondaryZoneId_;
|
||||
std::string couponNo_;
|
||||
std::string nodeClass_;
|
||||
std::string accessKeyId_;
|
||||
std::string targetZoneId_;
|
||||
std::string effectiveTime_;
|
||||
std::string dBInstanceId_;
|
||||
std::string switchTime_;
|
||||
@@ -84,7 +94,9 @@ private:
|
||||
std::string resourceOwnerAccount_;
|
||||
int nodeStorage_;
|
||||
std::string ownerAccount_;
|
||||
std::string targetVswitchId_;
|
||||
long ownerId_;
|
||||
std::string targetHiddenZoneId_;
|
||||
std::string orderType_;
|
||||
};
|
||||
} // namespace Model
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_DDS_MODEL_MODIFYSRVNETWORKADDRESSREQUEST_H_
|
||||
#define ALIBABACLOUD_DDS_MODEL_MODIFYSRVNETWORKADDRESSREQUEST_H_
|
||||
|
||||
#include <alibabacloud/dds/DdsExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Dds {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_DDS_EXPORT ModifySrvNetworkAddressRequest : public RpcServiceRequest {
|
||||
public:
|
||||
ModifySrvNetworkAddressRequest();
|
||||
~ModifySrvNetworkAddressRequest();
|
||||
long getResourceOwnerId() const;
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
std::string getAccessKeyId() const;
|
||||
void setAccessKeyId(const std::string &accessKeyId);
|
||||
std::string getDBInstanceId() const;
|
||||
void setDBInstanceId(const std::string &dBInstanceId);
|
||||
std::string getConnectionType() const;
|
||||
void setConnectionType(const std::string &connectionType);
|
||||
std::string getResourceOwnerAccount() const;
|
||||
void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
|
||||
std::string getOwnerAccount() const;
|
||||
void setOwnerAccount(const std::string &ownerAccount);
|
||||
std::string getNewConnectionString() const;
|
||||
void setNewConnectionString(const std::string &newConnectionString);
|
||||
long getOwnerId() const;
|
||||
void setOwnerId(long ownerId);
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string accessKeyId_;
|
||||
std::string dBInstanceId_;
|
||||
std::string connectionType_;
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string ownerAccount_;
|
||||
std::string newConnectionString_;
|
||||
long ownerId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Dds
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_DDS_MODEL_MODIFYSRVNETWORKADDRESSREQUEST_H_
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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_DDS_MODEL_MODIFYSRVNETWORKADDRESSRESULT_H_
|
||||
#define ALIBABACLOUD_DDS_MODEL_MODIFYSRVNETWORKADDRESSRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/dds/DdsExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Dds
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_DDS_EXPORT ModifySrvNetworkAddressResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
ModifySrvNetworkAddressResult();
|
||||
explicit ModifySrvNetworkAddressResult(const std::string &payload);
|
||||
~ModifySrvNetworkAddressResult();
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DDS_MODEL_MODIFYSRVNETWORKADDRESSRESULT_H_
|
||||
@@ -51,6 +51,42 @@ DdsClient::DdsClient(const std::string & accessKeyId, const std::string & access
|
||||
DdsClient::~DdsClient()
|
||||
{}
|
||||
|
||||
DdsClient::AllocateDBInstanceSrvNetworkAddressOutcome DdsClient::allocateDBInstanceSrvNetworkAddress(const AllocateDBInstanceSrvNetworkAddressRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return AllocateDBInstanceSrvNetworkAddressOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return AllocateDBInstanceSrvNetworkAddressOutcome(AllocateDBInstanceSrvNetworkAddressResult(outcome.result()));
|
||||
else
|
||||
return AllocateDBInstanceSrvNetworkAddressOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DdsClient::allocateDBInstanceSrvNetworkAddressAsync(const AllocateDBInstanceSrvNetworkAddressRequest& request, const AllocateDBInstanceSrvNetworkAddressAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, allocateDBInstanceSrvNetworkAddress(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DdsClient::AllocateDBInstanceSrvNetworkAddressOutcomeCallable DdsClient::allocateDBInstanceSrvNetworkAddressCallable(const AllocateDBInstanceSrvNetworkAddressRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<AllocateDBInstanceSrvNetworkAddressOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->allocateDBInstanceSrvNetworkAddress(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DdsClient::AllocateNodePrivateNetworkAddressOutcome DdsClient::allocateNodePrivateNetworkAddress(const AllocateNodePrivateNetworkAddressRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -3795,6 +3831,42 @@ DdsClient::ModifySecurityIpsOutcomeCallable DdsClient::modifySecurityIpsCallable
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DdsClient::ModifySrvNetworkAddressOutcome DdsClient::modifySrvNetworkAddress(const ModifySrvNetworkAddressRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ModifySrvNetworkAddressOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ModifySrvNetworkAddressOutcome(ModifySrvNetworkAddressResult(outcome.result()));
|
||||
else
|
||||
return ModifySrvNetworkAddressOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DdsClient::modifySrvNetworkAddressAsync(const ModifySrvNetworkAddressRequest& request, const ModifySrvNetworkAddressAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, modifySrvNetworkAddress(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DdsClient::ModifySrvNetworkAddressOutcomeCallable DdsClient::modifySrvNetworkAddressCallable(const ModifySrvNetworkAddressRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ModifySrvNetworkAddressOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->modifySrvNetworkAddress(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DdsClient::ModifyTaskInfoOutcome DdsClient::modifyTaskInfo(const ModifyTaskInfoRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
99
dds/src/model/AllocateDBInstanceSrvNetworkAddressRequest.cc
Normal file
99
dds/src/model/AllocateDBInstanceSrvNetworkAddressRequest.cc
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* 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/dds/model/AllocateDBInstanceSrvNetworkAddressRequest.h>
|
||||
|
||||
using AlibabaCloud::Dds::Model::AllocateDBInstanceSrvNetworkAddressRequest;
|
||||
|
||||
AllocateDBInstanceSrvNetworkAddressRequest::AllocateDBInstanceSrvNetworkAddressRequest()
|
||||
: RpcServiceRequest("dds", "2015-12-01", "AllocateDBInstanceSrvNetworkAddress") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
AllocateDBInstanceSrvNetworkAddressRequest::~AllocateDBInstanceSrvNetworkAddressRequest() {}
|
||||
|
||||
long AllocateDBInstanceSrvNetworkAddressRequest::getResourceOwnerId() const {
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void AllocateDBInstanceSrvNetworkAddressRequest::setResourceOwnerId(long resourceOwnerId) {
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string AllocateDBInstanceSrvNetworkAddressRequest::getAccessKeyId() const {
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void AllocateDBInstanceSrvNetworkAddressRequest::setAccessKeyId(const std::string &accessKeyId) {
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter(std::string("AccessKeyId"), accessKeyId);
|
||||
}
|
||||
|
||||
std::string AllocateDBInstanceSrvNetworkAddressRequest::getDBInstanceId() const {
|
||||
return dBInstanceId_;
|
||||
}
|
||||
|
||||
void AllocateDBInstanceSrvNetworkAddressRequest::setDBInstanceId(const std::string &dBInstanceId) {
|
||||
dBInstanceId_ = dBInstanceId;
|
||||
setParameter(std::string("DBInstanceId"), dBInstanceId);
|
||||
}
|
||||
|
||||
std::string AllocateDBInstanceSrvNetworkAddressRequest::getNodeId() const {
|
||||
return nodeId_;
|
||||
}
|
||||
|
||||
void AllocateDBInstanceSrvNetworkAddressRequest::setNodeId(const std::string &nodeId) {
|
||||
nodeId_ = nodeId;
|
||||
setParameter(std::string("NodeId"), nodeId);
|
||||
}
|
||||
|
||||
std::string AllocateDBInstanceSrvNetworkAddressRequest::getResourceOwnerAccount() const {
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void AllocateDBInstanceSrvNetworkAddressRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string AllocateDBInstanceSrvNetworkAddressRequest::getSrvConnectionType() const {
|
||||
return srvConnectionType_;
|
||||
}
|
||||
|
||||
void AllocateDBInstanceSrvNetworkAddressRequest::setSrvConnectionType(const std::string &srvConnectionType) {
|
||||
srvConnectionType_ = srvConnectionType;
|
||||
setParameter(std::string("SrvConnectionType"), srvConnectionType);
|
||||
}
|
||||
|
||||
std::string AllocateDBInstanceSrvNetworkAddressRequest::getOwnerAccount() const {
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void AllocateDBInstanceSrvNetworkAddressRequest::setOwnerAccount(const std::string &ownerAccount) {
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter(std::string("OwnerAccount"), ownerAccount);
|
||||
}
|
||||
|
||||
long AllocateDBInstanceSrvNetworkAddressRequest::getOwnerId() const {
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void AllocateDBInstanceSrvNetworkAddressRequest::setOwnerId(long ownerId) {
|
||||
ownerId_ = ownerId;
|
||||
setParameter(std::string("OwnerId"), std::to_string(ownerId));
|
||||
}
|
||||
|
||||
44
dds/src/model/AllocateDBInstanceSrvNetworkAddressResult.cc
Normal file
44
dds/src/model/AllocateDBInstanceSrvNetworkAddressResult.cc
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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/dds/model/AllocateDBInstanceSrvNetworkAddressResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dds;
|
||||
using namespace AlibabaCloud::Dds::Model;
|
||||
|
||||
AllocateDBInstanceSrvNetworkAddressResult::AllocateDBInstanceSrvNetworkAddressResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
AllocateDBInstanceSrvNetworkAddressResult::AllocateDBInstanceSrvNetworkAddressResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
AllocateDBInstanceSrvNetworkAddressResult::~AllocateDBInstanceSrvNetworkAddressResult()
|
||||
{}
|
||||
|
||||
void AllocateDBInstanceSrvNetworkAddressResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@ void CreateBackupResult::parse(const std::string &payload)
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["BackupId"].isNull())
|
||||
backupId_ = value["BackupId"].asString();
|
||||
if(!value["BackupJobId"].isNull())
|
||||
backupJobId_ = value["BackupJobId"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -49,3 +51,8 @@ std::string CreateBackupResult::getBackupId()const
|
||||
return backupId_;
|
||||
}
|
||||
|
||||
std::string CreateBackupResult::getBackupJobId()const
|
||||
{
|
||||
return backupJobId_;
|
||||
}
|
||||
|
||||
|
||||
@@ -93,6 +93,8 @@ void DescribeActiveOperationTasksResult::parse(const std::string &payload)
|
||||
itemsObject.resultInfo = valueItemsItemsItem["ResultInfo"].asString();
|
||||
if(!valueItemsItemsItem["Id"].isNull())
|
||||
itemsObject.id = std::stoi(valueItemsItemsItem["Id"].asString());
|
||||
if(!valueItemsItemsItem["TaskParams"].isNull())
|
||||
itemsObject.taskParams = valueItemsItemsItem["TaskParams"].asString();
|
||||
auto allSubInsNames = value["SubInsNames"]["SubInsNames"];
|
||||
for (auto value : allSubInsNames)
|
||||
itemsObject.subInsNames.push_back(value.asString());
|
||||
|
||||
@@ -25,6 +25,15 @@ DescribeBackupsRequest::DescribeBackupsRequest()
|
||||
|
||||
DescribeBackupsRequest::~DescribeBackupsRequest() {}
|
||||
|
||||
std::string DescribeBackupsRequest::getBackupJobId() const {
|
||||
return backupJobId_;
|
||||
}
|
||||
|
||||
void DescribeBackupsRequest::setBackupJobId(const std::string &backupJobId) {
|
||||
backupJobId_ = backupJobId;
|
||||
setParameter(std::string("BackupJobId"), backupJobId);
|
||||
}
|
||||
|
||||
long DescribeBackupsRequest::getResourceOwnerId() const {
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
@@ -70,6 +79,15 @@ void DescribeBackupsRequest::setAccessKeyId(const std::string &accessKeyId) {
|
||||
setParameter(std::string("AccessKeyId"), accessKeyId);
|
||||
}
|
||||
|
||||
std::string DescribeBackupsRequest::getResourceGroupId() const {
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void DescribeBackupsRequest::setResourceGroupId(const std::string &resourceGroupId) {
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setParameter(std::string("ResourceGroupId"), resourceGroupId);
|
||||
}
|
||||
|
||||
int DescribeBackupsRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,15 @@ DescribeClusterBackupsRequest::DescribeClusterBackupsRequest()
|
||||
|
||||
DescribeClusterBackupsRequest::~DescribeClusterBackupsRequest() {}
|
||||
|
||||
std::string DescribeClusterBackupsRequest::getBackupJobId() const {
|
||||
return backupJobId_;
|
||||
}
|
||||
|
||||
void DescribeClusterBackupsRequest::setBackupJobId(const std::string &backupJobId) {
|
||||
backupJobId_ = backupJobId;
|
||||
setParameter(std::string("BackupJobId"), backupJobId);
|
||||
}
|
||||
|
||||
long DescribeClusterBackupsRequest::getResourceOwnerId() const {
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
@@ -61,6 +70,15 @@ void DescribeClusterBackupsRequest::setAccessKeyId(const std::string &accessKeyI
|
||||
setParameter(std::string("AccessKeyId"), accessKeyId);
|
||||
}
|
||||
|
||||
std::string DescribeClusterBackupsRequest::getResourceGroupId() const {
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void DescribeClusterBackupsRequest::setResourceGroupId(const std::string &resourceGroupId) {
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setParameter(std::string("ResourceGroupId"), resourceGroupId);
|
||||
}
|
||||
|
||||
int DescribeClusterBackupsRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,15 @@ void DescribeClusterRecoverTimeRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string DescribeClusterRecoverTimeRequest::getSrcRegion() const {
|
||||
return srcRegion_;
|
||||
}
|
||||
|
||||
void DescribeClusterRecoverTimeRequest::setSrcRegion(const std::string &srcRegion) {
|
||||
srcRegion_ = srcRegion;
|
||||
setParameter(std::string("SrcRegion"), srcRegion);
|
||||
}
|
||||
|
||||
std::string DescribeClusterRecoverTimeRequest::getAccessKeyId() const {
|
||||
return accessKeyId_;
|
||||
}
|
||||
@@ -43,6 +52,15 @@ void DescribeClusterRecoverTimeRequest::setAccessKeyId(const std::string &access
|
||||
setParameter(std::string("AccessKeyId"), accessKeyId);
|
||||
}
|
||||
|
||||
std::string DescribeClusterRecoverTimeRequest::getResourceGroupId() const {
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void DescribeClusterRecoverTimeRequest::setResourceGroupId(const std::string &resourceGroupId) {
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setParameter(std::string("ResourceGroupId"), resourceGroupId);
|
||||
}
|
||||
|
||||
std::string DescribeClusterRecoverTimeRequest::getDBInstanceId() const {
|
||||
return dBInstanceId_;
|
||||
}
|
||||
@@ -52,6 +70,15 @@ void DescribeClusterRecoverTimeRequest::setDBInstanceId(const std::string &dBIns
|
||||
setParameter(std::string("DBInstanceId"), dBInstanceId);
|
||||
}
|
||||
|
||||
std::string DescribeClusterRecoverTimeRequest::getDestRegion() const {
|
||||
return destRegion_;
|
||||
}
|
||||
|
||||
void DescribeClusterRecoverTimeRequest::setDestRegion(const std::string &destRegion) {
|
||||
destRegion_ = destRegion;
|
||||
setParameter(std::string("DestRegion"), destRegion);
|
||||
}
|
||||
|
||||
std::string DescribeClusterRecoverTimeRequest::getResourceOwnerAccount() const {
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
@@ -143,6 +143,12 @@ void DescribeDBInstanceAttributeResult::parse(const std::string &payload)
|
||||
dBInstancesObject.provisionedIops = std::stol(valueDBInstancesDBInstance["ProvisionedIops"].asString());
|
||||
if(!valueDBInstancesDBInstance["DisasterRecoveryInfo"].isNull())
|
||||
dBInstancesObject.disasterRecoveryInfo = valueDBInstancesDBInstance["DisasterRecoveryInfo"].asString();
|
||||
if(!valueDBInstancesDBInstance["SearchNodeClass"].isNull())
|
||||
dBInstancesObject.searchNodeClass = valueDBInstancesDBInstance["SearchNodeClass"].asString();
|
||||
if(!valueDBInstancesDBInstance["SearchNodeStorage"].isNull())
|
||||
dBInstancesObject.searchNodeStorage = std::stoi(valueDBInstancesDBInstance["SearchNodeStorage"].asString());
|
||||
if(!valueDBInstancesDBInstance["SearchNodeCount"].isNull())
|
||||
dBInstancesObject.searchNodeCount = std::stoi(valueDBInstancesDBInstance["SearchNodeCount"].asString());
|
||||
auto allReplicaSetsNode = valueDBInstancesDBInstance["ReplicaSets"]["ReplicaSet"];
|
||||
for (auto valueDBInstancesDBInstanceReplicaSetsReplicaSet : allReplicaSetsNode)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,15 @@ void DescribeInstanceRecoverTimeRequest::setResourceOwnerId(long resourceOwnerId
|
||||
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string DescribeInstanceRecoverTimeRequest::getSrcRegion() const {
|
||||
return srcRegion_;
|
||||
}
|
||||
|
||||
void DescribeInstanceRecoverTimeRequest::setSrcRegion(const std::string &srcRegion) {
|
||||
srcRegion_ = srcRegion;
|
||||
setParameter(std::string("SrcRegion"), srcRegion);
|
||||
}
|
||||
|
||||
std::string DescribeInstanceRecoverTimeRequest::getAccessKeyId() const {
|
||||
return accessKeyId_;
|
||||
}
|
||||
@@ -43,6 +52,15 @@ void DescribeInstanceRecoverTimeRequest::setAccessKeyId(const std::string &acces
|
||||
setParameter(std::string("AccessKeyId"), accessKeyId);
|
||||
}
|
||||
|
||||
std::string DescribeInstanceRecoverTimeRequest::getResourceGroupId() const {
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void DescribeInstanceRecoverTimeRequest::setResourceGroupId(const std::string &resourceGroupId) {
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setParameter(std::string("ResourceGroupId"), resourceGroupId);
|
||||
}
|
||||
|
||||
std::string DescribeInstanceRecoverTimeRequest::getSecurityToken() const {
|
||||
return securityToken_;
|
||||
}
|
||||
@@ -61,6 +79,15 @@ void DescribeInstanceRecoverTimeRequest::setDBInstanceId(const std::string &dBIn
|
||||
setParameter(std::string("DBInstanceId"), dBInstanceId);
|
||||
}
|
||||
|
||||
std::string DescribeInstanceRecoverTimeRequest::getDestRegion() const {
|
||||
return destRegion_;
|
||||
}
|
||||
|
||||
void DescribeInstanceRecoverTimeRequest::setDestRegion(const std::string &destRegion) {
|
||||
destRegion_ = destRegion;
|
||||
setParameter(std::string("DestRegion"), destRegion);
|
||||
}
|
||||
|
||||
std::string DescribeInstanceRecoverTimeRequest::getResourceOwnerAccount() const {
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
@@ -93,6 +93,8 @@ void DescribePriceResult::parse(const std::string &payload)
|
||||
moduleInstanceObject.priceUnit = valueSubOrdersSubOrderModuleInstanceModuleInstanceItem["priceUnit"].asString();
|
||||
if(!valueSubOrdersSubOrderModuleInstanceModuleInstanceItem["priceType"].isNull())
|
||||
moduleInstanceObject.priceType = valueSubOrdersSubOrderModuleInstanceModuleInstanceItem["priceType"].asString();
|
||||
if(!valueSubOrdersSubOrderModuleInstanceModuleInstanceItem["UnitPriceUnit4Buy"].isNull())
|
||||
moduleInstanceObject.unitPriceUnit4Buy = valueSubOrdersSubOrderModuleInstanceModuleInstanceItem["UnitPriceUnit4Buy"].asString();
|
||||
auto allPromDetailList2Node = valueSubOrdersSubOrderModuleInstanceModuleInstanceItem["PromDetailList"]["PromDetail"];
|
||||
for (auto valueSubOrdersSubOrderModuleInstanceModuleInstanceItemPromDetailListPromDetail : allPromDetailList2Node)
|
||||
{
|
||||
|
||||
@@ -79,6 +79,15 @@ void DescribeUserEncryptionKeyListRequest::setOwnerId(long ownerId) {
|
||||
setParameter(std::string("OwnerId"), std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string DescribeUserEncryptionKeyListRequest::getRoleARN() const {
|
||||
return roleARN_;
|
||||
}
|
||||
|
||||
void DescribeUserEncryptionKeyListRequest::setRoleARN(const std::string &roleARN) {
|
||||
roleARN_ = roleARN;
|
||||
setParameter(std::string("RoleARN"), roleARN);
|
||||
}
|
||||
|
||||
std::string DescribeUserEncryptionKeyListRequest::getTargetRegionId() const {
|
||||
return targetRegionId_;
|
||||
}
|
||||
|
||||
@@ -61,6 +61,15 @@ void ModifyDBInstanceSpecRequest::setExtraParam(const std::string &extraParam) {
|
||||
setParameter(std::string("ExtraParam"), extraParam);
|
||||
}
|
||||
|
||||
std::string ModifyDBInstanceSpecRequest::getTargetSecondaryZoneId() const {
|
||||
return targetSecondaryZoneId_;
|
||||
}
|
||||
|
||||
void ModifyDBInstanceSpecRequest::setTargetSecondaryZoneId(const std::string &targetSecondaryZoneId) {
|
||||
targetSecondaryZoneId_ = targetSecondaryZoneId;
|
||||
setParameter(std::string("TargetSecondaryZoneId"), targetSecondaryZoneId);
|
||||
}
|
||||
|
||||
std::string ModifyDBInstanceSpecRequest::getCouponNo() const {
|
||||
return couponNo_;
|
||||
}
|
||||
@@ -88,6 +97,15 @@ void ModifyDBInstanceSpecRequest::setAccessKeyId(const std::string &accessKeyId)
|
||||
setParameter(std::string("AccessKeyId"), accessKeyId);
|
||||
}
|
||||
|
||||
std::string ModifyDBInstanceSpecRequest::getTargetZoneId() const {
|
||||
return targetZoneId_;
|
||||
}
|
||||
|
||||
void ModifyDBInstanceSpecRequest::setTargetZoneId(const std::string &targetZoneId) {
|
||||
targetZoneId_ = targetZoneId;
|
||||
setParameter(std::string("TargetZoneId"), targetZoneId);
|
||||
}
|
||||
|
||||
std::string ModifyDBInstanceSpecRequest::getEffectiveTime() const {
|
||||
return effectiveTime_;
|
||||
}
|
||||
@@ -115,6 +133,15 @@ void ModifyDBInstanceSpecRequest::setBusinessInfo(const std::string &businessInf
|
||||
setParameter(std::string("BusinessInfo"), businessInfo);
|
||||
}
|
||||
|
||||
std::string ModifyDBInstanceSpecRequest::getSearchNodeClass() const {
|
||||
return searchNodeClass_;
|
||||
}
|
||||
|
||||
void ModifyDBInstanceSpecRequest::setSearchNodeClass(const std::string &searchNodeClass) {
|
||||
searchNodeClass_ = searchNodeClass;
|
||||
setParameter(std::string("SearchNodeClass"), searchNodeClass);
|
||||
}
|
||||
|
||||
bool ModifyDBInstanceSpecRequest::getAutoPay() const {
|
||||
return autoPay_;
|
||||
}
|
||||
@@ -151,6 +178,24 @@ void ModifyDBInstanceSpecRequest::setOwnerAccount(const std::string &ownerAccoun
|
||||
setParameter(std::string("OwnerAccount"), ownerAccount);
|
||||
}
|
||||
|
||||
long ModifyDBInstanceSpecRequest::getSearchNodeStorage() const {
|
||||
return searchNodeStorage_;
|
||||
}
|
||||
|
||||
void ModifyDBInstanceSpecRequest::setSearchNodeStorage(long searchNodeStorage) {
|
||||
searchNodeStorage_ = searchNodeStorage;
|
||||
setParameter(std::string("SearchNodeStorage"), std::to_string(searchNodeStorage));
|
||||
}
|
||||
|
||||
std::string ModifyDBInstanceSpecRequest::getTargetVswitchId() const {
|
||||
return targetVswitchId_;
|
||||
}
|
||||
|
||||
void ModifyDBInstanceSpecRequest::setTargetVswitchId(const std::string &targetVswitchId) {
|
||||
targetVswitchId_ = targetVswitchId;
|
||||
setParameter(std::string("TargetVswitchId"), targetVswitchId);
|
||||
}
|
||||
|
||||
long ModifyDBInstanceSpecRequest::getOwnerId() const {
|
||||
return ownerId_;
|
||||
}
|
||||
@@ -169,6 +214,24 @@ void ModifyDBInstanceSpecRequest::setDBInstanceClass(const std::string &dBInstan
|
||||
setParameter(std::string("DBInstanceClass"), dBInstanceClass);
|
||||
}
|
||||
|
||||
long ModifyDBInstanceSpecRequest::getSearchNodeCount() const {
|
||||
return searchNodeCount_;
|
||||
}
|
||||
|
||||
void ModifyDBInstanceSpecRequest::setSearchNodeCount(long searchNodeCount) {
|
||||
searchNodeCount_ = searchNodeCount;
|
||||
setParameter(std::string("SearchNodeCount"), std::to_string(searchNodeCount));
|
||||
}
|
||||
|
||||
std::string ModifyDBInstanceSpecRequest::getTargetHiddenZoneId() const {
|
||||
return targetHiddenZoneId_;
|
||||
}
|
||||
|
||||
void ModifyDBInstanceSpecRequest::setTargetHiddenZoneId(const std::string &targetHiddenZoneId) {
|
||||
targetHiddenZoneId_ = targetHiddenZoneId;
|
||||
setParameter(std::string("TargetHiddenZoneId"), targetHiddenZoneId);
|
||||
}
|
||||
|
||||
std::string ModifyDBInstanceSpecRequest::getOrderType() const {
|
||||
return orderType_;
|
||||
}
|
||||
|
||||
@@ -52,6 +52,15 @@ void ModifyNodeSpecBatchRequest::setNodesInfo(const std::string &nodesInfo) {
|
||||
setParameter(std::string("NodesInfo"), nodesInfo);
|
||||
}
|
||||
|
||||
std::string ModifyNodeSpecBatchRequest::getTargetSecondaryZoneId() const {
|
||||
return targetSecondaryZoneId_;
|
||||
}
|
||||
|
||||
void ModifyNodeSpecBatchRequest::setTargetSecondaryZoneId(const std::string &targetSecondaryZoneId) {
|
||||
targetSecondaryZoneId_ = targetSecondaryZoneId;
|
||||
setParameter(std::string("TargetSecondaryZoneId"), targetSecondaryZoneId);
|
||||
}
|
||||
|
||||
std::string ModifyNodeSpecBatchRequest::getCouponNo() const {
|
||||
return couponNo_;
|
||||
}
|
||||
@@ -70,6 +79,15 @@ void ModifyNodeSpecBatchRequest::setAccessKeyId(const std::string &accessKeyId)
|
||||
setParameter(std::string("AccessKeyId"), accessKeyId);
|
||||
}
|
||||
|
||||
std::string ModifyNodeSpecBatchRequest::getTargetZoneId() const {
|
||||
return targetZoneId_;
|
||||
}
|
||||
|
||||
void ModifyNodeSpecBatchRequest::setTargetZoneId(const std::string &targetZoneId) {
|
||||
targetZoneId_ = targetZoneId;
|
||||
setParameter(std::string("TargetZoneId"), targetZoneId);
|
||||
}
|
||||
|
||||
std::string ModifyNodeSpecBatchRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
@@ -142,6 +160,15 @@ void ModifyNodeSpecBatchRequest::setOwnerAccount(const std::string &ownerAccount
|
||||
setParameter(std::string("OwnerAccount"), ownerAccount);
|
||||
}
|
||||
|
||||
std::string ModifyNodeSpecBatchRequest::getTargetVswitchId() const {
|
||||
return targetVswitchId_;
|
||||
}
|
||||
|
||||
void ModifyNodeSpecBatchRequest::setTargetVswitchId(const std::string &targetVswitchId) {
|
||||
targetVswitchId_ = targetVswitchId;
|
||||
setParameter(std::string("TargetVswitchId"), targetVswitchId);
|
||||
}
|
||||
|
||||
long ModifyNodeSpecBatchRequest::getOwnerId() const {
|
||||
return ownerId_;
|
||||
}
|
||||
@@ -151,6 +178,15 @@ void ModifyNodeSpecBatchRequest::setOwnerId(long ownerId) {
|
||||
setParameter(std::string("OwnerId"), std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string ModifyNodeSpecBatchRequest::getTargetHiddenZoneId() const {
|
||||
return targetHiddenZoneId_;
|
||||
}
|
||||
|
||||
void ModifyNodeSpecBatchRequest::setTargetHiddenZoneId(const std::string &targetHiddenZoneId) {
|
||||
targetHiddenZoneId_ = targetHiddenZoneId;
|
||||
setParameter(std::string("TargetHiddenZoneId"), targetHiddenZoneId);
|
||||
}
|
||||
|
||||
std::string ModifyNodeSpecBatchRequest::getOrderType() const {
|
||||
return orderType_;
|
||||
}
|
||||
|
||||
@@ -52,6 +52,15 @@ void ModifyNodeSpecRequest::setReadonlyReplicas(int readonlyReplicas) {
|
||||
setParameter(std::string("ReadonlyReplicas"), std::to_string(readonlyReplicas));
|
||||
}
|
||||
|
||||
std::string ModifyNodeSpecRequest::getTargetSecondaryZoneId() const {
|
||||
return targetSecondaryZoneId_;
|
||||
}
|
||||
|
||||
void ModifyNodeSpecRequest::setTargetSecondaryZoneId(const std::string &targetSecondaryZoneId) {
|
||||
targetSecondaryZoneId_ = targetSecondaryZoneId;
|
||||
setParameter(std::string("TargetSecondaryZoneId"), targetSecondaryZoneId);
|
||||
}
|
||||
|
||||
std::string ModifyNodeSpecRequest::getCouponNo() const {
|
||||
return couponNo_;
|
||||
}
|
||||
@@ -79,6 +88,15 @@ void ModifyNodeSpecRequest::setAccessKeyId(const std::string &accessKeyId) {
|
||||
setParameter(std::string("AccessKeyId"), accessKeyId);
|
||||
}
|
||||
|
||||
std::string ModifyNodeSpecRequest::getTargetZoneId() const {
|
||||
return targetZoneId_;
|
||||
}
|
||||
|
||||
void ModifyNodeSpecRequest::setTargetZoneId(const std::string &targetZoneId) {
|
||||
targetZoneId_ = targetZoneId;
|
||||
setParameter(std::string("TargetZoneId"), targetZoneId);
|
||||
}
|
||||
|
||||
std::string ModifyNodeSpecRequest::getEffectiveTime() const {
|
||||
return effectiveTime_;
|
||||
}
|
||||
@@ -169,6 +187,15 @@ void ModifyNodeSpecRequest::setOwnerAccount(const std::string &ownerAccount) {
|
||||
setParameter(std::string("OwnerAccount"), ownerAccount);
|
||||
}
|
||||
|
||||
std::string ModifyNodeSpecRequest::getTargetVswitchId() const {
|
||||
return targetVswitchId_;
|
||||
}
|
||||
|
||||
void ModifyNodeSpecRequest::setTargetVswitchId(const std::string &targetVswitchId) {
|
||||
targetVswitchId_ = targetVswitchId;
|
||||
setParameter(std::string("TargetVswitchId"), targetVswitchId);
|
||||
}
|
||||
|
||||
long ModifyNodeSpecRequest::getOwnerId() const {
|
||||
return ownerId_;
|
||||
}
|
||||
@@ -178,6 +205,15 @@ void ModifyNodeSpecRequest::setOwnerId(long ownerId) {
|
||||
setParameter(std::string("OwnerId"), std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string ModifyNodeSpecRequest::getTargetHiddenZoneId() const {
|
||||
return targetHiddenZoneId_;
|
||||
}
|
||||
|
||||
void ModifyNodeSpecRequest::setTargetHiddenZoneId(const std::string &targetHiddenZoneId) {
|
||||
targetHiddenZoneId_ = targetHiddenZoneId;
|
||||
setParameter(std::string("TargetHiddenZoneId"), targetHiddenZoneId);
|
||||
}
|
||||
|
||||
std::string ModifyNodeSpecRequest::getOrderType() const {
|
||||
return orderType_;
|
||||
}
|
||||
|
||||
99
dds/src/model/ModifySrvNetworkAddressRequest.cc
Normal file
99
dds/src/model/ModifySrvNetworkAddressRequest.cc
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* 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/dds/model/ModifySrvNetworkAddressRequest.h>
|
||||
|
||||
using AlibabaCloud::Dds::Model::ModifySrvNetworkAddressRequest;
|
||||
|
||||
ModifySrvNetworkAddressRequest::ModifySrvNetworkAddressRequest()
|
||||
: RpcServiceRequest("dds", "2015-12-01", "ModifySrvNetworkAddress") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ModifySrvNetworkAddressRequest::~ModifySrvNetworkAddressRequest() {}
|
||||
|
||||
long ModifySrvNetworkAddressRequest::getResourceOwnerId() const {
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void ModifySrvNetworkAddressRequest::setResourceOwnerId(long resourceOwnerId) {
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string ModifySrvNetworkAddressRequest::getAccessKeyId() const {
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void ModifySrvNetworkAddressRequest::setAccessKeyId(const std::string &accessKeyId) {
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter(std::string("AccessKeyId"), accessKeyId);
|
||||
}
|
||||
|
||||
std::string ModifySrvNetworkAddressRequest::getDBInstanceId() const {
|
||||
return dBInstanceId_;
|
||||
}
|
||||
|
||||
void ModifySrvNetworkAddressRequest::setDBInstanceId(const std::string &dBInstanceId) {
|
||||
dBInstanceId_ = dBInstanceId;
|
||||
setParameter(std::string("DBInstanceId"), dBInstanceId);
|
||||
}
|
||||
|
||||
std::string ModifySrvNetworkAddressRequest::getConnectionType() const {
|
||||
return connectionType_;
|
||||
}
|
||||
|
||||
void ModifySrvNetworkAddressRequest::setConnectionType(const std::string &connectionType) {
|
||||
connectionType_ = connectionType;
|
||||
setParameter(std::string("ConnectionType"), connectionType);
|
||||
}
|
||||
|
||||
std::string ModifySrvNetworkAddressRequest::getResourceOwnerAccount() const {
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void ModifySrvNetworkAddressRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string ModifySrvNetworkAddressRequest::getOwnerAccount() const {
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void ModifySrvNetworkAddressRequest::setOwnerAccount(const std::string &ownerAccount) {
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter(std::string("OwnerAccount"), ownerAccount);
|
||||
}
|
||||
|
||||
std::string ModifySrvNetworkAddressRequest::getNewConnectionString() const {
|
||||
return newConnectionString_;
|
||||
}
|
||||
|
||||
void ModifySrvNetworkAddressRequest::setNewConnectionString(const std::string &newConnectionString) {
|
||||
newConnectionString_ = newConnectionString;
|
||||
setParameter(std::string("NewConnectionString"), newConnectionString);
|
||||
}
|
||||
|
||||
long ModifySrvNetworkAddressRequest::getOwnerId() const {
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void ModifySrvNetworkAddressRequest::setOwnerId(long ownerId) {
|
||||
ownerId_ = ownerId;
|
||||
setParameter(std::string("OwnerId"), std::to_string(ownerId));
|
||||
}
|
||||
|
||||
44
dds/src/model/ModifySrvNetworkAddressResult.cc
Normal file
44
dds/src/model/ModifySrvNetworkAddressResult.cc
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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/dds/model/ModifySrvNetworkAddressResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dds;
|
||||
using namespace AlibabaCloud::Dds::Model;
|
||||
|
||||
ModifySrvNetworkAddressResult::ModifySrvNetworkAddressResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ModifySrvNetworkAddressResult::ModifySrvNetworkAddressResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ModifySrvNetworkAddressResult::~ModifySrvNetworkAddressResult()
|
||||
{}
|
||||
|
||||
void ModifySrvNetworkAddressResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -43,10 +43,6 @@ set(dypnsapi_public_header_model
|
||||
include/alibabacloud/dypnsapi/model/GetPhoneWithTokenResult.h
|
||||
include/alibabacloud/dypnsapi/model/GetSmsAuthTokensRequest.h
|
||||
include/alibabacloud/dypnsapi/model/GetSmsAuthTokensResult.h
|
||||
include/alibabacloud/dypnsapi/model/JyCreateVerifySchemeRequest.h
|
||||
include/alibabacloud/dypnsapi/model/JyCreateVerifySchemeResult.h
|
||||
include/alibabacloud/dypnsapi/model/JyQueryAppInfoBySceneCodeRequest.h
|
||||
include/alibabacloud/dypnsapi/model/JyQueryAppInfoBySceneCodeResult.h
|
||||
include/alibabacloud/dypnsapi/model/QueryGateVerifyBillingPublicRequest.h
|
||||
include/alibabacloud/dypnsapi/model/QueryGateVerifyBillingPublicResult.h
|
||||
include/alibabacloud/dypnsapi/model/QueryGateVerifyStatisticPublicRequest.h
|
||||
@@ -88,10 +84,6 @@ set(dypnsapi_src
|
||||
src/model/GetPhoneWithTokenResult.cc
|
||||
src/model/GetSmsAuthTokensRequest.cc
|
||||
src/model/GetSmsAuthTokensResult.cc
|
||||
src/model/JyCreateVerifySchemeRequest.cc
|
||||
src/model/JyCreateVerifySchemeResult.cc
|
||||
src/model/JyQueryAppInfoBySceneCodeRequest.cc
|
||||
src/model/JyQueryAppInfoBySceneCodeResult.cc
|
||||
src/model/QueryGateVerifyBillingPublicRequest.cc
|
||||
src/model/QueryGateVerifyBillingPublicResult.cc
|
||||
src/model/QueryGateVerifyStatisticPublicRequest.cc
|
||||
|
||||
@@ -44,10 +44,6 @@
|
||||
#include "model/GetPhoneWithTokenResult.h"
|
||||
#include "model/GetSmsAuthTokensRequest.h"
|
||||
#include "model/GetSmsAuthTokensResult.h"
|
||||
#include "model/JyCreateVerifySchemeRequest.h"
|
||||
#include "model/JyCreateVerifySchemeResult.h"
|
||||
#include "model/JyQueryAppInfoBySceneCodeRequest.h"
|
||||
#include "model/JyQueryAppInfoBySceneCodeResult.h"
|
||||
#include "model/QueryGateVerifyBillingPublicRequest.h"
|
||||
#include "model/QueryGateVerifyBillingPublicResult.h"
|
||||
#include "model/QueryGateVerifyStatisticPublicRequest.h"
|
||||
@@ -106,12 +102,6 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::GetSmsAuthTokensResult> GetSmsAuthTokensOutcome;
|
||||
typedef std::future<GetSmsAuthTokensOutcome> GetSmsAuthTokensOutcomeCallable;
|
||||
typedef std::function<void(const DypnsapiClient*, const Model::GetSmsAuthTokensRequest&, const GetSmsAuthTokensOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetSmsAuthTokensAsyncHandler;
|
||||
typedef Outcome<Error, Model::JyCreateVerifySchemeResult> JyCreateVerifySchemeOutcome;
|
||||
typedef std::future<JyCreateVerifySchemeOutcome> JyCreateVerifySchemeOutcomeCallable;
|
||||
typedef std::function<void(const DypnsapiClient*, const Model::JyCreateVerifySchemeRequest&, const JyCreateVerifySchemeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> JyCreateVerifySchemeAsyncHandler;
|
||||
typedef Outcome<Error, Model::JyQueryAppInfoBySceneCodeResult> JyQueryAppInfoBySceneCodeOutcome;
|
||||
typedef std::future<JyQueryAppInfoBySceneCodeOutcome> JyQueryAppInfoBySceneCodeOutcomeCallable;
|
||||
typedef std::function<void(const DypnsapiClient*, const Model::JyQueryAppInfoBySceneCodeRequest&, const JyQueryAppInfoBySceneCodeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> JyQueryAppInfoBySceneCodeAsyncHandler;
|
||||
typedef Outcome<Error, Model::QueryGateVerifyBillingPublicResult> QueryGateVerifyBillingPublicOutcome;
|
||||
typedef std::future<QueryGateVerifyBillingPublicOutcome> QueryGateVerifyBillingPublicOutcomeCallable;
|
||||
typedef std::function<void(const DypnsapiClient*, const Model::QueryGateVerifyBillingPublicRequest&, const QueryGateVerifyBillingPublicOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryGateVerifyBillingPublicAsyncHandler;
|
||||
@@ -174,12 +164,6 @@ namespace AlibabaCloud
|
||||
GetSmsAuthTokensOutcome getSmsAuthTokens(const Model::GetSmsAuthTokensRequest &request)const;
|
||||
void getSmsAuthTokensAsync(const Model::GetSmsAuthTokensRequest& request, const GetSmsAuthTokensAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetSmsAuthTokensOutcomeCallable getSmsAuthTokensCallable(const Model::GetSmsAuthTokensRequest& request) const;
|
||||
JyCreateVerifySchemeOutcome jyCreateVerifyScheme(const Model::JyCreateVerifySchemeRequest &request)const;
|
||||
void jyCreateVerifySchemeAsync(const Model::JyCreateVerifySchemeRequest& request, const JyCreateVerifySchemeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
JyCreateVerifySchemeOutcomeCallable jyCreateVerifySchemeCallable(const Model::JyCreateVerifySchemeRequest& request) const;
|
||||
JyQueryAppInfoBySceneCodeOutcome jyQueryAppInfoBySceneCode(const Model::JyQueryAppInfoBySceneCodeRequest &request)const;
|
||||
void jyQueryAppInfoBySceneCodeAsync(const Model::JyQueryAppInfoBySceneCodeRequest& request, const JyQueryAppInfoBySceneCodeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
JyQueryAppInfoBySceneCodeOutcomeCallable jyQueryAppInfoBySceneCodeCallable(const Model::JyQueryAppInfoBySceneCodeRequest& request) const;
|
||||
QueryGateVerifyBillingPublicOutcome queryGateVerifyBillingPublic(const Model::QueryGateVerifyBillingPublicRequest &request)const;
|
||||
void queryGateVerifyBillingPublicAsync(const Model::QueryGateVerifyBillingPublicRequest& request, const QueryGateVerifyBillingPublicAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
QueryGateVerifyBillingPublicOutcomeCallable queryGateVerifyBillingPublicCallable(const Model::QueryGateVerifyBillingPublicRequest& request) const;
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_DYPNSAPI_MODEL_JYCREATEVERIFYSCHEMEREQUEST_H_
|
||||
#define ALIBABACLOUD_DYPNSAPI_MODEL_JYCREATEVERIFYSCHEMEREQUEST_H_
|
||||
|
||||
#include <alibabacloud/dypnsapi/DypnsapiExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Dypnsapi {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_DYPNSAPI_EXPORT JyCreateVerifySchemeRequest : public RpcServiceRequest {
|
||||
public:
|
||||
JyCreateVerifySchemeRequest();
|
||||
~JyCreateVerifySchemeRequest();
|
||||
long getResourceOwnerId() const;
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
std::string getBundleId() const;
|
||||
void setBundleId(const std::string &bundleId);
|
||||
std::string getAccessKeyId() const;
|
||||
void setAccessKeyId(const std::string &accessKeyId);
|
||||
std::string getAppName() const;
|
||||
void setAppName(const std::string &appName);
|
||||
std::string getPackSign() const;
|
||||
void setPackSign(const std::string &packSign);
|
||||
std::string getPackName() const;
|
||||
void setPackName(const std::string &packName);
|
||||
long getCuApiCode() const;
|
||||
void setCuApiCode(long cuApiCode);
|
||||
std::string getResourceOwnerAccount() const;
|
||||
void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
|
||||
long getCtApiCode() const;
|
||||
void setCtApiCode(long ctApiCode);
|
||||
std::string getOsType() const;
|
||||
void setOsType(const std::string &osType);
|
||||
long getOwnerId() const;
|
||||
void setOwnerId(long ownerId);
|
||||
long getCmApiCode() const;
|
||||
void setCmApiCode(long cmApiCode);
|
||||
std::string getSchemeName() const;
|
||||
void setSchemeName(const std::string &schemeName);
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string bundleId_;
|
||||
std::string accessKeyId_;
|
||||
std::string appName_;
|
||||
std::string packSign_;
|
||||
std::string packName_;
|
||||
long cuApiCode_;
|
||||
std::string resourceOwnerAccount_;
|
||||
long ctApiCode_;
|
||||
std::string osType_;
|
||||
long ownerId_;
|
||||
long cmApiCode_;
|
||||
std::string schemeName_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Dypnsapi
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_DYPNSAPI_MODEL_JYCREATEVERIFYSCHEMEREQUEST_H_
|
||||
@@ -36,14 +36,20 @@ public:
|
||||
void setCountryCode(const std::string &countryCode);
|
||||
std::string getPhoneNumber() const;
|
||||
void setPhoneNumber(const std::string &phoneNumber);
|
||||
std::string getLowcodeTenantId() const;
|
||||
void setLowcodeTenantId(const std::string &lowcodeTenantId);
|
||||
std::string getExtendFunction() const;
|
||||
void setExtendFunction(const std::string &extendFunction);
|
||||
std::string getAccessKeyId() const;
|
||||
void setAccessKeyId(const std::string &accessKeyId);
|
||||
std::string getLowcodePhysicAppName() const;
|
||||
void setLowcodePhysicAppName(const std::string &lowcodePhysicAppName);
|
||||
std::string getSmsUpExtendCode() const;
|
||||
void setSmsUpExtendCode(const std::string &smsUpExtendCode);
|
||||
std::string getSignName() const;
|
||||
void setSignName(const std::string &signName);
|
||||
long getAutoRetry() const;
|
||||
void setAutoRetry(long autoRetry);
|
||||
std::string getRouteName() const;
|
||||
void setRouteName(const std::string &routeName);
|
||||
std::string getResourceOwnerAccount() const;
|
||||
@@ -54,6 +60,8 @@ public:
|
||||
void setOwnerId(long ownerId);
|
||||
bool getReturnVerifyCode() const;
|
||||
void setReturnVerifyCode(bool returnVerifyCode);
|
||||
std::string getLowcodeLogicAppName() const;
|
||||
void setLowcodeLogicAppName(const std::string &lowcodeLogicAppName);
|
||||
long getCodeType() const;
|
||||
void setCodeType(long codeType);
|
||||
std::string getSchemeName() const;
|
||||
@@ -75,15 +83,19 @@ private:
|
||||
long resourceOwnerId_;
|
||||
std::string countryCode_;
|
||||
std::string phoneNumber_;
|
||||
std::string lowcodeTenantId_;
|
||||
std::string extendFunction_;
|
||||
std::string accessKeyId_;
|
||||
std::string lowcodePhysicAppName_;
|
||||
std::string smsUpExtendCode_;
|
||||
std::string signName_;
|
||||
long autoRetry_;
|
||||
std::string routeName_;
|
||||
std::string resourceOwnerAccount_;
|
||||
long validTime_;
|
||||
long ownerId_;
|
||||
bool returnVerifyCode_;
|
||||
std::string lowcodeLogicAppName_;
|
||||
long codeType_;
|
||||
std::string schemeName_;
|
||||
long duplicatePolicy_;
|
||||
|
||||
@@ -447,78 +447,6 @@ DypnsapiClient::GetSmsAuthTokensOutcomeCallable DypnsapiClient::getSmsAuthTokens
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DypnsapiClient::JyCreateVerifySchemeOutcome DypnsapiClient::jyCreateVerifyScheme(const JyCreateVerifySchemeRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return JyCreateVerifySchemeOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return JyCreateVerifySchemeOutcome(JyCreateVerifySchemeResult(outcome.result()));
|
||||
else
|
||||
return JyCreateVerifySchemeOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DypnsapiClient::jyCreateVerifySchemeAsync(const JyCreateVerifySchemeRequest& request, const JyCreateVerifySchemeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, jyCreateVerifyScheme(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DypnsapiClient::JyCreateVerifySchemeOutcomeCallable DypnsapiClient::jyCreateVerifySchemeCallable(const JyCreateVerifySchemeRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<JyCreateVerifySchemeOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->jyCreateVerifyScheme(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DypnsapiClient::JyQueryAppInfoBySceneCodeOutcome DypnsapiClient::jyQueryAppInfoBySceneCode(const JyQueryAppInfoBySceneCodeRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return JyQueryAppInfoBySceneCodeOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return JyQueryAppInfoBySceneCodeOutcome(JyQueryAppInfoBySceneCodeResult(outcome.result()));
|
||||
else
|
||||
return JyQueryAppInfoBySceneCodeOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DypnsapiClient::jyQueryAppInfoBySceneCodeAsync(const JyQueryAppInfoBySceneCodeRequest& request, const JyQueryAppInfoBySceneCodeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, jyQueryAppInfoBySceneCode(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DypnsapiClient::JyQueryAppInfoBySceneCodeOutcomeCallable DypnsapiClient::jyQueryAppInfoBySceneCodeCallable(const JyQueryAppInfoBySceneCodeRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<JyQueryAppInfoBySceneCodeOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->jyQueryAppInfoBySceneCode(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DypnsapiClient::QueryGateVerifyBillingPublicOutcome DypnsapiClient::queryGateVerifyBillingPublic(const QueryGateVerifyBillingPublicRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -1,144 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/dypnsapi/model/JyCreateVerifySchemeRequest.h>
|
||||
|
||||
using AlibabaCloud::Dypnsapi::Model::JyCreateVerifySchemeRequest;
|
||||
|
||||
JyCreateVerifySchemeRequest::JyCreateVerifySchemeRequest()
|
||||
: RpcServiceRequest("dypnsapi", "2017-05-25", "JyCreateVerifyScheme") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
JyCreateVerifySchemeRequest::~JyCreateVerifySchemeRequest() {}
|
||||
|
||||
long JyCreateVerifySchemeRequest::getResourceOwnerId() const {
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void JyCreateVerifySchemeRequest::setResourceOwnerId(long resourceOwnerId) {
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string JyCreateVerifySchemeRequest::getBundleId() const {
|
||||
return bundleId_;
|
||||
}
|
||||
|
||||
void JyCreateVerifySchemeRequest::setBundleId(const std::string &bundleId) {
|
||||
bundleId_ = bundleId;
|
||||
setParameter(std::string("BundleId"), bundleId);
|
||||
}
|
||||
|
||||
std::string JyCreateVerifySchemeRequest::getAccessKeyId() const {
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void JyCreateVerifySchemeRequest::setAccessKeyId(const std::string &accessKeyId) {
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter(std::string("AccessKeyId"), accessKeyId);
|
||||
}
|
||||
|
||||
std::string JyCreateVerifySchemeRequest::getAppName() const {
|
||||
return appName_;
|
||||
}
|
||||
|
||||
void JyCreateVerifySchemeRequest::setAppName(const std::string &appName) {
|
||||
appName_ = appName;
|
||||
setParameter(std::string("AppName"), appName);
|
||||
}
|
||||
|
||||
std::string JyCreateVerifySchemeRequest::getPackSign() const {
|
||||
return packSign_;
|
||||
}
|
||||
|
||||
void JyCreateVerifySchemeRequest::setPackSign(const std::string &packSign) {
|
||||
packSign_ = packSign;
|
||||
setParameter(std::string("PackSign"), packSign);
|
||||
}
|
||||
|
||||
std::string JyCreateVerifySchemeRequest::getPackName() const {
|
||||
return packName_;
|
||||
}
|
||||
|
||||
void JyCreateVerifySchemeRequest::setPackName(const std::string &packName) {
|
||||
packName_ = packName;
|
||||
setParameter(std::string("PackName"), packName);
|
||||
}
|
||||
|
||||
long JyCreateVerifySchemeRequest::getCuApiCode() const {
|
||||
return cuApiCode_;
|
||||
}
|
||||
|
||||
void JyCreateVerifySchemeRequest::setCuApiCode(long cuApiCode) {
|
||||
cuApiCode_ = cuApiCode;
|
||||
setParameter(std::string("CuApiCode"), std::to_string(cuApiCode));
|
||||
}
|
||||
|
||||
std::string JyCreateVerifySchemeRequest::getResourceOwnerAccount() const {
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void JyCreateVerifySchemeRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
|
||||
}
|
||||
|
||||
long JyCreateVerifySchemeRequest::getCtApiCode() const {
|
||||
return ctApiCode_;
|
||||
}
|
||||
|
||||
void JyCreateVerifySchemeRequest::setCtApiCode(long ctApiCode) {
|
||||
ctApiCode_ = ctApiCode;
|
||||
setParameter(std::string("CtApiCode"), std::to_string(ctApiCode));
|
||||
}
|
||||
|
||||
std::string JyCreateVerifySchemeRequest::getOsType() const {
|
||||
return osType_;
|
||||
}
|
||||
|
||||
void JyCreateVerifySchemeRequest::setOsType(const std::string &osType) {
|
||||
osType_ = osType;
|
||||
setParameter(std::string("OsType"), osType);
|
||||
}
|
||||
|
||||
long JyCreateVerifySchemeRequest::getOwnerId() const {
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void JyCreateVerifySchemeRequest::setOwnerId(long ownerId) {
|
||||
ownerId_ = ownerId;
|
||||
setParameter(std::string("OwnerId"), std::to_string(ownerId));
|
||||
}
|
||||
|
||||
long JyCreateVerifySchemeRequest::getCmApiCode() const {
|
||||
return cmApiCode_;
|
||||
}
|
||||
|
||||
void JyCreateVerifySchemeRequest::setCmApiCode(long cmApiCode) {
|
||||
cmApiCode_ = cmApiCode;
|
||||
setParameter(std::string("CmApiCode"), std::to_string(cmApiCode));
|
||||
}
|
||||
|
||||
std::string JyCreateVerifySchemeRequest::getSchemeName() const {
|
||||
return schemeName_;
|
||||
}
|
||||
|
||||
void JyCreateVerifySchemeRequest::setSchemeName(const std::string &schemeName) {
|
||||
schemeName_ = schemeName;
|
||||
setParameter(std::string("SchemeName"), schemeName);
|
||||
}
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/dypnsapi/model/JyCreateVerifySchemeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dypnsapi;
|
||||
using namespace AlibabaCloud::Dypnsapi::Model;
|
||||
|
||||
JyCreateVerifySchemeResult::JyCreateVerifySchemeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
JyCreateVerifySchemeResult::JyCreateVerifySchemeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
JyCreateVerifySchemeResult::~JyCreateVerifySchemeResult()
|
||||
{}
|
||||
|
||||
void JyCreateVerifySchemeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto gateVerifySchemeDataNode = value["GateVerifySchemeData"];
|
||||
if(!gateVerifySchemeDataNode["SchemeCode"].isNull())
|
||||
gateVerifySchemeData_.schemeCode = gateVerifySchemeDataNode["SchemeCode"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string JyCreateVerifySchemeResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
JyCreateVerifySchemeResult::GateVerifySchemeData JyCreateVerifySchemeResult::getGateVerifySchemeData()const
|
||||
{
|
||||
return gateVerifySchemeData_;
|
||||
}
|
||||
|
||||
std::string JyCreateVerifySchemeResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/dypnsapi/model/JyQueryAppInfoBySceneCodeRequest.h>
|
||||
|
||||
using AlibabaCloud::Dypnsapi::Model::JyQueryAppInfoBySceneCodeRequest;
|
||||
|
||||
JyQueryAppInfoBySceneCodeRequest::JyQueryAppInfoBySceneCodeRequest()
|
||||
: RpcServiceRequest("dypnsapi", "2017-05-25", "JyQueryAppInfoBySceneCode") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
JyQueryAppInfoBySceneCodeRequest::~JyQueryAppInfoBySceneCodeRequest() {}
|
||||
|
||||
long JyQueryAppInfoBySceneCodeRequest::getResourceOwnerId() const {
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void JyQueryAppInfoBySceneCodeRequest::setResourceOwnerId(long resourceOwnerId) {
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string JyQueryAppInfoBySceneCodeRequest::getAccessKeyId() const {
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void JyQueryAppInfoBySceneCodeRequest::setAccessKeyId(const std::string &accessKeyId) {
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter(std::string("AccessKeyId"), accessKeyId);
|
||||
}
|
||||
|
||||
std::string JyQueryAppInfoBySceneCodeRequest::getSceneCode() const {
|
||||
return sceneCode_;
|
||||
}
|
||||
|
||||
void JyQueryAppInfoBySceneCodeRequest::setSceneCode(const std::string &sceneCode) {
|
||||
sceneCode_ = sceneCode;
|
||||
setParameter(std::string("SceneCode"), sceneCode);
|
||||
}
|
||||
|
||||
std::string JyQueryAppInfoBySceneCodeRequest::getResourceOwnerAccount() const {
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void JyQueryAppInfoBySceneCodeRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) {
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount);
|
||||
}
|
||||
|
||||
long JyQueryAppInfoBySceneCodeRequest::getOwnerId() const {
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void JyQueryAppInfoBySceneCodeRequest::setOwnerId(long ownerId) {
|
||||
ownerId_ = ownerId;
|
||||
setParameter(std::string("OwnerId"), std::to_string(ownerId));
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user