Compare commits

..

108 Commits

Author SHA1 Message Date
sdk-team
9e2ee6d530 Generated 2017-03-21 for vod. 2025-12-08 11:26:17 +00:00
sdk-team
51d167c03c Add some APIs. 2025-12-04 07:15:25 +00:00
sdk-team
f6470e6c02 Generated 2019-12-26 for OutboundBot. 2025-11-26 06:40:04 +00:00
sdk-team
d77681a132 Generated 2025-07-07 for AnyTrans. 2025-11-26 06:28:48 +00:00
sdk-team
7ceaff6c6e Add some APIs. 2025-11-17 08:06:10 +00:00
sdk-team
5048e01469 Supported bind idp user api. 2025-11-11 14:03:33 +00:00
sdk-team
322f1ef667 Generated 2015-12-01 for Dds. 2025-11-03 03:36:25 +00:00
sdk-team
b52edc6252 Supported Custom Privacy Policy. 2025-10-30 02:30:26 +00:00
sdk-team
ac468a852e Generated 2016-11-01 for live. 2025-10-29 09:26:59 +00:00
sdk-team
6abf1431b6 Supported Brand. 2025-10-20 12:10:43 +00:00
sdk-team
f22a078c0d Generated 2017-08-01 for polardb. 2025-10-17 01:44:31 +00:00
sdk-team
5b357e5604 Publish sdk. 2025-09-26 15:13:20 +00:00
sdk-team
479a50df98 Generated 2025-07-07 for AnyTrans. 2025-09-22 06:10:49 +00:00
sdk-team
f341a65b45 Generated 2022-12-30 for marketplaceIntl. 2025-09-17 08:18:28 +00:00
sdk-team
0b153cfa56 Add CreateExternalCACertificate. 2025-09-15 03:57:28 +00:00
sdk-team
9d5401c5cc Add some APIs. 2025-09-11 06:41:57 +00:00
sdk-team
1d3414a920 support query rtc live rooms 2025-09-09 09:17:01 +00:00
sdk-team
c0a0891ea7 Generated 2021-12-01 for Eiam. 2025-08-25 02:51:47 +00:00
sdk-team
8173f354c3 Add Chat Session Query Support. 2025-08-20 09:37:54 +00:00
sdk-team
3b5f67fc09 Generated 2025-08-12 for IntlMarket. 2025-08-20 07:32:33 +00:00
sdk-team
9d1d86828b Generated 2016-11-01 for live. 2025-08-19 07:24:53 +00:00
sdk-team
5b7a4727cb Generated 2016-11-01 for live. 2025-08-13 01:55:45 +00:00
sdk-team
53db98b044 Add QueryDashboardNl2sql, QueryLastAccelerationEngineJob APIs. 2025-08-11 03:28:08 +00:00
sdk-team
a74b01935d Generated 2014-08-15 for Rds. 2025-08-11 02:17:14 +00:00
sdk-team
0b56244443 Generated 2019-09-01 for OceanBasePro. 2025-08-07 07:31:46 +00:00
sdk-team
d8723973a4 Generated 2016-11-01 for live. 2025-08-05 09:18:50 +00:00
sdk-team
8241d996ce Add image search api. 2025-08-01 10:28:09 +00:00
sdk-team
ec161f0408 Generated 2015-12-01 for Dds. 2025-07-31 06:44:28 +00:00
sdk-team
70bcdee246 Backup OpenAPI update. 2025-07-30 09:58:54 +00:00
sdk-team
6a7e1f141c Generated 2025-07-09 for CioMarketPop. 2025-07-30 08:28:20 +00:00
sdk-team
ecf6c5f448 Generated 2016-11-01 for live. 2025-07-29 03:59:54 +00:00
sdk-team
eef41337b0 Update GetInstance and ListInstances. 2025-07-24 07:56:34 +00:00
sdk-team
83325f3e37 Update GetInstance and ListInstances. 2025-07-17 04:09:23 +00:00
sdk-team
808e4da670 Add Support For Create Chat Session. 2025-07-16 08:09:13 +00:00
sdk-team
070025342e Add QueryReadableResourcesListByUserIdV2 API. 2025-07-14 14:22:37 +00:00
sdk-team
8e06520db5 Generated 2019-09-01 for OceanBasePro. 2025-07-11 06:51:02 +00:00
sdk-team
9a6e36ba1b Generated 2016-04-28 for Vpc. 2025-07-10 12:25:45 +00:00
sdk-team
44d329a7b7 Generated 2025-04-29 for WebsiteBuild. 2025-07-09 11:45:57 +00:00
sdk-team
fb86207f1d Generated 2019-09-01 for OceanBasePro. 2025-07-09 06:19:44 +00:00
sdk-team
377eb9e470 Supported param and error code. 2025-07-04 03:03:21 +00:00
sdk-team
69374307d5 QueryAuditLog API add request parameters. 2025-07-03 09:36:20 +00:00
sdk-team
7809012e2d Generated 2021-03-08 for eds-user. 2025-07-02 03:54:50 +00:00
sdk-team
88f17da9be Public AssumeRole AssumeRoleWithSAML AssumeRoleWithOIDC for supporting sourceIdentity. 2025-06-30 09:13:38 +00:00
sdk-team
ee32114ccc Generated 2015-05-01 for Ram. 2025-06-13 08:55:13 +00:00
sdk-team
692a2a3429 Support restart node list and re-elect zookeeper. 2025-06-12 12:44:51 +00:00
sdk-team
2616afb389 Generated 2019-09-01 for OceanBasePro. 2025-06-11 09:27:26 +00:00
sdk-team
d2887a4adc 支持创建RTC WHIP推流地址 2025-06-11 06:39:11 +00:00
sdk-team
e7d1a04d88 Add API ReadSchedulerxDesignateInfo. 2025-06-10 10:01:33 +00:00
sdk-team
164bc90823 init sdk 2025-06-05 12:16:14 +00:00
sdk-team
bdba38a5ae Generated 2025-02-28 for AIPodcast. 2025-05-30 08:30:08 +00:00
sdk-team
75a566b4d3 Add api request parameters and error code. 2025-05-28 03:35:19 +00:00
sdk-team
1e67a571a1 Generated 2014-08-15 for Rds. 2025-05-22 03:25:14 +00:00
sdk-team
fc5b3998fe Added param for ActivateLicenseResponse . 2025-05-21 07:36:30 +00:00
sdk-team
23a2074f17 Added param for ActivateLicenseResponse . 2025-05-20 07:12:27 +00:00
sdk-team
b4df698c3e Update water-mark params. 2025-05-14 03:38:22 +00:00
sdk-team
9f1edb0b33 Add Api ReadSchedulerxDesignateDetail. 2025-05-13 06:45:52 +00:00
sdk-team
5bd1d921f4 Generated 2021-05-17 for Itag. 2025-05-06 09:45:58 +00:00
sdk-team
c0c834e64a Generated 2021-03-08 for eds-user. 2025-04-27 03:10:49 +00:00
sdk-team
9b2557bf41 Generated 2014-08-28 for Ess. 2025-04-25 07:04:42 +00:00
sdk-team
1f2e0e0b42 Generated 2021-03-08 for eds-user. 2025-04-23 02:50:57 +00:00
sdk-team
0b9b79f37b Generate SDK unified. 2025-04-15 10:09:19 +00:00
sdk-team
62ea99cdb2 Add SmartqQueryAbility api request parameters. 2025-04-14 07:21:42 +00:00
nanhe
54be46c456 Update README 2025-04-09 11:53:20 +08:00
sdk-team
8d6c81401f Generated 2015-12-01 for Dds. 2025-04-08 11:19:38 +00:00
sdk-team
72138b276a Generated 2020-05-18 for dataworks-public. 2025-04-07 12:32:14 +00:00
sdk-team
53d26e9957 Generated 2022-12-01 for ResourceCenter. 2025-04-02 07:11:49 +00:00
sdk-team
7f21cf83b9 Generated 2025-02-28 for AIPodcast. 2025-04-02 05:14:19 +00:00
sdk-team
cf5863b104 Add parameters to control different role. 2025-03-31 02:44:45 +00:00
sdk-team
28503fa2e5 New Version. 2025-03-28 10:00:21 +00:00
sdk-team
a71e6dd1ae Generated 2020-05-18 for dataworks-public. 2025-03-27 12:33:01 +00:00
sdk-team
af9bc95b0b Generated 2020-06-01 for SWAS-OPEN. 2025-03-25 08:46:38 +00:00
sdk-team
4208be77a5 Support Conditional Access Policy. 2025-03-21 09:12:12 +00:00
sdk-team
338fe94f31 GetDailyPlayRegionStatis 2025-03-21 08:58:16 +00:00
sdk-team
fb513278fe Supported DescribeImageSharePermission. 2025-03-18 07:33:31 +00:00
weeping
ec9cd15b58 Fix array memory leak 2025-03-17 17:17:09 +08:00
sdk-team
1954195d9c Generated 2022-07-28 for sophonsoar. 2025-03-14 08:59:46 +00:00
sdk-team
ffd0c138d3 Add API errors. 2025-03-14 06:43:36 +00:00
sdk-team
40a7995d11 Unified upgrade SDK. 2025-03-12 09:40:25 +00:00
sdk-team
2ebf998ace Generated 2019-01-23 for Drds. 2025-03-11 03:26:07 +00:00
sdk-team
444397191f Add auto grouping apis. 2025-03-03 09:36:51 +00:00
sdk-team
a09160460b Generated 2020-06-01 for SWAS-OPEN. 2025-02-11 08:53:45 +00:00
sdk-team
cd9e24cdd0 Generated 2019-03-07 for Cloudauth. 2025-02-11 03:29:17 +00:00
sdk-team
6830235852 Add ModifyInstanceProperties. 2025-02-07 10:05:43 +00:00
sdk-team
bc2d245597 Rebuild. 2025-02-06 02:43:00 +00:00
sdk-team
168c4f1cf1 Generated 2017-08-01 for polardb. 2025-01-20 01:52:49 +00:00
sdk-team
948b05b62e Generated 2023-01-20 for csas. 2025-01-14 03:39:53 +00:00
sdk-team
3e5235c2ca Modify BatchGetMediaInfos. 2025-01-08 06:44:13 +00:00
sdk-team
6deaa997fb Add SmartQ APIs. 2024-12-30 03:17:17 +00:00
sdk-team
dbe02e376e CreateJob and UpdateJob support ExecutorBlockStrategy. 2024-12-26 11:08:03 +00:00
sdk-team
0c2f5f41c4 -Supported DeleteEip 2024-12-25 06:26:47 +00:00
sdk-team
1d1099683e Supported Jumbo for HDENI and LENI. 2024-12-24 10:07:48 +00:00
sdk-team
48362f9159 Generated 2020-06-16 for Alb. 2024-12-23 02:27:21 +00:00
sdk-team
574a5e964d Add BatchGetMediaInfos. 2024-12-19 04:48:02 +00:00
sdk-team
04ef9028c2 Add Support Real time mock table. 2024-12-18 07:26:57 +00:00
sdk-team
ff5406a429 Generated 2023-05-22 for selectdb. 2024-12-18 06:47:38 +00:00
sdk-team
18687c978c Supported Pageable of ListDataLakeDatabase API. 2024-12-12 03:36:09 +00:00
sdk-team
5416b57b75 Support fromData for UpdateRulesAttribute and Createrules 2024-12-11 03:20:18 +00:00
sdk-team
43d3080407 Generated 2016-11-01 for live. 2024-12-06 09:15:03 +00:00
sdk-team
fe745e81c4 -Release GetJobDetail, ListJobInfo. 2024-12-06 02:44:58 +00:00
sdk-team
e05ba433d0 Add LabelPriorityLevel in UpdateModelFeature API. 2024-12-02 04:00:57 +00:00
sdk-team
19026e1ca1 SubmitTranscodeJobs Add SessionId. 2024-11-28 12:41:01 +00:00
sdk-team
4d0d423351 Generated 2017-11-10 for Ens. 2024-11-27 12:36:52 +00:00
sdk-team
5d774bf4d2 Add SmartqQueryAbility api. 2024-11-26 12:15:42 +00:00
sdk-team
5c863a0c43 Update DescribeApiMetering API. 2024-11-26 05:17:03 +00:00
sdk-team
d5a286f460 Generated 2021-11-11 for qianzhou. 2024-11-22 09:45:23 +00:00
sdk-team
055e9fa24d Init. 2024-11-19 08:27:29 +00:00
sdk-team
779a64ae99 Generated 2016-11-01 for live. 2024-11-14 09:35:45 +00:00
sdk-team
689a48e2ef Supported AndroidMessageOppoCategory, AndroidMessageOppoNotifyLevel for Push and MassPush. 2024-11-13 03:46:58 +00:00
8490 changed files with 446603 additions and 72714 deletions

View File

@@ -11,9 +11,9 @@
<a href="https://codecov.io/gh/aliyun/aliyun-openapi-cpp-sdk"><img src="https://codecov.io/gh/aliyun/aliyun-openapi-cpp-sdk/branch/master/graph/badge.svg" alt="codecov"></a>
</p>
Alibaba Cloud SDK for C++ 让您不用复杂编程即可访问云服务器、负载均衡、云监控等阿里云服务。这里向您介绍如何获取 Alibaba Cloud SDK for C++ 并开始调用
阿里云 V1.0 SDK 即将进入基础安全维护阶段,不再建议使用,建议使用 V2.0 SDK
如果您在使用的过程中遇到任何问题,欢迎前往[阿里云SDK问答社区](https://yq.aliyun.com/tags/type_ask-tagid_23350)提问,提问前请阅读[提问引导](https://help.aliyun.com/document_detail/93957.html)。亦可在当前 GitHub [提交 Issues](https://github.com/aliyun/aliyun-openapi-cpp-sdk/issues/new)。
如果您在使用的过程中遇到任何问题,可在当前 GitHub [提交 Issues](https://github.com/aliyun/aliyun-openapi-cpp-sdk/issues/new)。
## 使用诊断

View File

@@ -11,9 +11,7 @@ English | [简体中文](./README-CN.md)
<a href="https://codecov.io/gh/aliyun/aliyun-openapi-cpp-sdk"><img src="https://codecov.io/gh/aliyun/aliyun-openapi-cpp-sdk/branch/master/graph/badge.svg" alt="codecov"></a>
</p>
Alibaba Cloud SDK for C++ allows you to access Alibaba Cloud services such as Elastic Compute Service (ECS), Server Load Balancer (SLB), and CloudMonitor. You can access Alibaba Cloud services without the need to handle API related tasks, such as signing and constructing your requests.
This document introduces how to obtain and call this SDK.
The Alibaba Cloud V1.0 SDK will soon enter the Basic Security Maintenance phase and is no longer recommended for use. It is suggested to use the V2.0 SDK instead.
If you have any problem while using Alibaba Cloud SDK for C++, please submit an [issue](https://github.com/aliyun/aliyun-openapi-cpp-sdk/issues/new).

View File

@@ -1 +1 @@
1.36.2015
1.36.2121

102
aimath/CMakeLists.txt Normal file
View File

@@ -0,0 +1,102 @@
#
# Copyright 2009-2017 Alibaba Cloud All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include)
set(aimath_public_header
include/alibabacloud/aimath/AIMathClient.h
include/alibabacloud/aimath/AIMathExport.h )
set(aimath_public_header_model
include/alibabacloud/aimath/model/GenAnalysisRequest.h
include/alibabacloud/aimath/model/GenAnalysisResult.h
include/alibabacloud/aimath/model/GenStepRequest.h
include/alibabacloud/aimath/model/GenStepResult.h
include/alibabacloud/aimath/model/GlobalConfirmRequest.h
include/alibabacloud/aimath/model/GlobalConfirmResult.h
include/alibabacloud/aimath/model/UpdateAnalysisRequest.h
include/alibabacloud/aimath/model/UpdateAnalysisResult.h
include/alibabacloud/aimath/model/UpdateStepRequest.h
include/alibabacloud/aimath/model/UpdateStepResult.h )
set(aimath_src
src/AIMathClient.cc
src/model/GenAnalysisRequest.cc
src/model/GenAnalysisResult.cc
src/model/GenStepRequest.cc
src/model/GenStepResult.cc
src/model/GlobalConfirmRequest.cc
src/model/GlobalConfirmResult.cc
src/model/UpdateAnalysisRequest.cc
src/model/UpdateAnalysisResult.cc
src/model/UpdateStepRequest.cc
src/model/UpdateStepResult.cc )
add_library(aimath ${LIB_TYPE}
${aimath_public_header}
${aimath_public_header_model}
${aimath_src})
set_target_properties(aimath
PROPERTIES
LINKER_LANGUAGE CXX
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}aimath
)
if(${LIB_TYPE} STREQUAL "SHARED")
set_target_properties(aimath
PROPERTIES
DEFINE_SYMBOL ALIBABACLOUD_AIMATH_LIBRARY)
endif()
target_include_directories(aimath
PRIVATE include
${CMAKE_SOURCE_DIR}/core/include
)
target_link_libraries(aimath
core)
if(CMAKE_HOST_WIN32)
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
set(jsoncpp_install_dir ${INSTALL_DIR})
add_dependencies(aimath
jsoncpp)
target_include_directories(aimath
PRIVATE ${jsoncpp_install_dir}/include)
target_link_libraries(aimath
${jsoncpp_install_dir}/lib/jsoncpp.lib)
set_target_properties(aimath
PROPERTIES
COMPILE_OPTIONS "/bigobj")
else()
target_include_directories(aimath
PRIVATE /usr/include/jsoncpp)
target_link_libraries(aimath
jsoncpp)
endif()
install(FILES ${aimath_public_header}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/aimath)
install(FILES ${aimath_public_header_model}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/aimath/model)
install(TARGETS aimath
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

View File

@@ -0,0 +1,86 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_AIMATHCLIENT_H_
#define ALIBABACLOUD_AIMATH_AIMATHCLIENT_H_
#include <future>
#include <alibabacloud/core/AsyncCallerContext.h>
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RpcServiceClient.h>
#include "AIMathExport.h"
#include "model/GenAnalysisRequest.h"
#include "model/GenAnalysisResult.h"
#include "model/GenStepRequest.h"
#include "model/GenStepResult.h"
#include "model/GlobalConfirmRequest.h"
#include "model/GlobalConfirmResult.h"
#include "model/UpdateAnalysisRequest.h"
#include "model/UpdateAnalysisResult.h"
#include "model/UpdateStepRequest.h"
#include "model/UpdateStepResult.h"
namespace AlibabaCloud
{
namespace AIMath
{
class ALIBABACLOUD_AIMATH_EXPORT AIMathClient : public RpcServiceClient
{
public:
typedef Outcome<Error, Model::GenAnalysisResult> GenAnalysisOutcome;
typedef std::future<GenAnalysisOutcome> GenAnalysisOutcomeCallable;
typedef std::function<void(const AIMathClient*, const Model::GenAnalysisRequest&, const GenAnalysisOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GenAnalysisAsyncHandler;
typedef Outcome<Error, Model::GenStepResult> GenStepOutcome;
typedef std::future<GenStepOutcome> GenStepOutcomeCallable;
typedef std::function<void(const AIMathClient*, const Model::GenStepRequest&, const GenStepOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GenStepAsyncHandler;
typedef Outcome<Error, Model::GlobalConfirmResult> GlobalConfirmOutcome;
typedef std::future<GlobalConfirmOutcome> GlobalConfirmOutcomeCallable;
typedef std::function<void(const AIMathClient*, const Model::GlobalConfirmRequest&, const GlobalConfirmOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GlobalConfirmAsyncHandler;
typedef Outcome<Error, Model::UpdateAnalysisResult> UpdateAnalysisOutcome;
typedef std::future<UpdateAnalysisOutcome> UpdateAnalysisOutcomeCallable;
typedef std::function<void(const AIMathClient*, const Model::UpdateAnalysisRequest&, const UpdateAnalysisOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateAnalysisAsyncHandler;
typedef Outcome<Error, Model::UpdateStepResult> UpdateStepOutcome;
typedef std::future<UpdateStepOutcome> UpdateStepOutcomeCallable;
typedef std::function<void(const AIMathClient*, const Model::UpdateStepRequest&, const UpdateStepOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateStepAsyncHandler;
AIMathClient(const Credentials &credentials, const ClientConfiguration &configuration);
AIMathClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
AIMathClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
~AIMathClient();
GenAnalysisOutcome genAnalysis(const Model::GenAnalysisRequest &request)const;
void genAnalysisAsync(const Model::GenAnalysisRequest& request, const GenAnalysisAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GenAnalysisOutcomeCallable genAnalysisCallable(const Model::GenAnalysisRequest& request) const;
GenStepOutcome genStep(const Model::GenStepRequest &request)const;
void genStepAsync(const Model::GenStepRequest& request, const GenStepAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GenStepOutcomeCallable genStepCallable(const Model::GenStepRequest& request) const;
GlobalConfirmOutcome globalConfirm(const Model::GlobalConfirmRequest &request)const;
void globalConfirmAsync(const Model::GlobalConfirmRequest& request, const GlobalConfirmAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GlobalConfirmOutcomeCallable globalConfirmCallable(const Model::GlobalConfirmRequest& request) const;
UpdateAnalysisOutcome updateAnalysis(const Model::UpdateAnalysisRequest &request)const;
void updateAnalysisAsync(const Model::UpdateAnalysisRequest& request, const UpdateAnalysisAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UpdateAnalysisOutcomeCallable updateAnalysisCallable(const Model::UpdateAnalysisRequest& request) const;
UpdateStepOutcome updateStep(const Model::UpdateStepRequest &request)const;
void updateStepAsync(const Model::UpdateStepRequest& request, const UpdateStepAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UpdateStepOutcomeCallable updateStepCallable(const Model::UpdateStepRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;
};
}
}
#endif // !ALIBABACLOUD_AIMATH_AIMATHCLIENT_H_

View File

@@ -0,0 +1,32 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_AIMATHEXPORT_H_
#define ALIBABACLOUD_AIMATH_AIMATHEXPORT_H_
#include <alibabacloud/core/Global.h>
#if defined(ALIBABACLOUD_SHARED)
# if defined(ALIBABACLOUD_AIMATH_LIBRARY)
# define ALIBABACLOUD_AIMATH_EXPORT ALIBABACLOUD_DECL_EXPORT
# else
# define ALIBABACLOUD_AIMATH_EXPORT ALIBABACLOUD_DECL_IMPORT
# endif
#else
# define ALIBABACLOUD_AIMATH_EXPORT
#endif
#endif // !ALIBABACLOUD_AIMATH_AIMATHEXPORT_H_

View File

@@ -0,0 +1,42 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_MODEL_GENANALYSISREQUEST_H_
#define ALIBABACLOUD_AIMATH_MODEL_GENANALYSISREQUEST_H_
#include <alibabacloud/aimath/AIMathExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AIMath {
namespace Model {
class ALIBABACLOUD_AIMATH_EXPORT GenAnalysisRequest : public RpcServiceRequest {
public:
GenAnalysisRequest();
~GenAnalysisRequest();
std::string getExerciseContent() const;
void setExerciseContent(const std::string &exerciseContent);
private:
std::string exerciseContent_;
};
} // namespace Model
} // namespace AIMath
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_AIMATH_MODEL_GENANALYSISREQUEST_H_

View File

@@ -0,0 +1,57 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_MODEL_GENANALYSISRESULT_H_
#define ALIBABACLOUD_AIMATH_MODEL_GENANALYSISRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aimath/AIMathExport.h>
namespace AlibabaCloud
{
namespace AIMath
{
namespace Model
{
class ALIBABACLOUD_AIMATH_EXPORT GenAnalysisResult : public ServiceResult
{
public:
GenAnalysisResult();
explicit GenAnalysisResult(const std::string &payload);
~GenAnalysisResult();
std::string getEventType()const;
std::string getErrMsg()const;
std::string getContent()const;
std::string getErrCode()const;
protected:
void parse(const std::string &payload);
private:
std::string eventType_;
std::string errMsg_;
std::string content_;
std::string errCode_;
};
}
}
}
#endif // !ALIBABACLOUD_AIMATH_MODEL_GENANALYSISRESULT_H_

View File

@@ -0,0 +1,42 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_MODEL_GENSTEPREQUEST_H_
#define ALIBABACLOUD_AIMATH_MODEL_GENSTEPREQUEST_H_
#include <alibabacloud/aimath/AIMathExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AIMath {
namespace Model {
class ALIBABACLOUD_AIMATH_EXPORT GenStepRequest : public RpcServiceRequest {
public:
GenStepRequest();
~GenStepRequest();
std::string getExerciseCode() const;
void setExerciseCode(const std::string &exerciseCode);
private:
std::string exerciseCode_;
};
} // namespace Model
} // namespace AIMath
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_AIMATH_MODEL_GENSTEPREQUEST_H_

View File

@@ -0,0 +1,57 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_MODEL_GENSTEPRESULT_H_
#define ALIBABACLOUD_AIMATH_MODEL_GENSTEPRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aimath/AIMathExport.h>
namespace AlibabaCloud
{
namespace AIMath
{
namespace Model
{
class ALIBABACLOUD_AIMATH_EXPORT GenStepResult : public ServiceResult
{
public:
GenStepResult();
explicit GenStepResult(const std::string &payload);
~GenStepResult();
std::string getEventType()const;
std::string getErrMsg()const;
std::string getContent()const;
std::string getErrCode()const;
protected:
void parse(const std::string &payload);
private:
std::string eventType_;
std::string errMsg_;
std::string content_;
std::string errCode_;
};
}
}
}
#endif // !ALIBABACLOUD_AIMATH_MODEL_GENSTEPRESULT_H_

View File

@@ -0,0 +1,45 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_MODEL_GLOBALCONFIRMREQUEST_H_
#define ALIBABACLOUD_AIMATH_MODEL_GLOBALCONFIRMREQUEST_H_
#include <alibabacloud/aimath/AIMathExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AIMath {
namespace Model {
class ALIBABACLOUD_AIMATH_EXPORT GlobalConfirmRequest : public RpcServiceRequest {
public:
GlobalConfirmRequest();
~GlobalConfirmRequest();
std::string getTag() const;
void setTag(const std::string &tag);
std::string getExerciseCode() const;
void setExerciseCode(const std::string &exerciseCode);
private:
std::string tag_;
std::string exerciseCode_;
};
} // namespace Model
} // namespace AIMath
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_AIMATH_MODEL_GLOBALCONFIRMREQUEST_H_

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_MODEL_GLOBALCONFIRMRESULT_H_
#define ALIBABACLOUD_AIMATH_MODEL_GLOBALCONFIRMRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aimath/AIMathExport.h>
namespace AlibabaCloud
{
namespace AIMath
{
namespace Model
{
class ALIBABACLOUD_AIMATH_EXPORT GlobalConfirmResult : public ServiceResult
{
public:
GlobalConfirmResult();
explicit GlobalConfirmResult(const std::string &payload);
~GlobalConfirmResult();
std::string getErrMsg()const;
bool getSuccess()const;
std::string getErrCode()const;
protected:
void parse(const std::string &payload);
private:
std::string errMsg_;
bool success_;
std::string errCode_;
};
}
}
}
#endif // !ALIBABACLOUD_AIMATH_MODEL_GLOBALCONFIRMRESULT_H_

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_MODEL_UPDATEANALYSISREQUEST_H_
#define ALIBABACLOUD_AIMATH_MODEL_UPDATEANALYSISREQUEST_H_
#include <alibabacloud/aimath/AIMathExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AIMath {
namespace Model {
class ALIBABACLOUD_AIMATH_EXPORT UpdateAnalysisRequest : public RpcServiceRequest {
public:
UpdateAnalysisRequest();
~UpdateAnalysisRequest();
std::string getContent() const;
void setContent(const std::string &content);
std::string getContentCode() const;
void setContentCode(const std::string &contentCode);
std::string getExerciseCode() const;
void setExerciseCode(const std::string &exerciseCode);
private:
std::string content_;
std::string contentCode_;
std::string exerciseCode_;
};
} // namespace Model
} // namespace AIMath
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_AIMATH_MODEL_UPDATEANALYSISREQUEST_H_

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_MODEL_UPDATEANALYSISRESULT_H_
#define ALIBABACLOUD_AIMATH_MODEL_UPDATEANALYSISRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aimath/AIMathExport.h>
namespace AlibabaCloud
{
namespace AIMath
{
namespace Model
{
class ALIBABACLOUD_AIMATH_EXPORT UpdateAnalysisResult : public ServiceResult
{
public:
UpdateAnalysisResult();
explicit UpdateAnalysisResult(const std::string &payload);
~UpdateAnalysisResult();
std::string getErrMsg()const;
bool getSuccess()const;
std::string getErrCode()const;
protected:
void parse(const std::string &payload);
private:
std::string errMsg_;
bool success_;
std::string errCode_;
};
}
}
}
#endif // !ALIBABACLOUD_AIMATH_MODEL_UPDATEANALYSISRESULT_H_

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_MODEL_UPDATESTEPREQUEST_H_
#define ALIBABACLOUD_AIMATH_MODEL_UPDATESTEPREQUEST_H_
#include <alibabacloud/aimath/AIMathExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AIMath {
namespace Model {
class ALIBABACLOUD_AIMATH_EXPORT UpdateStepRequest : public RpcServiceRequest {
public:
UpdateStepRequest();
~UpdateStepRequest();
std::string getContent() const;
void setContent(const std::string &content);
std::string getContentCode() const;
void setContentCode(const std::string &contentCode);
std::string getExerciseCode() const;
void setExerciseCode(const std::string &exerciseCode);
private:
std::string content_;
std::string contentCode_;
std::string exerciseCode_;
};
} // namespace Model
} // namespace AIMath
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_AIMATH_MODEL_UPDATESTEPREQUEST_H_

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_MODEL_UPDATESTEPRESULT_H_
#define ALIBABACLOUD_AIMATH_MODEL_UPDATESTEPRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aimath/AIMathExport.h>
namespace AlibabaCloud
{
namespace AIMath
{
namespace Model
{
class ALIBABACLOUD_AIMATH_EXPORT UpdateStepResult : public ServiceResult
{
public:
UpdateStepResult();
explicit UpdateStepResult(const std::string &payload);
~UpdateStepResult();
std::string getErrMsg()const;
bool getSuccess()const;
std::string getErrCode()const;
protected:
void parse(const std::string &payload);
private:
std::string errMsg_;
bool success_;
std::string errCode_;
};
}
}
}
#endif // !ALIBABACLOUD_AIMATH_MODEL_UPDATESTEPRESULT_H_

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

@@ -0,0 +1,233 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aimath/AIMathClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::AIMath;
using namespace AlibabaCloud::AIMath::Model;
namespace
{
const std::string SERVICE_NAME = "AIMath";
}
AIMathClient::AIMathClient(const Credentials &credentials, const ClientConfiguration &configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
AIMathClient::AIMathClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
AIMathClient::AIMathClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
AIMathClient::~AIMathClient()
{}
AIMathClient::GenAnalysisOutcome AIMathClient::genAnalysis(const GenAnalysisRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GenAnalysisOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GenAnalysisOutcome(GenAnalysisResult(outcome.result()));
else
return GenAnalysisOutcome(outcome.error());
}
void AIMathClient::genAnalysisAsync(const GenAnalysisRequest& request, const GenAnalysisAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, genAnalysis(request), context);
};
asyncExecute(new Runnable(fn));
}
AIMathClient::GenAnalysisOutcomeCallable AIMathClient::genAnalysisCallable(const GenAnalysisRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GenAnalysisOutcome()>>(
[this, request]()
{
return this->genAnalysis(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AIMathClient::GenStepOutcome AIMathClient::genStep(const GenStepRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GenStepOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GenStepOutcome(GenStepResult(outcome.result()));
else
return GenStepOutcome(outcome.error());
}
void AIMathClient::genStepAsync(const GenStepRequest& request, const GenStepAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, genStep(request), context);
};
asyncExecute(new Runnable(fn));
}
AIMathClient::GenStepOutcomeCallable AIMathClient::genStepCallable(const GenStepRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GenStepOutcome()>>(
[this, request]()
{
return this->genStep(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AIMathClient::GlobalConfirmOutcome AIMathClient::globalConfirm(const GlobalConfirmRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GlobalConfirmOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GlobalConfirmOutcome(GlobalConfirmResult(outcome.result()));
else
return GlobalConfirmOutcome(outcome.error());
}
void AIMathClient::globalConfirmAsync(const GlobalConfirmRequest& request, const GlobalConfirmAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, globalConfirm(request), context);
};
asyncExecute(new Runnable(fn));
}
AIMathClient::GlobalConfirmOutcomeCallable AIMathClient::globalConfirmCallable(const GlobalConfirmRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GlobalConfirmOutcome()>>(
[this, request]()
{
return this->globalConfirm(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AIMathClient::UpdateAnalysisOutcome AIMathClient::updateAnalysis(const UpdateAnalysisRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateAnalysisOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateAnalysisOutcome(UpdateAnalysisResult(outcome.result()));
else
return UpdateAnalysisOutcome(outcome.error());
}
void AIMathClient::updateAnalysisAsync(const UpdateAnalysisRequest& request, const UpdateAnalysisAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateAnalysis(request), context);
};
asyncExecute(new Runnable(fn));
}
AIMathClient::UpdateAnalysisOutcomeCallable AIMathClient::updateAnalysisCallable(const UpdateAnalysisRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateAnalysisOutcome()>>(
[this, request]()
{
return this->updateAnalysis(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AIMathClient::UpdateStepOutcome AIMathClient::updateStep(const UpdateStepRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateStepOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateStepOutcome(UpdateStepResult(outcome.result()));
else
return UpdateStepOutcome(outcome.error());
}
void AIMathClient::updateStepAsync(const UpdateStepRequest& request, const UpdateStepAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateStep(request), context);
};
asyncExecute(new Runnable(fn));
}
AIMathClient::UpdateStepOutcomeCallable AIMathClient::updateStepCallable(const UpdateStepRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateStepOutcome()>>(
[this, request]()
{
return this->updateStep(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,36 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aimath/model/GenAnalysisRequest.h>
using AlibabaCloud::AIMath::Model::GenAnalysisRequest;
GenAnalysisRequest::GenAnalysisRequest()
: RpcServiceRequest("aimath", "2024-11-14", "GenAnalysis") {
setMethod(HttpRequest::Method::Post);
}
GenAnalysisRequest::~GenAnalysisRequest() {}
std::string GenAnalysisRequest::getExerciseContent() const {
return exerciseContent_;
}
void GenAnalysisRequest::setExerciseContent(const std::string &exerciseContent) {
exerciseContent_ = exerciseContent;
setBodyParameter(std::string("ExerciseContent"), exerciseContent);
}

View File

@@ -0,0 +1,72 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aimath/model/GenAnalysisResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AIMath;
using namespace AlibabaCloud::AIMath::Model;
GenAnalysisResult::GenAnalysisResult() :
ServiceResult()
{}
GenAnalysisResult::GenAnalysisResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GenAnalysisResult::~GenAnalysisResult()
{}
void GenAnalysisResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["EventType"].isNull())
eventType_ = value["EventType"].asString();
if(!value["Content"].isNull())
content_ = value["Content"].asString();
if(!value["ErrCode"].isNull())
errCode_ = value["ErrCode"].asString();
if(!value["ErrMsg"].isNull())
errMsg_ = value["ErrMsg"].asString();
}
std::string GenAnalysisResult::getEventType()const
{
return eventType_;
}
std::string GenAnalysisResult::getErrMsg()const
{
return errMsg_;
}
std::string GenAnalysisResult::getContent()const
{
return content_;
}
std::string GenAnalysisResult::getErrCode()const
{
return errCode_;
}

View File

@@ -0,0 +1,36 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aimath/model/GenStepRequest.h>
using AlibabaCloud::AIMath::Model::GenStepRequest;
GenStepRequest::GenStepRequest()
: RpcServiceRequest("aimath", "2024-11-14", "GenStep") {
setMethod(HttpRequest::Method::Post);
}
GenStepRequest::~GenStepRequest() {}
std::string GenStepRequest::getExerciseCode() const {
return exerciseCode_;
}
void GenStepRequest::setExerciseCode(const std::string &exerciseCode) {
exerciseCode_ = exerciseCode;
setBodyParameter(std::string("ExerciseCode"), exerciseCode);
}

View File

@@ -0,0 +1,72 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aimath/model/GenStepResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AIMath;
using namespace AlibabaCloud::AIMath::Model;
GenStepResult::GenStepResult() :
ServiceResult()
{}
GenStepResult::GenStepResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GenStepResult::~GenStepResult()
{}
void GenStepResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["EventType"].isNull())
eventType_ = value["EventType"].asString();
if(!value["Content"].isNull())
content_ = value["Content"].asString();
if(!value["ErrCode"].isNull())
errCode_ = value["ErrCode"].asString();
if(!value["ErrMsg"].isNull())
errMsg_ = value["ErrMsg"].asString();
}
std::string GenStepResult::getEventType()const
{
return eventType_;
}
std::string GenStepResult::getErrMsg()const
{
return errMsg_;
}
std::string GenStepResult::getContent()const
{
return content_;
}
std::string GenStepResult::getErrCode()const
{
return errCode_;
}

View File

@@ -0,0 +1,45 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aimath/model/GlobalConfirmRequest.h>
using AlibabaCloud::AIMath::Model::GlobalConfirmRequest;
GlobalConfirmRequest::GlobalConfirmRequest()
: RpcServiceRequest("aimath", "2024-11-14", "GlobalConfirm") {
setMethod(HttpRequest::Method::Post);
}
GlobalConfirmRequest::~GlobalConfirmRequest() {}
std::string GlobalConfirmRequest::getTag() const {
return tag_;
}
void GlobalConfirmRequest::setTag(const std::string &tag) {
tag_ = tag;
setBodyParameter(std::string("Tag"), tag);
}
std::string GlobalConfirmRequest::getExerciseCode() const {
return exerciseCode_;
}
void GlobalConfirmRequest::setExerciseCode(const std::string &exerciseCode) {
exerciseCode_ = exerciseCode;
setBodyParameter(std::string("ExerciseCode"), exerciseCode);
}

View File

@@ -0,0 +1,65 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aimath/model/GlobalConfirmResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AIMath;
using namespace AlibabaCloud::AIMath::Model;
GlobalConfirmResult::GlobalConfirmResult() :
ServiceResult()
{}
GlobalConfirmResult::GlobalConfirmResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GlobalConfirmResult::~GlobalConfirmResult()
{}
void GlobalConfirmResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrCode"].isNull())
errCode_ = value["ErrCode"].asString();
if(!value["ErrMsg"].isNull())
errMsg_ = value["ErrMsg"].asString();
}
std::string GlobalConfirmResult::getErrMsg()const
{
return errMsg_;
}
bool GlobalConfirmResult::getSuccess()const
{
return success_;
}
std::string GlobalConfirmResult::getErrCode()const
{
return errCode_;
}

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aimath/model/UpdateAnalysisRequest.h>
using AlibabaCloud::AIMath::Model::UpdateAnalysisRequest;
UpdateAnalysisRequest::UpdateAnalysisRequest()
: RpcServiceRequest("aimath", "2024-11-14", "UpdateAnalysis") {
setMethod(HttpRequest::Method::Post);
}
UpdateAnalysisRequest::~UpdateAnalysisRequest() {}
std::string UpdateAnalysisRequest::getContent() const {
return content_;
}
void UpdateAnalysisRequest::setContent(const std::string &content) {
content_ = content;
setBodyParameter(std::string("Content"), content);
}
std::string UpdateAnalysisRequest::getContentCode() const {
return contentCode_;
}
void UpdateAnalysisRequest::setContentCode(const std::string &contentCode) {
contentCode_ = contentCode;
setBodyParameter(std::string("ContentCode"), contentCode);
}
std::string UpdateAnalysisRequest::getExerciseCode() const {
return exerciseCode_;
}
void UpdateAnalysisRequest::setExerciseCode(const std::string &exerciseCode) {
exerciseCode_ = exerciseCode;
setBodyParameter(std::string("ExerciseCode"), exerciseCode);
}

View File

@@ -0,0 +1,65 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aimath/model/UpdateAnalysisResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AIMath;
using namespace AlibabaCloud::AIMath::Model;
UpdateAnalysisResult::UpdateAnalysisResult() :
ServiceResult()
{}
UpdateAnalysisResult::UpdateAnalysisResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateAnalysisResult::~UpdateAnalysisResult()
{}
void UpdateAnalysisResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrCode"].isNull())
errCode_ = value["ErrCode"].asString();
if(!value["ErrMsg"].isNull())
errMsg_ = value["ErrMsg"].asString();
}
std::string UpdateAnalysisResult::getErrMsg()const
{
return errMsg_;
}
bool UpdateAnalysisResult::getSuccess()const
{
return success_;
}
std::string UpdateAnalysisResult::getErrCode()const
{
return errCode_;
}

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aimath/model/UpdateStepRequest.h>
using AlibabaCloud::AIMath::Model::UpdateStepRequest;
UpdateStepRequest::UpdateStepRequest()
: RpcServiceRequest("aimath", "2024-11-14", "UpdateStep") {
setMethod(HttpRequest::Method::Post);
}
UpdateStepRequest::~UpdateStepRequest() {}
std::string UpdateStepRequest::getContent() const {
return content_;
}
void UpdateStepRequest::setContent(const std::string &content) {
content_ = content;
setBodyParameter(std::string("Content"), content);
}
std::string UpdateStepRequest::getContentCode() const {
return contentCode_;
}
void UpdateStepRequest::setContentCode(const std::string &contentCode) {
contentCode_ = contentCode;
setBodyParameter(std::string("ContentCode"), contentCode);
}
std::string UpdateStepRequest::getExerciseCode() const {
return exerciseCode_;
}
void UpdateStepRequest::setExerciseCode(const std::string &exerciseCode) {
exerciseCode_ = exerciseCode;
setBodyParameter(std::string("ExerciseCode"), exerciseCode);
}

View File

@@ -0,0 +1,65 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aimath/model/UpdateStepResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AIMath;
using namespace AlibabaCloud::AIMath::Model;
UpdateStepResult::UpdateStepResult() :
ServiceResult()
{}
UpdateStepResult::UpdateStepResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateStepResult::~UpdateStepResult()
{}
void UpdateStepResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrCode"].isNull())
errCode_ = value["ErrCode"].asString();
if(!value["ErrMsg"].isNull())
errMsg_ = value["ErrMsg"].asString();
}
std::string UpdateStepResult::getErrMsg()const
{
return errMsg_;
}
bool UpdateStepResult::getSuccess()const
{
return success_;
}
std::string UpdateStepResult::getErrCode()const
{
return errCode_;
}

90
aipodcast/CMakeLists.txt Normal file
View File

@@ -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.
#
set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include)
set(aipodcast_public_header
include/alibabacloud/aipodcast/AIPodcastClient.h
include/alibabacloud/aipodcast/AIPodcastExport.h )
set(aipodcast_public_header_model
include/alibabacloud/aipodcast/model/PodcastTaskResultQueryRequest.h
include/alibabacloud/aipodcast/model/PodcastTaskResultQueryResult.h
include/alibabacloud/aipodcast/model/PodcastTaskSubmitRequest.h
include/alibabacloud/aipodcast/model/PodcastTaskSubmitResult.h )
set(aipodcast_src
src/AIPodcastClient.cc
src/model/PodcastTaskResultQueryRequest.cc
src/model/PodcastTaskResultQueryResult.cc
src/model/PodcastTaskSubmitRequest.cc
src/model/PodcastTaskSubmitResult.cc )
add_library(aipodcast ${LIB_TYPE}
${aipodcast_public_header}
${aipodcast_public_header_model}
${aipodcast_src})
set_target_properties(aipodcast
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}aipodcast
)
if(${LIB_TYPE} STREQUAL "SHARED")
set_target_properties(aipodcast
PROPERTIES
DEFINE_SYMBOL ALIBABACLOUD_AIPODCAST_LIBRARY)
endif()
target_include_directories(aipodcast
PRIVATE include
${CMAKE_SOURCE_DIR}/core/include
)
target_link_libraries(aipodcast
core)
if(CMAKE_HOST_WIN32)
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
set(jsoncpp_install_dir ${INSTALL_DIR})
add_dependencies(aipodcast
jsoncpp)
target_include_directories(aipodcast
PRIVATE ${jsoncpp_install_dir}/include)
target_link_libraries(aipodcast
${jsoncpp_install_dir}/lib/jsoncpp.lib)
set_target_properties(aipodcast
PROPERTIES
COMPILE_OPTIONS "/bigobj")
else()
target_include_directories(aipodcast
PRIVATE /usr/include/jsoncpp)
target_link_libraries(aipodcast
jsoncpp)
endif()
install(FILES ${aipodcast_public_header}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/aipodcast)
install(FILES ${aipodcast_public_header_model}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/aipodcast/model)
install(TARGETS aipodcast
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIPODCAST_AIPODCASTCLIENT_H_
#define ALIBABACLOUD_AIPODCAST_AIPODCASTCLIENT_H_
#include <future>
#include <alibabacloud/core/AsyncCallerContext.h>
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RoaServiceClient.h>
#include "AIPodcastExport.h"
#include "model/PodcastTaskResultQueryRequest.h"
#include "model/PodcastTaskResultQueryResult.h"
#include "model/PodcastTaskSubmitRequest.h"
#include "model/PodcastTaskSubmitResult.h"
namespace AlibabaCloud
{
namespace AIPodcast
{
class ALIBABACLOUD_AIPODCAST_EXPORT AIPodcastClient : public RoaServiceClient
{
public:
typedef Outcome<Error, Model::PodcastTaskResultQueryResult> PodcastTaskResultQueryOutcome;
typedef std::future<PodcastTaskResultQueryOutcome> PodcastTaskResultQueryOutcomeCallable;
typedef std::function<void(const AIPodcastClient*, const Model::PodcastTaskResultQueryRequest&, const PodcastTaskResultQueryOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> PodcastTaskResultQueryAsyncHandler;
typedef Outcome<Error, Model::PodcastTaskSubmitResult> PodcastTaskSubmitOutcome;
typedef std::future<PodcastTaskSubmitOutcome> PodcastTaskSubmitOutcomeCallable;
typedef std::function<void(const AIPodcastClient*, const Model::PodcastTaskSubmitRequest&, const PodcastTaskSubmitOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> PodcastTaskSubmitAsyncHandler;
AIPodcastClient(const Credentials &credentials, const ClientConfiguration &configuration);
AIPodcastClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
AIPodcastClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
~AIPodcastClient();
PodcastTaskResultQueryOutcome podcastTaskResultQuery(const Model::PodcastTaskResultQueryRequest &request)const;
void podcastTaskResultQueryAsync(const Model::PodcastTaskResultQueryRequest& request, const PodcastTaskResultQueryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
PodcastTaskResultQueryOutcomeCallable podcastTaskResultQueryCallable(const Model::PodcastTaskResultQueryRequest& request) const;
PodcastTaskSubmitOutcome podcastTaskSubmit(const Model::PodcastTaskSubmitRequest &request)const;
void podcastTaskSubmitAsync(const Model::PodcastTaskSubmitRequest& request, const PodcastTaskSubmitAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
PodcastTaskSubmitOutcomeCallable podcastTaskSubmitCallable(const Model::PodcastTaskSubmitRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;
};
}
}
#endif // !ALIBABACLOUD_AIPODCAST_AIPODCASTCLIENT_H_

View File

@@ -0,0 +1,32 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIPODCAST_AIPODCASTEXPORT_H_
#define ALIBABACLOUD_AIPODCAST_AIPODCASTEXPORT_H_
#include <alibabacloud/core/Global.h>
#if defined(ALIBABACLOUD_SHARED)
# if defined(ALIBABACLOUD_AIPODCAST_LIBRARY)
# define ALIBABACLOUD_AIPODCAST_EXPORT ALIBABACLOUD_DECL_EXPORT
# else
# define ALIBABACLOUD_AIPODCAST_EXPORT ALIBABACLOUD_DECL_IMPORT
# endif
#else
# define ALIBABACLOUD_AIPODCAST_EXPORT
#endif
#endif // !ALIBABACLOUD_AIPODCAST_AIPODCASTEXPORT_H_

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIPODCAST_MODEL_PODCASTTASKRESULTQUERYREQUEST_H_
#define ALIBABACLOUD_AIPODCAST_MODEL_PODCASTTASKRESULTQUERYREQUEST_H_
#include <alibabacloud/aipodcast/AIPodcastExport.h>
#include <alibabacloud/core/RoaServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AIPodcast {
namespace Model {
class ALIBABACLOUD_AIPODCAST_EXPORT PodcastTaskResultQueryRequest : public RoaServiceRequest {
public:
PodcastTaskResultQueryRequest();
~PodcastTaskResultQueryRequest();
std::string getAppId() const;
void setAppId(const std::string &appId);
std::string getTaskId() const;
void setTaskId(const std::string &taskId);
std::string getWorkspaceId() const;
void setWorkspaceId(const std::string &workspaceId);
private:
std::string appId_;
std::string taskId_;
std::string workspaceId_;
};
} // namespace Model
} // namespace AIPodcast
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_AIPODCAST_MODEL_PODCASTTASKRESULTQUERYREQUEST_H_

View File

@@ -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_AIPODCAST_MODEL_PODCASTTASKRESULTQUERYRESULT_H_
#define ALIBABACLOUD_AIPODCAST_MODEL_PODCASTTASKRESULTQUERYRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aipodcast/AIPodcastExport.h>
namespace AlibabaCloud
{
namespace AIPodcast
{
namespace Model
{
class ALIBABACLOUD_AIPODCAST_EXPORT PodcastTaskResultQueryResult : public ServiceResult
{
public:
PodcastTaskResultQueryResult();
explicit PodcastTaskResultQueryResult(const std::string &payload);
~PodcastTaskResultQueryResult();
protected:
void parse(const std::string &payload);
private:
};
}
}
}
#endif // !ALIBABACLOUD_AIPODCAST_MODEL_PODCASTTASKRESULTQUERYRESULT_H_

View File

@@ -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_AIPODCAST_MODEL_PODCASTTASKSUBMITREQUEST_H_
#define ALIBABACLOUD_AIPODCAST_MODEL_PODCASTTASKSUBMITREQUEST_H_
#include <alibabacloud/aipodcast/AIPodcastExport.h>
#include <alibabacloud/core/RoaServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AIPodcast {
namespace Model {
class ALIBABACLOUD_AIPODCAST_EXPORT PodcastTaskSubmitRequest : public RoaServiceRequest {
public:
PodcastTaskSubmitRequest();
~PodcastTaskSubmitRequest();
std::string getAtmosphere() const;
void setAtmosphere(const std::string &atmosphere);
std::string getSourceLang() const;
void setSourceLang(const std::string &sourceLang);
int getCounts() const;
void setCounts(int counts);
std::vector<std::string> getFileUrls() const;
void setFileUrls(const std::vector<std::string> &fileUrls);
std::string getText() const;
void setText(const std::string &text);
std::vector<std::string> getVoices() const;
void setVoices(const std::vector<std::string> &voices);
std::string getAppId() const;
void setAppId(const std::string &appId);
std::string getTopic() const;
void setTopic(const std::string &topic);
std::string getStyle() const;
void setStyle(const std::string &style);
std::string getWorkspaceId() const;
void setWorkspaceId(const std::string &workspaceId);
private:
std::string atmosphere_;
std::string sourceLang_;
int counts_;
std::vector<std::string> fileUrls_;
std::string text_;
std::vector<std::string> voices_;
std::string appId_;
std::string topic_;
std::string style_;
std::string workspaceId_;
};
} // namespace Model
} // namespace AIPodcast
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_AIPODCAST_MODEL_PODCASTTASKSUBMITREQUEST_H_

View File

@@ -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_AIPODCAST_MODEL_PODCASTTASKSUBMITRESULT_H_
#define ALIBABACLOUD_AIPODCAST_MODEL_PODCASTTASKSUBMITRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aipodcast/AIPodcastExport.h>
namespace AlibabaCloud
{
namespace AIPodcast
{
namespace Model
{
class ALIBABACLOUD_AIPODCAST_EXPORT PodcastTaskSubmitResult : public ServiceResult
{
public:
struct Data
{
std::string taskId;
std::string taskStatus;
};
PodcastTaskSubmitResult();
explicit PodcastTaskSubmitResult(const std::string &payload);
~PodcastTaskSubmitResult();
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_AIPODCAST_MODEL_PODCASTTASKSUBMITRESULT_H_

View File

@@ -0,0 +1,125 @@
/*
* 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/aipodcast/AIPodcastClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::AIPodcast;
using namespace AlibabaCloud::AIPodcast::Model;
namespace
{
const std::string SERVICE_NAME = "AIPodcast";
}
AIPodcastClient::AIPodcastClient(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, "");
}
AIPodcastClient::AIPodcastClient(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, "");
}
AIPodcastClient::AIPodcastClient(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, "");
}
AIPodcastClient::~AIPodcastClient()
{}
AIPodcastClient::PodcastTaskResultQueryOutcome AIPodcastClient::podcastTaskResultQuery(const PodcastTaskResultQueryRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return PodcastTaskResultQueryOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return PodcastTaskResultQueryOutcome(PodcastTaskResultQueryResult(outcome.result()));
else
return PodcastTaskResultQueryOutcome(outcome.error());
}
void AIPodcastClient::podcastTaskResultQueryAsync(const PodcastTaskResultQueryRequest& request, const PodcastTaskResultQueryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, podcastTaskResultQuery(request), context);
};
asyncExecute(new Runnable(fn));
}
AIPodcastClient::PodcastTaskResultQueryOutcomeCallable AIPodcastClient::podcastTaskResultQueryCallable(const PodcastTaskResultQueryRequest &request) const
{
auto task = std::make_shared<std::packaged_task<PodcastTaskResultQueryOutcome()>>(
[this, request]()
{
return this->podcastTaskResultQuery(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AIPodcastClient::PodcastTaskSubmitOutcome AIPodcastClient::podcastTaskSubmit(const PodcastTaskSubmitRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return PodcastTaskSubmitOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return PodcastTaskSubmitOutcome(PodcastTaskSubmitResult(outcome.result()));
else
return PodcastTaskSubmitOutcome(outcome.error());
}
void AIPodcastClient::podcastTaskSubmitAsync(const PodcastTaskSubmitRequest& request, const PodcastTaskSubmitAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, podcastTaskSubmit(request), context);
};
asyncExecute(new Runnable(fn));
}
AIPodcastClient::PodcastTaskSubmitOutcomeCallable AIPodcastClient::podcastTaskSubmitCallable(const PodcastTaskSubmitRequest &request) const
{
auto task = std::make_shared<std::packaged_task<PodcastTaskSubmitOutcome()>>(
[this, request]()
{
return this->podcastTaskSubmit(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aipodcast/model/PodcastTaskResultQueryRequest.h>
using AlibabaCloud::AIPodcast::Model::PodcastTaskResultQueryRequest;
PodcastTaskResultQueryRequest::PodcastTaskResultQueryRequest()
: RoaServiceRequest("aipodcast", "2025-02-28") {
setResourcePath("/podcast/task"};
setMethod(HttpRequest::Method::Post);
}
PodcastTaskResultQueryRequest::~PodcastTaskResultQueryRequest() {}
std::string PodcastTaskResultQueryRequest::getAppId() const {
return appId_;
}
void PodcastTaskResultQueryRequest::setAppId(const std::string &appId) {
appId_ = appId;
setBodyParameter(std::string("appId"), appId);
}
std::string PodcastTaskResultQueryRequest::getTaskId() const {
return taskId_;
}
void PodcastTaskResultQueryRequest::setTaskId(const std::string &taskId) {
taskId_ = taskId;
setBodyParameter(std::string("taskId"), taskId);
}
std::string PodcastTaskResultQueryRequest::getWorkspaceId() const {
return workspaceId_;
}
void PodcastTaskResultQueryRequest::setWorkspaceId(const std::string &workspaceId) {
workspaceId_ = workspaceId;
setBodyParameter(std::string("workspaceId"), workspaceId);
}

View 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/aipodcast/model/PodcastTaskResultQueryResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AIPodcast;
using namespace AlibabaCloud::AIPodcast::Model;
PodcastTaskResultQueryResult::PodcastTaskResultQueryResult() :
ServiceResult()
{}
PodcastTaskResultQueryResult::PodcastTaskResultQueryResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
PodcastTaskResultQueryResult::~PodcastTaskResultQueryResult()
{}
void PodcastTaskResultQueryResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -0,0 +1,122 @@
/*
* 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/aipodcast/model/PodcastTaskSubmitRequest.h>
using AlibabaCloud::AIPodcast::Model::PodcastTaskSubmitRequest;
PodcastTaskSubmitRequest::PodcastTaskSubmitRequest()
: RoaServiceRequest("aipodcast", "2025-02-28") {
setResourcePath("/podcast/task/submit"};
setMethod(HttpRequest::Method::Post);
}
PodcastTaskSubmitRequest::~PodcastTaskSubmitRequest() {}
std::string PodcastTaskSubmitRequest::getAtmosphere() const {
return atmosphere_;
}
void PodcastTaskSubmitRequest::setAtmosphere(const std::string &atmosphere) {
atmosphere_ = atmosphere;
setBodyParameter(std::string("atmosphere"), atmosphere);
}
std::string PodcastTaskSubmitRequest::getSourceLang() const {
return sourceLang_;
}
void PodcastTaskSubmitRequest::setSourceLang(const std::string &sourceLang) {
sourceLang_ = sourceLang;
setBodyParameter(std::string("sourceLang"), sourceLang);
}
int PodcastTaskSubmitRequest::getCounts() const {
return counts_;
}
void PodcastTaskSubmitRequest::setCounts(int counts) {
counts_ = counts;
setBodyParameter(std::string("counts"), std::to_string(counts));
}
std::vector<PodcastTaskSubmitRequest::std::string> PodcastTaskSubmitRequest::getFileUrls() const {
return fileUrls_;
}
void PodcastTaskSubmitRequest::setFileUrls(const std::vector<PodcastTaskSubmitRequest::std::string> &fileUrls) {
fileUrls_ = fileUrls;
for(int dep1 = 0; dep1 != fileUrls.size(); dep1++) {
setBodyParameter(std::string("fileUrls") + "." + std::to_string(dep1 + 1), fileUrls[dep1]);
}
}
std::string PodcastTaskSubmitRequest::getText() const {
return text_;
}
void PodcastTaskSubmitRequest::setText(const std::string &text) {
text_ = text;
setBodyParameter(std::string("text"), text);
}
std::vector<PodcastTaskSubmitRequest::std::string> PodcastTaskSubmitRequest::getVoices() const {
return voices_;
}
void PodcastTaskSubmitRequest::setVoices(const std::vector<PodcastTaskSubmitRequest::std::string> &voices) {
voices_ = voices;
for(int dep1 = 0; dep1 != voices.size(); dep1++) {
setBodyParameter(std::string("voices") + "." + std::to_string(dep1 + 1), voices[dep1]);
}
}
std::string PodcastTaskSubmitRequest::getAppId() const {
return appId_;
}
void PodcastTaskSubmitRequest::setAppId(const std::string &appId) {
appId_ = appId;
setBodyParameter(std::string("appId"), appId);
}
std::string PodcastTaskSubmitRequest::getTopic() const {
return topic_;
}
void PodcastTaskSubmitRequest::setTopic(const std::string &topic) {
topic_ = topic;
setBodyParameter(std::string("topic"), topic);
}
std::string PodcastTaskSubmitRequest::getStyle() const {
return style_;
}
void PodcastTaskSubmitRequest::setStyle(const std::string &style) {
style_ = style;
setBodyParameter(std::string("style"), style);
}
std::string PodcastTaskSubmitRequest::getWorkspaceId() const {
return workspaceId_;
}
void PodcastTaskSubmitRequest::setWorkspaceId(const std::string &workspaceId) {
workspaceId_ = workspaceId;
setBodyParameter(std::string("workspaceId"), workspaceId);
}

View 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/aipodcast/model/PodcastTaskSubmitResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AIPodcast;
using namespace AlibabaCloud::AIPodcast::Model;
PodcastTaskSubmitResult::PodcastTaskSubmitResult() :
ServiceResult()
{}
PodcastTaskSubmitResult::PodcastTaskSubmitResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
PodcastTaskSubmitResult::~PodcastTaskSubmitResult()
{}
void PodcastTaskSubmitResult::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["taskStatus"].isNull())
data_.taskStatus = dataNode["taskStatus"].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 PodcastTaskSubmitResult::getMessage()const
{
return message_;
}
std::string PodcastTaskSubmitResult::getRequestId()const
{
return requestId_;
}
std::string PodcastTaskSubmitResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
PodcastTaskSubmitResult::Data PodcastTaskSubmitResult::getData()const
{
return data_;
}
std::string PodcastTaskSubmitResult::getCode()const
{
return code_;
}
bool PodcastTaskSubmitResult::getSuccess()const
{
return success_;
}

View File

@@ -55,6 +55,8 @@ public:
std::string xForwardedForClientCertSubjectDNAlias;
bool xForwardedForClientSourceIpsEnabled;
bool xForwardedForClientCertIssuerDNEnabled;
bool xForwardedForHostEnabled;
std::string xForwardedForProcessingMode;
bool xForwardedForClientCertFingerprintEnabled;
std::string xForwardedForClientCertIssuerDNAlias;
bool xForwardedForProtoEnabled;

View File

@@ -70,6 +70,8 @@ public:
};
CreateServerGroupRequest();
~CreateServerGroupRequest();
bool getCrossZoneEnabled() const;
void setCrossZoneEnabled(bool crossZoneEnabled);
std::string getServerGroupName() const;
void setServerGroupName(const std::string &serverGroupName);
std::string getClientToken() const;
@@ -106,6 +108,7 @@ public:
void setUchConfig(const UchConfig &uchConfig);
private:
bool crossZoneEnabled_;
std::string serverGroupName_;
std::string clientToken_;
HealthCheckConfig healthCheckConfig_;

View File

@@ -63,6 +63,7 @@ namespace AlibabaCloud
bool xForwardedForClientSourceIpsEnabled;
std::string xForwardedForClientCertFingerprintAlias;
bool xForwardedForClientCertFingerprintEnabled;
bool xForwardedForHostEnabled;
std::string xForwardedForClientSourceIpsTrusted;
std::string xForwardedForClientCertIssuerDNAlias;
std::string xForwardedForClientCertClientVerifyAlias;
@@ -72,6 +73,7 @@ namespace AlibabaCloud
bool xForwardedForProtoEnabled;
bool xForwardedForClientSrcPortEnabled;
bool xForwardedForEnabled;
std::string xForwardedForProcessingMode;
bool xForwardedForSLBPortEnabled;
bool xForwardedForClientCertIssuerDNEnabled;
bool xForwardedForClientCertClientVerifyEnabled;

View File

@@ -55,6 +55,7 @@ namespace AlibabaCloud
bool xForwardedForClientSourceIpsEnabled;
std::string xForwardedForClientCertFingerprintAlias;
bool xForwardedForClientCertFingerprintEnabled;
bool xForwardedForHostEnabled;
std::string xForwardedForClientSourceIpsTrusted;
std::string xForwardedForClientCertIssuerDNAlias;
std::string xForwardedForClientCertClientVerifyAlias;
@@ -64,6 +65,7 @@ namespace AlibabaCloud
bool xForwardedForProtoEnabled;
bool xForwardedForClientSrcPortEnabled;
bool xForwardedForEnabled;
std::string xForwardedForProcessingMode;
bool xForwardedForSLBPortEnabled;
bool xForwardedForClientCertIssuerDNEnabled;
bool xForwardedForClientCertClientVerifyEnabled;

View File

@@ -84,6 +84,7 @@ namespace AlibabaCloud
std::string scheduler;
std::vector<std::string> relatedRuleIds;
int serverCount;
bool crossZoneEnabled;
bool ipv6Enabled;
SlowStartConfig slowStartConfig;
std::string serviceManagedMode;

View File

@@ -51,6 +51,8 @@ public:
std::string xForwardedForClientCertSubjectDNAlias;
bool xForwardedForClientSourceIpsEnabled;
bool xForwardedForClientCertIssuerDNEnabled;
bool xForwardedForHostEnabled;
std::string xForwardedForProcessingMode;
bool xForwardedForClientCertFingerprintEnabled;
std::string xForwardedForClientCertIssuerDNAlias;
bool xForwardedForProtoEnabled;

View File

@@ -66,6 +66,8 @@ public:
};
UpdateServerGroupAttributeRequest();
~UpdateServerGroupAttributeRequest();
bool getCrossZoneEnabled() const;
void setCrossZoneEnabled(bool crossZoneEnabled);
std::string getServerGroupName() const;
void setServerGroupName(const std::string &serverGroupName);
std::string getClientToken() const;
@@ -92,6 +94,7 @@ public:
void setUchConfig(const UchConfig &uchConfig);
private:
bool crossZoneEnabled_;
std::string serverGroupName_;
std::string clientToken_;
HealthCheckConfig healthCheckConfig_;

View File

@@ -136,6 +136,8 @@ void CreateListenerRequest::setXForwardedForConfig(const CreateListenerRequest::
setParameter(std::string("XForwardedForConfig") + ".XForwardedForClientCertSubjectDNAlias", xForwardedForConfig.xForwardedForClientCertSubjectDNAlias);
setParameter(std::string("XForwardedForConfig") + ".XForwardedForClientSourceIpsEnabled", xForwardedForConfig.xForwardedForClientSourceIpsEnabled ? "true" : "false");
setParameter(std::string("XForwardedForConfig") + ".XForwardedForClientCertIssuerDNEnabled", xForwardedForConfig.xForwardedForClientCertIssuerDNEnabled ? "true" : "false");
setParameter(std::string("XForwardedForConfig") + ".XForwardedForHostEnabled", xForwardedForConfig.xForwardedForHostEnabled ? "true" : "false");
setParameter(std::string("XForwardedForConfig") + ".XForwardedForProcessingMode", xForwardedForConfig.xForwardedForProcessingMode);
setParameter(std::string("XForwardedForConfig") + ".XForwardedForClientCertFingerprintEnabled", xForwardedForConfig.xForwardedForClientCertFingerprintEnabled ? "true" : "false");
setParameter(std::string("XForwardedForConfig") + ".XForwardedForClientCertIssuerDNAlias", xForwardedForConfig.xForwardedForClientCertIssuerDNAlias);
setParameter(std::string("XForwardedForConfig") + ".XForwardedForProtoEnabled", xForwardedForConfig.xForwardedForProtoEnabled ? "true" : "false");

View File

@@ -43,92 +43,92 @@ void CreateRulesRequest::setRules(const std::vector<CreateRulesRequest::Rules> &
for(int dep1 = 0; dep1 != rules.size(); dep1++) {
for(int dep2 = 0; dep2 != rules[dep1].ruleConditions.size(); dep2++) {
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].methodConfig.values.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".MethodConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].methodConfig.values[dep3]);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".MethodConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].methodConfig.values[dep3]);
}
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].sourceIpConfig.values.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".SourceIpConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].sourceIpConfig.values[dep3]);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".SourceIpConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].sourceIpConfig.values[dep3]);
}
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].hostConfig.values.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".HostConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].hostConfig.values[dep3]);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".HostConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].hostConfig.values[dep3]);
}
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].queryStringConfig.values.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".QueryStringConfig.Values." + std::to_string(dep3 + 1) + ".Value", rules[dep1].ruleConditions[dep2].queryStringConfig.values[dep3].value);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".QueryStringConfig.Values." + std::to_string(dep3 + 1) + ".Key", rules[dep1].ruleConditions[dep2].queryStringConfig.values[dep3].key);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".QueryStringConfig.Values." + std::to_string(dep3 + 1) + ".Value", rules[dep1].ruleConditions[dep2].queryStringConfig.values[dep3].value);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".QueryStringConfig.Values." + std::to_string(dep3 + 1) + ".Key", rules[dep1].ruleConditions[dep2].queryStringConfig.values[dep3].key);
}
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].responseStatusCodeConfig.values.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".ResponseStatusCodeConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].responseStatusCodeConfig.values[dep3]);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".ResponseStatusCodeConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].responseStatusCodeConfig.values[dep3]);
}
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].pathConfig.values.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".PathConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].pathConfig.values[dep3]);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".PathConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].pathConfig.values[dep3]);
}
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].cookieConfig.values.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".CookieConfig.Values." + std::to_string(dep3 + 1) + ".Value", rules[dep1].ruleConditions[dep2].cookieConfig.values[dep3].value);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".CookieConfig.Values." + std::to_string(dep3 + 1) + ".Key", rules[dep1].ruleConditions[dep2].cookieConfig.values[dep3].key);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".CookieConfig.Values." + std::to_string(dep3 + 1) + ".Value", rules[dep1].ruleConditions[dep2].cookieConfig.values[dep3].value);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".CookieConfig.Values." + std::to_string(dep3 + 1) + ".Key", rules[dep1].ruleConditions[dep2].cookieConfig.values[dep3].key);
}
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".Type", rules[dep1].ruleConditions[dep2].type);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".Type", rules[dep1].ruleConditions[dep2].type);
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].headerConfig.values.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".HeaderConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].headerConfig.values[dep3]);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".HeaderConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].headerConfig.values[dep3]);
}
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".HeaderConfig.Key", rules[dep1].ruleConditions[dep2].headerConfig.key);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".HeaderConfig.Key", rules[dep1].ruleConditions[dep2].headerConfig.key);
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].responseHeaderConfig.values.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".ResponseHeaderConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].responseHeaderConfig.values[dep3]);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".ResponseHeaderConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].responseHeaderConfig.values[dep3]);
}
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".ResponseHeaderConfig.Key", rules[dep1].ruleConditions[dep2].responseHeaderConfig.key);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".ResponseHeaderConfig.Key", rules[dep1].ruleConditions[dep2].responseHeaderConfig.key);
}
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleName", rules[dep1].ruleName);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleName", rules[dep1].ruleName);
for(int dep2 = 0; dep2 != rules[dep1].tag.size(); dep2++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".Tag." + std::to_string(dep2 + 1) + ".Value", rules[dep1].tag[dep2].value);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".Tag." + std::to_string(dep2 + 1) + ".Key", rules[dep1].tag[dep2].key);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".Tag." + std::to_string(dep2 + 1) + ".Value", rules[dep1].tag[dep2].value);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".Tag." + std::to_string(dep2 + 1) + ".Key", rules[dep1].tag[dep2].key);
}
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".Priority", std::to_string(rules[dep1].priority));
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".Priority", std::to_string(rules[dep1].priority));
for(int dep2 = 0; dep2 != rules[dep1].ruleActions.size(); dep2++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".FixedResponseConfig.HttpCode", rules[dep1].ruleActions[dep2].fixedResponseConfig.httpCode);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".FixedResponseConfig.Content", rules[dep1].ruleActions[dep2].fixedResponseConfig.content);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".FixedResponseConfig.ContentType", rules[dep1].ruleActions[dep2].fixedResponseConfig.contentType);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".FixedResponseConfig.HttpCode", rules[dep1].ruleActions[dep2].fixedResponseConfig.httpCode);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".FixedResponseConfig.Content", rules[dep1].ruleActions[dep2].fixedResponseConfig.content);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".FixedResponseConfig.ContentType", rules[dep1].ruleActions[dep2].fixedResponseConfig.contentType);
for(int dep3 = 0; dep3 != rules[dep1].ruleActions[dep2].trafficMirrorConfig.mirrorGroupConfig.serverGroupTuples.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficMirrorConfig.MirrorGroupConfig.ServerGroupTuples." + std::to_string(dep3 + 1) + ".ServerGroupId", rules[dep1].ruleActions[dep2].trafficMirrorConfig.mirrorGroupConfig.serverGroupTuples[dep3].serverGroupId);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficMirrorConfig.MirrorGroupConfig.ServerGroupTuples." + std::to_string(dep3 + 1) + ".ServerGroupId", rules[dep1].ruleActions[dep2].trafficMirrorConfig.mirrorGroupConfig.serverGroupTuples[dep3].serverGroupId);
}
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficMirrorConfig.TargetType", rules[dep1].ruleActions[dep2].trafficMirrorConfig.targetType);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupStickySession.Enabled", rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupStickySession.enabled ? "true" : "false");
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupStickySession.Timeout", std::to_string(rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupStickySession.timeout));
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficMirrorConfig.TargetType", rules[dep1].ruleActions[dep2].trafficMirrorConfig.targetType);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupStickySession.Enabled", rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupStickySession.enabled ? "true" : "false");
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupStickySession.Timeout", std::to_string(rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupStickySession.timeout));
for(int dep3 = 0; dep3 != rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupTuples.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupTuples." + std::to_string(dep3 + 1) + ".ServerGroupId", rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupTuples[dep3].serverGroupId);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupTuples." + std::to_string(dep3 + 1) + ".Weight", std::to_string(rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupTuples[dep3].weight));
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupTuples." + std::to_string(dep3 + 1) + ".ServerGroupId", rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupTuples[dep3].serverGroupId);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupTuples." + std::to_string(dep3 + 1) + ".Weight", std::to_string(rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupTuples[dep3].weight));
}
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RemoveHeaderConfig.Key", rules[dep1].ruleActions[dep2].removeHeaderConfig.key);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.ValueType", rules[dep1].ruleActions[dep2].insertHeaderConfig.valueType);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.CoverEnabled", rules[dep1].ruleActions[dep2].insertHeaderConfig.coverEnabled ? "true" : "false");
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.Value", rules[dep1].ruleActions[dep2].insertHeaderConfig.value);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.Key", rules[dep1].ruleActions[dep2].insertHeaderConfig.key);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficLimitConfig.QPS", std::to_string(rules[dep1].ruleActions[dep2].trafficLimitConfig.qPS));
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficLimitConfig.PerIpQps", std::to_string(rules[dep1].ruleActions[dep2].trafficLimitConfig.perIpQps));
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowCredentials", rules[dep1].ruleActions[dep2].corsConfig.allowCredentials);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RemoveHeaderConfig.Key", rules[dep1].ruleActions[dep2].removeHeaderConfig.key);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.ValueType", rules[dep1].ruleActions[dep2].insertHeaderConfig.valueType);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.CoverEnabled", rules[dep1].ruleActions[dep2].insertHeaderConfig.coverEnabled ? "true" : "false");
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.Value", rules[dep1].ruleActions[dep2].insertHeaderConfig.value);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.Key", rules[dep1].ruleActions[dep2].insertHeaderConfig.key);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficLimitConfig.QPS", std::to_string(rules[dep1].ruleActions[dep2].trafficLimitConfig.qPS));
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficLimitConfig.PerIpQps", std::to_string(rules[dep1].ruleActions[dep2].trafficLimitConfig.perIpQps));
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowCredentials", rules[dep1].ruleActions[dep2].corsConfig.allowCredentials);
for(int dep3 = 0; dep3 != rules[dep1].ruleActions[dep2].corsConfig.allowOrigin.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowOrigin." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.allowOrigin[dep3]);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowOrigin." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.allowOrigin[dep3]);
}
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.MaxAge", std::to_string(rules[dep1].ruleActions[dep2].corsConfig.maxAge));
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.MaxAge", std::to_string(rules[dep1].ruleActions[dep2].corsConfig.maxAge));
for(int dep3 = 0; dep3 != rules[dep1].ruleActions[dep2].corsConfig.allowMethods.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowMethods." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.allowMethods[dep3]);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowMethods." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.allowMethods[dep3]);
}
for(int dep3 = 0; dep3 != rules[dep1].ruleActions[dep2].corsConfig.allowHeaders.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowHeaders." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.allowHeaders[dep3]);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowHeaders." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.allowHeaders[dep3]);
}
for(int dep3 = 0; dep3 != rules[dep1].ruleActions[dep2].corsConfig.exposeHeaders.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.ExposeHeaders." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.exposeHeaders[dep3]);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.ExposeHeaders." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.exposeHeaders[dep3]);
}
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Path", rules[dep1].ruleActions[dep2].redirectConfig.path);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Protocol", rules[dep1].ruleActions[dep2].redirectConfig.protocol);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Port", rules[dep1].ruleActions[dep2].redirectConfig.port);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Query", rules[dep1].ruleActions[dep2].redirectConfig.query);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Host", rules[dep1].ruleActions[dep2].redirectConfig.host);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.HttpCode", rules[dep1].ruleActions[dep2].redirectConfig.httpCode);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".Type", rules[dep1].ruleActions[dep2].type);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".Order", std::to_string(rules[dep1].ruleActions[dep2].order));
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RewriteConfig.Path", rules[dep1].ruleActions[dep2].rewriteConfig.path);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RewriteConfig.Query", rules[dep1].ruleActions[dep2].rewriteConfig.query);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RewriteConfig.Host", rules[dep1].ruleActions[dep2].rewriteConfig.host);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Path", rules[dep1].ruleActions[dep2].redirectConfig.path);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Protocol", rules[dep1].ruleActions[dep2].redirectConfig.protocol);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Port", rules[dep1].ruleActions[dep2].redirectConfig.port);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Query", rules[dep1].ruleActions[dep2].redirectConfig.query);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Host", rules[dep1].ruleActions[dep2].redirectConfig.host);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.HttpCode", rules[dep1].ruleActions[dep2].redirectConfig.httpCode);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".Type", rules[dep1].ruleActions[dep2].type);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".Order", std::to_string(rules[dep1].ruleActions[dep2].order));
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RewriteConfig.Path", rules[dep1].ruleActions[dep2].rewriteConfig.path);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RewriteConfig.Query", rules[dep1].ruleActions[dep2].rewriteConfig.query);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RewriteConfig.Host", rules[dep1].ruleActions[dep2].rewriteConfig.host);
}
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".Direction", rules[dep1].direction);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".Direction", rules[dep1].direction);
}
}

View File

@@ -25,6 +25,15 @@ CreateServerGroupRequest::CreateServerGroupRequest()
CreateServerGroupRequest::~CreateServerGroupRequest() {}
bool CreateServerGroupRequest::getCrossZoneEnabled() const {
return crossZoneEnabled_;
}
void CreateServerGroupRequest::setCrossZoneEnabled(bool crossZoneEnabled) {
crossZoneEnabled_ = crossZoneEnabled;
setParameter(std::string("CrossZoneEnabled"), crossZoneEnabled ? "true" : "false");
}
std::string CreateServerGroupRequest::getServerGroupName() const {
return serverGroupName_;
}

View File

@@ -151,6 +151,8 @@ void GetListenerAttributeResult::parse(const std::string &payload)
xForwardedForConfig_.xForwardedForClientSrcPortEnabled = xForwardedForConfigNode["XForwardedForClientSrcPortEnabled"].asString() == "true";
if(!xForwardedForConfigNode["XForwardedForEnabled"].isNull())
xForwardedForConfig_.xForwardedForEnabled = xForwardedForConfigNode["XForwardedForEnabled"].asString() == "true";
if(!xForwardedForConfigNode["XForwardedForProcessingMode"].isNull())
xForwardedForConfig_.xForwardedForProcessingMode = xForwardedForConfigNode["XForwardedForProcessingMode"].asString();
if(!xForwardedForConfigNode["XForwardedForProtoEnabled"].isNull())
xForwardedForConfig_.xForwardedForProtoEnabled = xForwardedForConfigNode["XForwardedForProtoEnabled"].asString() == "true";
if(!xForwardedForConfigNode["XForwardedForSLBIdEnabled"].isNull())
@@ -161,6 +163,8 @@ void GetListenerAttributeResult::parse(const std::string &payload)
xForwardedForConfig_.xForwardedForClientSourceIpsEnabled = xForwardedForConfigNode["XForwardedForClientSourceIpsEnabled"].asString() == "true";
if(!xForwardedForConfigNode["XForwardedForClientSourceIpsTrusted"].isNull())
xForwardedForConfig_.xForwardedForClientSourceIpsTrusted = xForwardedForConfigNode["XForwardedForClientSourceIpsTrusted"].asString();
if(!xForwardedForConfigNode["XForwardedForHostEnabled"].isNull())
xForwardedForConfig_.xForwardedForHostEnabled = xForwardedForConfigNode["XForwardedForHostEnabled"].asString() == "true";
if(!value["CaEnabled"].isNull())
caEnabled_ = value["CaEnabled"].asString() == "true";
if(!value["GzipEnabled"].isNull())

View File

@@ -148,6 +148,8 @@ void ListListenersResult::parse(const std::string &payload)
listenersObject.xForwardedForConfig.xForwardedForClientSrcPortEnabled = xForwardedForConfigNode["XForwardedForClientSrcPortEnabled"].asString() == "true";
if(!xForwardedForConfigNode["XForwardedForEnabled"].isNull())
listenersObject.xForwardedForConfig.xForwardedForEnabled = xForwardedForConfigNode["XForwardedForEnabled"].asString() == "true";
if(!xForwardedForConfigNode["XForwardedForProcessingMode"].isNull())
listenersObject.xForwardedForConfig.xForwardedForProcessingMode = xForwardedForConfigNode["XForwardedForProcessingMode"].asString();
if(!xForwardedForConfigNode["XForwardedForProtoEnabled"].isNull())
listenersObject.xForwardedForConfig.xForwardedForProtoEnabled = xForwardedForConfigNode["XForwardedForProtoEnabled"].asString() == "true";
if(!xForwardedForConfigNode["XForwardedForSLBIdEnabled"].isNull())
@@ -158,6 +160,8 @@ void ListListenersResult::parse(const std::string &payload)
listenersObject.xForwardedForConfig.xForwardedForClientSourceIpsEnabled = xForwardedForConfigNode["XForwardedForClientSourceIpsEnabled"].asString() == "true";
if(!xForwardedForConfigNode["XForwardedForClientSourceIpsTrusted"].isNull())
listenersObject.xForwardedForConfig.xForwardedForClientSourceIpsTrusted = xForwardedForConfigNode["XForwardedForClientSourceIpsTrusted"].asString();
if(!xForwardedForConfigNode["XForwardedForHostEnabled"].isNull())
listenersObject.xForwardedForConfig.xForwardedForHostEnabled = xForwardedForConfigNode["XForwardedForHostEnabled"].asString() == "true";
listeners_.push_back(listenersObject);
}
if(!value["MaxResults"].isNull())

View File

@@ -75,6 +75,8 @@ void ListServerGroupsResult::parse(const std::string &payload)
serverGroupsObject.serviceName = valueServerGroupsServerGroup["ServiceName"].asString();
if(!valueServerGroupsServerGroup["CreateTime"].isNull())
serverGroupsObject.createTime = valueServerGroupsServerGroup["CreateTime"].asString();
if(!valueServerGroupsServerGroup["CrossZoneEnabled"].isNull())
serverGroupsObject.crossZoneEnabled = valueServerGroupsServerGroup["CrossZoneEnabled"].asString() == "true";
auto allTagsNode = valueServerGroupsServerGroup["Tags"]["Tag"];
for (auto valueServerGroupsServerGroupTagsTag : allTagsNode)
{

View File

@@ -124,6 +124,8 @@ void UpdateListenerAttributeRequest::setXForwardedForConfig(const UpdateListener
setParameter(std::string("XForwardedForConfig") + ".XForwardedForClientCertSubjectDNAlias", xForwardedForConfig.xForwardedForClientCertSubjectDNAlias);
setParameter(std::string("XForwardedForConfig") + ".XForwardedForClientSourceIpsEnabled", xForwardedForConfig.xForwardedForClientSourceIpsEnabled ? "true" : "false");
setParameter(std::string("XForwardedForConfig") + ".XForwardedForClientCertIssuerDNEnabled", xForwardedForConfig.xForwardedForClientCertIssuerDNEnabled ? "true" : "false");
setParameter(std::string("XForwardedForConfig") + ".XForwardedForHostEnabled", xForwardedForConfig.xForwardedForHostEnabled ? "true" : "false");
setParameter(std::string("XForwardedForConfig") + ".XForwardedForProcessingMode", xForwardedForConfig.xForwardedForProcessingMode);
setParameter(std::string("XForwardedForConfig") + ".XForwardedForClientCertFingerprintEnabled", xForwardedForConfig.xForwardedForClientCertFingerprintEnabled ? "true" : "false");
setParameter(std::string("XForwardedForConfig") + ".XForwardedForClientCertIssuerDNAlias", xForwardedForConfig.xForwardedForClientCertIssuerDNAlias);
setParameter(std::string("XForwardedForConfig") + ".XForwardedForProtoEnabled", xForwardedForConfig.xForwardedForProtoEnabled ? "true" : "false");

View File

@@ -43,87 +43,87 @@ void UpdateRulesAttributeRequest::setRules(const std::vector<UpdateRulesAttribut
for(int dep1 = 0; dep1 != rules.size(); dep1++) {
for(int dep2 = 0; dep2 != rules[dep1].ruleConditions.size(); dep2++) {
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].methodConfig.values.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".MethodConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].methodConfig.values[dep3]);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".MethodConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].methodConfig.values[dep3]);
}
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].sourceIpConfig.values.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".SourceIpConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].sourceIpConfig.values[dep3]);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".SourceIpConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].sourceIpConfig.values[dep3]);
}
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].hostConfig.values.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".HostConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].hostConfig.values[dep3]);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".HostConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].hostConfig.values[dep3]);
}
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].queryStringConfig.values.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".QueryStringConfig.Values." + std::to_string(dep3 + 1) + ".Value", rules[dep1].ruleConditions[dep2].queryStringConfig.values[dep3].value);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".QueryStringConfig.Values." + std::to_string(dep3 + 1) + ".Key", rules[dep1].ruleConditions[dep2].queryStringConfig.values[dep3].key);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".QueryStringConfig.Values." + std::to_string(dep3 + 1) + ".Value", rules[dep1].ruleConditions[dep2].queryStringConfig.values[dep3].value);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".QueryStringConfig.Values." + std::to_string(dep3 + 1) + ".Key", rules[dep1].ruleConditions[dep2].queryStringConfig.values[dep3].key);
}
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].responseStatusCodeConfig.values.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".ResponseStatusCodeConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].responseStatusCodeConfig.values[dep3]);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".ResponseStatusCodeConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].responseStatusCodeConfig.values[dep3]);
}
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].pathConfig.values.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".PathConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].pathConfig.values[dep3]);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".PathConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].pathConfig.values[dep3]);
}
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].cookieConfig.values.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".CookieConfig.Values." + std::to_string(dep3 + 1) + ".Value", rules[dep1].ruleConditions[dep2].cookieConfig.values[dep3].value);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".CookieConfig.Values." + std::to_string(dep3 + 1) + ".Key", rules[dep1].ruleConditions[dep2].cookieConfig.values[dep3].key);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".CookieConfig.Values." + std::to_string(dep3 + 1) + ".Value", rules[dep1].ruleConditions[dep2].cookieConfig.values[dep3].value);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".CookieConfig.Values." + std::to_string(dep3 + 1) + ".Key", rules[dep1].ruleConditions[dep2].cookieConfig.values[dep3].key);
}
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".Type", rules[dep1].ruleConditions[dep2].type);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".Type", rules[dep1].ruleConditions[dep2].type);
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].headerConfig.values.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".HeaderConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].headerConfig.values[dep3]);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".HeaderConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].headerConfig.values[dep3]);
}
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".HeaderConfig.Key", rules[dep1].ruleConditions[dep2].headerConfig.key);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".HeaderConfig.Key", rules[dep1].ruleConditions[dep2].headerConfig.key);
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].responseHeaderConfig.values.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".ResponseHeaderConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].responseHeaderConfig.values[dep3]);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".ResponseHeaderConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].responseHeaderConfig.values[dep3]);
}
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".ResponseHeaderConfig.Key", rules[dep1].ruleConditions[dep2].responseHeaderConfig.key);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".ResponseHeaderConfig.Key", rules[dep1].ruleConditions[dep2].responseHeaderConfig.key);
}
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleName", rules[dep1].ruleName);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".Priority", std::to_string(rules[dep1].priority));
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleId", rules[dep1].ruleId);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleName", rules[dep1].ruleName);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".Priority", std::to_string(rules[dep1].priority));
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleId", rules[dep1].ruleId);
for(int dep2 = 0; dep2 != rules[dep1].ruleActions.size(); dep2++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".FixedResponseConfig.HttpCode", rules[dep1].ruleActions[dep2].fixedResponseConfig.httpCode);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".FixedResponseConfig.Content", rules[dep1].ruleActions[dep2].fixedResponseConfig.content);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".FixedResponseConfig.ContentType", rules[dep1].ruleActions[dep2].fixedResponseConfig.contentType);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".FixedResponseConfig.HttpCode", rules[dep1].ruleActions[dep2].fixedResponseConfig.httpCode);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".FixedResponseConfig.Content", rules[dep1].ruleActions[dep2].fixedResponseConfig.content);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".FixedResponseConfig.ContentType", rules[dep1].ruleActions[dep2].fixedResponseConfig.contentType);
for(int dep3 = 0; dep3 != rules[dep1].ruleActions[dep2].trafficMirrorConfig.mirrorGroupConfig.serverGroupTuples.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficMirrorConfig.MirrorGroupConfig.ServerGroupTuples." + std::to_string(dep3 + 1) + ".ServerGroupId", rules[dep1].ruleActions[dep2].trafficMirrorConfig.mirrorGroupConfig.serverGroupTuples[dep3].serverGroupId);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficMirrorConfig.MirrorGroupConfig.ServerGroupTuples." + std::to_string(dep3 + 1) + ".ServerGroupId", rules[dep1].ruleActions[dep2].trafficMirrorConfig.mirrorGroupConfig.serverGroupTuples[dep3].serverGroupId);
}
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficMirrorConfig.TargetType", rules[dep1].ruleActions[dep2].trafficMirrorConfig.targetType);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupStickySession.Enabled", rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupStickySession.enabled ? "true" : "false");
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupStickySession.Timeout", std::to_string(rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupStickySession.timeout));
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficMirrorConfig.TargetType", rules[dep1].ruleActions[dep2].trafficMirrorConfig.targetType);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupStickySession.Enabled", rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupStickySession.enabled ? "true" : "false");
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupStickySession.Timeout", std::to_string(rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupStickySession.timeout));
for(int dep3 = 0; dep3 != rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupTuples.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupTuples." + std::to_string(dep3 + 1) + ".ServerGroupId", rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupTuples[dep3].serverGroupId);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupTuples." + std::to_string(dep3 + 1) + ".Weight", std::to_string(rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupTuples[dep3].weight));
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupTuples." + std::to_string(dep3 + 1) + ".ServerGroupId", rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupTuples[dep3].serverGroupId);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupTuples." + std::to_string(dep3 + 1) + ".Weight", std::to_string(rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupTuples[dep3].weight));
}
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RemoveHeaderConfig.Key", rules[dep1].ruleActions[dep2].removeHeaderConfig.key);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.ValueType", rules[dep1].ruleActions[dep2].insertHeaderConfig.valueType);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.CoverEnabled", rules[dep1].ruleActions[dep2].insertHeaderConfig.coverEnabled ? "true" : "false");
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.Value", rules[dep1].ruleActions[dep2].insertHeaderConfig.value);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.Key", rules[dep1].ruleActions[dep2].insertHeaderConfig.key);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficLimitConfig.QPS", std::to_string(rules[dep1].ruleActions[dep2].trafficLimitConfig.qPS));
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficLimitConfig.PerIpQps", std::to_string(rules[dep1].ruleActions[dep2].trafficLimitConfig.perIpQps));
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowCredentials", rules[dep1].ruleActions[dep2].corsConfig.allowCredentials);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RemoveHeaderConfig.Key", rules[dep1].ruleActions[dep2].removeHeaderConfig.key);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.ValueType", rules[dep1].ruleActions[dep2].insertHeaderConfig.valueType);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.CoverEnabled", rules[dep1].ruleActions[dep2].insertHeaderConfig.coverEnabled ? "true" : "false");
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.Value", rules[dep1].ruleActions[dep2].insertHeaderConfig.value);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.Key", rules[dep1].ruleActions[dep2].insertHeaderConfig.key);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficLimitConfig.QPS", std::to_string(rules[dep1].ruleActions[dep2].trafficLimitConfig.qPS));
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficLimitConfig.PerIpQps", std::to_string(rules[dep1].ruleActions[dep2].trafficLimitConfig.perIpQps));
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowCredentials", rules[dep1].ruleActions[dep2].corsConfig.allowCredentials);
for(int dep3 = 0; dep3 != rules[dep1].ruleActions[dep2].corsConfig.allowOrigin.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowOrigin." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.allowOrigin[dep3]);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowOrigin." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.allowOrigin[dep3]);
}
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.MaxAge", std::to_string(rules[dep1].ruleActions[dep2].corsConfig.maxAge));
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.MaxAge", std::to_string(rules[dep1].ruleActions[dep2].corsConfig.maxAge));
for(int dep3 = 0; dep3 != rules[dep1].ruleActions[dep2].corsConfig.allowMethods.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowMethods." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.allowMethods[dep3]);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowMethods." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.allowMethods[dep3]);
}
for(int dep3 = 0; dep3 != rules[dep1].ruleActions[dep2].corsConfig.allowHeaders.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowHeaders." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.allowHeaders[dep3]);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowHeaders." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.allowHeaders[dep3]);
}
for(int dep3 = 0; dep3 != rules[dep1].ruleActions[dep2].corsConfig.exposeHeaders.size(); dep3++) {
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.ExposeHeaders." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.exposeHeaders[dep3]);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.ExposeHeaders." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.exposeHeaders[dep3]);
}
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Path", rules[dep1].ruleActions[dep2].redirectConfig.path);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Protocol", rules[dep1].ruleActions[dep2].redirectConfig.protocol);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Port", rules[dep1].ruleActions[dep2].redirectConfig.port);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Query", rules[dep1].ruleActions[dep2].redirectConfig.query);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Host", rules[dep1].ruleActions[dep2].redirectConfig.host);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.HttpCode", rules[dep1].ruleActions[dep2].redirectConfig.httpCode);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".Type", rules[dep1].ruleActions[dep2].type);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".Order", std::to_string(rules[dep1].ruleActions[dep2].order));
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RewriteConfig.Path", rules[dep1].ruleActions[dep2].rewriteConfig.path);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RewriteConfig.Query", rules[dep1].ruleActions[dep2].rewriteConfig.query);
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RewriteConfig.Host", rules[dep1].ruleActions[dep2].rewriteConfig.host);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Path", rules[dep1].ruleActions[dep2].redirectConfig.path);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Protocol", rules[dep1].ruleActions[dep2].redirectConfig.protocol);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Port", rules[dep1].ruleActions[dep2].redirectConfig.port);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Query", rules[dep1].ruleActions[dep2].redirectConfig.query);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Host", rules[dep1].ruleActions[dep2].redirectConfig.host);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.HttpCode", rules[dep1].ruleActions[dep2].redirectConfig.httpCode);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".Type", rules[dep1].ruleActions[dep2].type);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".Order", std::to_string(rules[dep1].ruleActions[dep2].order));
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RewriteConfig.Path", rules[dep1].ruleActions[dep2].rewriteConfig.path);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RewriteConfig.Query", rules[dep1].ruleActions[dep2].rewriteConfig.query);
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RewriteConfig.Host", rules[dep1].ruleActions[dep2].rewriteConfig.host);
}
}
}

View File

@@ -25,6 +25,15 @@ UpdateServerGroupAttributeRequest::UpdateServerGroupAttributeRequest()
UpdateServerGroupAttributeRequest::~UpdateServerGroupAttributeRequest() {}
bool UpdateServerGroupAttributeRequest::getCrossZoneEnabled() const {
return crossZoneEnabled_;
}
void UpdateServerGroupAttributeRequest::setCrossZoneEnabled(bool crossZoneEnabled) {
crossZoneEnabled_ = crossZoneEnabled;
setParameter(std::string("CrossZoneEnabled"), crossZoneEnabled ? "true" : "false");
}
std::string UpdateServerGroupAttributeRequest::getServerGroupName() const {
return serverGroupName_;
}

134
anytrans/CMakeLists.txt Normal file
View 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}
)

View 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_

View File

@@ -0,0 +1,32 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_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_

View File

@@ -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_

View File

@@ -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_

View File

@@ -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_

View File

@@ -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_

View File

@@ -0,0 +1,45 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_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_

View File

@@ -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_

View File

@@ -0,0 +1,45 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_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_

View File

@@ -0,0 +1,72 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#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_

View File

@@ -0,0 +1,45 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_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_

View 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.
*/
#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_

View File

@@ -0,0 +1,45 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_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_

View File

@@ -0,0 +1,72 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#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_

View 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.
*/
#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_

View File

@@ -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_

View File

@@ -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_

View File

@@ -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_

View File

@@ -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_

View File

@@ -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_

View File

@@ -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_

View File

@@ -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_

View File

@@ -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_

View File

@@ -0,0 +1,72 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#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_

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#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_

View File

@@ -0,0 +1,72 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#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_

View File

@@ -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_

View File

@@ -0,0 +1,72 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#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_

View 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();
}

View 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);
}

View 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_;
}

View 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);
}

View 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_;
}

View 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);
}

View 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_;
}

View 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);
}

View 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_;
}

View 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);
}

View 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_;
}

View 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);
}

View 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_;
}

View 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);
}

View 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_;
}

View 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);
}

Some files were not shown because too many files have changed in this diff Show More