Compare commits
93 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e2ee6d530 | ||
|
|
51d167c03c | ||
|
|
f6470e6c02 | ||
|
|
d77681a132 | ||
|
|
7ceaff6c6e | ||
|
|
5048e01469 | ||
|
|
322f1ef667 | ||
|
|
b52edc6252 | ||
|
|
ac468a852e | ||
|
|
6abf1431b6 | ||
|
|
f22a078c0d | ||
|
|
5b357e5604 | ||
|
|
479a50df98 | ||
|
|
f341a65b45 | ||
|
|
0b153cfa56 | ||
|
|
9d5401c5cc | ||
|
|
1d3414a920 | ||
|
|
c0a0891ea7 | ||
|
|
8173f354c3 | ||
|
|
3b5f67fc09 | ||
|
|
9d1d86828b | ||
|
|
5b7a4727cb | ||
|
|
53db98b044 | ||
|
|
a74b01935d | ||
|
|
0b56244443 | ||
|
|
d8723973a4 | ||
|
|
8241d996ce | ||
|
|
ec161f0408 | ||
|
|
70bcdee246 | ||
|
|
6a7e1f141c | ||
|
|
ecf6c5f448 | ||
|
|
eef41337b0 | ||
|
|
83325f3e37 | ||
|
|
808e4da670 | ||
|
|
070025342e | ||
|
|
8e06520db5 | ||
|
|
9a6e36ba1b | ||
|
|
44d329a7b7 | ||
|
|
fb86207f1d | ||
|
|
377eb9e470 | ||
|
|
69374307d5 | ||
|
|
7809012e2d | ||
|
|
88f17da9be | ||
|
|
ee32114ccc | ||
|
|
692a2a3429 | ||
|
|
2616afb389 | ||
|
|
d2887a4adc | ||
|
|
e7d1a04d88 | ||
|
|
164bc90823 | ||
|
|
bdba38a5ae | ||
|
|
75a566b4d3 | ||
|
|
1e67a571a1 | ||
|
|
fc5b3998fe | ||
|
|
23a2074f17 | ||
|
|
b4df698c3e | ||
|
|
9f1edb0b33 | ||
|
|
5bd1d921f4 | ||
|
|
c0c834e64a | ||
|
|
9b2557bf41 | ||
|
|
1f2e0e0b42 | ||
|
|
0b9b79f37b | ||
|
|
62ea99cdb2 | ||
|
|
54be46c456 | ||
|
|
8d6c81401f | ||
|
|
72138b276a | ||
|
|
53d26e9957 | ||
|
|
7f21cf83b9 | ||
|
|
cf5863b104 | ||
|
|
28503fa2e5 | ||
|
|
a71e6dd1ae | ||
|
|
af9bc95b0b | ||
|
|
4208be77a5 | ||
|
|
338fe94f31 | ||
|
|
fb513278fe | ||
|
|
ec9cd15b58 | ||
|
|
1954195d9c | ||
|
|
ffd0c138d3 | ||
|
|
40a7995d11 | ||
|
|
2ebf998ace | ||
|
|
444397191f | ||
|
|
a09160460b | ||
|
|
cd9e24cdd0 | ||
|
|
6830235852 | ||
|
|
bc2d245597 | ||
|
|
168c4f1cf1 | ||
|
|
948b05b62e | ||
|
|
3e5235c2ca | ||
|
|
6deaa997fb | ||
|
|
dbe02e376e | ||
|
|
0c2f5f41c4 | ||
|
|
1d1099683e | ||
|
|
48362f9159 | ||
|
|
574a5e964d |
@@ -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)。
|
||||
|
||||
## 使用诊断
|
||||
|
||||
|
||||
@@ -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).
|
||||
|
||||
|
||||
90
aipodcast/CMakeLists.txt
Normal file
90
aipodcast/CMakeLists.txt
Normal 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}
|
||||
)
|
||||
62
aipodcast/include/alibabacloud/aipodcast/AIPodcastClient.h
Normal file
62
aipodcast/include/alibabacloud/aipodcast/AIPodcastClient.h
Normal 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_
|
||||
32
aipodcast/include/alibabacloud/aipodcast/AIPodcastExport.h
Normal file
32
aipodcast/include/alibabacloud/aipodcast/AIPodcastExport.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_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_
|
||||
@@ -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_
|
||||
@@ -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_
|
||||
@@ -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_
|
||||
@@ -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_
|
||||
125
aipodcast/src/AIPodcastClient.cc
Normal file
125
aipodcast/src/AIPodcastClient.cc
Normal 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();
|
||||
}
|
||||
|
||||
55
aipodcast/src/model/PodcastTaskResultQueryRequest.cc
Normal file
55
aipodcast/src/model/PodcastTaskResultQueryRequest.cc
Normal 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);
|
||||
}
|
||||
|
||||
44
aipodcast/src/model/PodcastTaskResultQueryResult.cc
Normal file
44
aipodcast/src/model/PodcastTaskResultQueryResult.cc
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/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());
|
||||
|
||||
}
|
||||
|
||||
122
aipodcast/src/model/PodcastTaskSubmitRequest.cc
Normal file
122
aipodcast/src/model/PodcastTaskSubmitRequest.cc
Normal 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);
|
||||
}
|
||||
|
||||
89
aipodcast/src/model/PodcastTaskSubmitResult.cc
Normal file
89
aipodcast/src/model/PodcastTaskSubmitResult.cc
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/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_;
|
||||
}
|
||||
|
||||
@@ -55,6 +55,8 @@ public:
|
||||
std::string xForwardedForClientCertSubjectDNAlias;
|
||||
bool xForwardedForClientSourceIpsEnabled;
|
||||
bool xForwardedForClientCertIssuerDNEnabled;
|
||||
bool xForwardedForHostEnabled;
|
||||
std::string xForwardedForProcessingMode;
|
||||
bool xForwardedForClientCertFingerprintEnabled;
|
||||
std::string xForwardedForClientCertIssuerDNAlias;
|
||||
bool xForwardedForProtoEnabled;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -51,6 +51,8 @@ public:
|
||||
std::string xForwardedForClientCertSubjectDNAlias;
|
||||
bool xForwardedForClientSourceIpsEnabled;
|
||||
bool xForwardedForClientCertIssuerDNEnabled;
|
||||
bool xForwardedForHostEnabled;
|
||||
std::string xForwardedForProcessingMode;
|
||||
bool xForwardedForClientCertFingerprintEnabled;
|
||||
std::string xForwardedForClientCertIssuerDNAlias;
|
||||
bool xForwardedForProtoEnabled;
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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");
|
||||
|
||||
134
anytrans/CMakeLists.txt
Normal file
134
anytrans/CMakeLists.txt
Normal file
@@ -0,0 +1,134 @@
|
||||
#
|
||||
# Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
||||
|
||||
set(anytrans_public_header
|
||||
include/alibabacloud/anytrans/AnyTransClient.h
|
||||
include/alibabacloud/anytrans/AnyTransExport.h )
|
||||
|
||||
set(anytrans_public_header_model
|
||||
include/alibabacloud/anytrans/model/BatchTranslateRequest.h
|
||||
include/alibabacloud/anytrans/model/BatchTranslateResult.h
|
||||
include/alibabacloud/anytrans/model/BatchTranslateForHtmlRequest.h
|
||||
include/alibabacloud/anytrans/model/BatchTranslateForHtmlResult.h
|
||||
include/alibabacloud/anytrans/model/GetDocTranslateTaskRequest.h
|
||||
include/alibabacloud/anytrans/model/GetDocTranslateTaskResult.h
|
||||
include/alibabacloud/anytrans/model/GetHtmlTranslateTaskRequest.h
|
||||
include/alibabacloud/anytrans/model/GetHtmlTranslateTaskResult.h
|
||||
include/alibabacloud/anytrans/model/GetImageTranslateTaskRequest.h
|
||||
include/alibabacloud/anytrans/model/GetImageTranslateTaskResult.h
|
||||
include/alibabacloud/anytrans/model/GetLongTextTranslateTaskRequest.h
|
||||
include/alibabacloud/anytrans/model/GetLongTextTranslateTaskResult.h
|
||||
include/alibabacloud/anytrans/model/SubmitDocTranslateTaskRequest.h
|
||||
include/alibabacloud/anytrans/model/SubmitDocTranslateTaskResult.h
|
||||
include/alibabacloud/anytrans/model/SubmitHtmlTranslateTaskRequest.h
|
||||
include/alibabacloud/anytrans/model/SubmitHtmlTranslateTaskResult.h
|
||||
include/alibabacloud/anytrans/model/SubmitImageTranslateTaskRequest.h
|
||||
include/alibabacloud/anytrans/model/SubmitImageTranslateTaskResult.h
|
||||
include/alibabacloud/anytrans/model/SubmitLongTextTranslateTaskRequest.h
|
||||
include/alibabacloud/anytrans/model/SubmitLongTextTranslateTaskResult.h
|
||||
include/alibabacloud/anytrans/model/TermEditRequest.h
|
||||
include/alibabacloud/anytrans/model/TermEditResult.h
|
||||
include/alibabacloud/anytrans/model/TermQueryRequest.h
|
||||
include/alibabacloud/anytrans/model/TermQueryResult.h
|
||||
include/alibabacloud/anytrans/model/TextTranslateRequest.h
|
||||
include/alibabacloud/anytrans/model/TextTranslateResult.h )
|
||||
|
||||
set(anytrans_src
|
||||
src/AnyTransClient.cc
|
||||
src/model/BatchTranslateRequest.cc
|
||||
src/model/BatchTranslateResult.cc
|
||||
src/model/BatchTranslateForHtmlRequest.cc
|
||||
src/model/BatchTranslateForHtmlResult.cc
|
||||
src/model/GetDocTranslateTaskRequest.cc
|
||||
src/model/GetDocTranslateTaskResult.cc
|
||||
src/model/GetHtmlTranslateTaskRequest.cc
|
||||
src/model/GetHtmlTranslateTaskResult.cc
|
||||
src/model/GetImageTranslateTaskRequest.cc
|
||||
src/model/GetImageTranslateTaskResult.cc
|
||||
src/model/GetLongTextTranslateTaskRequest.cc
|
||||
src/model/GetLongTextTranslateTaskResult.cc
|
||||
src/model/SubmitDocTranslateTaskRequest.cc
|
||||
src/model/SubmitDocTranslateTaskResult.cc
|
||||
src/model/SubmitHtmlTranslateTaskRequest.cc
|
||||
src/model/SubmitHtmlTranslateTaskResult.cc
|
||||
src/model/SubmitImageTranslateTaskRequest.cc
|
||||
src/model/SubmitImageTranslateTaskResult.cc
|
||||
src/model/SubmitLongTextTranslateTaskRequest.cc
|
||||
src/model/SubmitLongTextTranslateTaskResult.cc
|
||||
src/model/TermEditRequest.cc
|
||||
src/model/TermEditResult.cc
|
||||
src/model/TermQueryRequest.cc
|
||||
src/model/TermQueryResult.cc
|
||||
src/model/TextTranslateRequest.cc
|
||||
src/model/TextTranslateResult.cc )
|
||||
|
||||
add_library(anytrans ${LIB_TYPE}
|
||||
${anytrans_public_header}
|
||||
${anytrans_public_header_model}
|
||||
${anytrans_src})
|
||||
|
||||
set_target_properties(anytrans
|
||||
PROPERTIES
|
||||
LINKER_LANGUAGE CXX
|
||||
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}anytrans
|
||||
)
|
||||
|
||||
if(${LIB_TYPE} STREQUAL "SHARED")
|
||||
set_target_properties(anytrans
|
||||
PROPERTIES
|
||||
DEFINE_SYMBOL ALIBABACLOUD_ANYTRANS_LIBRARY)
|
||||
endif()
|
||||
|
||||
target_include_directories(anytrans
|
||||
PRIVATE include
|
||||
${CMAKE_SOURCE_DIR}/core/include
|
||||
)
|
||||
target_link_libraries(anytrans
|
||||
core)
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
|
||||
set(jsoncpp_install_dir ${INSTALL_DIR})
|
||||
add_dependencies(anytrans
|
||||
jsoncpp)
|
||||
target_include_directories(anytrans
|
||||
PRIVATE ${jsoncpp_install_dir}/include)
|
||||
target_link_libraries(anytrans
|
||||
${jsoncpp_install_dir}/lib/jsoncpp.lib)
|
||||
set_target_properties(anytrans
|
||||
PROPERTIES
|
||||
COMPILE_OPTIONS "/bigobj")
|
||||
else()
|
||||
target_include_directories(anytrans
|
||||
PRIVATE /usr/include/jsoncpp)
|
||||
target_link_libraries(anytrans
|
||||
jsoncpp)
|
||||
endif()
|
||||
|
||||
install(FILES ${anytrans_public_header}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/anytrans)
|
||||
install(FILES ${anytrans_public_header_model}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/anytrans/model)
|
||||
install(TARGETS anytrans
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
150
anytrans/include/alibabacloud/anytrans/AnyTransClient.h
Normal file
150
anytrans/include/alibabacloud/anytrans/AnyTransClient.h
Normal file
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_ANYTRANSCLIENT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_ANYTRANSCLIENT_H_
|
||||
|
||||
#include <future>
|
||||
#include <alibabacloud/core/AsyncCallerContext.h>
|
||||
#include <alibabacloud/core/EndpointProvider.h>
|
||||
#include <alibabacloud/core/RoaServiceClient.h>
|
||||
#include "AnyTransExport.h"
|
||||
#include "model/BatchTranslateRequest.h"
|
||||
#include "model/BatchTranslateResult.h"
|
||||
#include "model/BatchTranslateForHtmlRequest.h"
|
||||
#include "model/BatchTranslateForHtmlResult.h"
|
||||
#include "model/GetDocTranslateTaskRequest.h"
|
||||
#include "model/GetDocTranslateTaskResult.h"
|
||||
#include "model/GetHtmlTranslateTaskRequest.h"
|
||||
#include "model/GetHtmlTranslateTaskResult.h"
|
||||
#include "model/GetImageTranslateTaskRequest.h"
|
||||
#include "model/GetImageTranslateTaskResult.h"
|
||||
#include "model/GetLongTextTranslateTaskRequest.h"
|
||||
#include "model/GetLongTextTranslateTaskResult.h"
|
||||
#include "model/SubmitDocTranslateTaskRequest.h"
|
||||
#include "model/SubmitDocTranslateTaskResult.h"
|
||||
#include "model/SubmitHtmlTranslateTaskRequest.h"
|
||||
#include "model/SubmitHtmlTranslateTaskResult.h"
|
||||
#include "model/SubmitImageTranslateTaskRequest.h"
|
||||
#include "model/SubmitImageTranslateTaskResult.h"
|
||||
#include "model/SubmitLongTextTranslateTaskRequest.h"
|
||||
#include "model/SubmitLongTextTranslateTaskResult.h"
|
||||
#include "model/TermEditRequest.h"
|
||||
#include "model/TermEditResult.h"
|
||||
#include "model/TermQueryRequest.h"
|
||||
#include "model/TermQueryResult.h"
|
||||
#include "model/TextTranslateRequest.h"
|
||||
#include "model/TextTranslateResult.h"
|
||||
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT AnyTransClient : public RoaServiceClient
|
||||
{
|
||||
public:
|
||||
typedef Outcome<Error, Model::BatchTranslateResult> BatchTranslateOutcome;
|
||||
typedef std::future<BatchTranslateOutcome> BatchTranslateOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::BatchTranslateRequest&, const BatchTranslateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BatchTranslateAsyncHandler;
|
||||
typedef Outcome<Error, Model::BatchTranslateForHtmlResult> BatchTranslateForHtmlOutcome;
|
||||
typedef std::future<BatchTranslateForHtmlOutcome> BatchTranslateForHtmlOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::BatchTranslateForHtmlRequest&, const BatchTranslateForHtmlOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BatchTranslateForHtmlAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetDocTranslateTaskResult> GetDocTranslateTaskOutcome;
|
||||
typedef std::future<GetDocTranslateTaskOutcome> GetDocTranslateTaskOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::GetDocTranslateTaskRequest&, const GetDocTranslateTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetDocTranslateTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetHtmlTranslateTaskResult> GetHtmlTranslateTaskOutcome;
|
||||
typedef std::future<GetHtmlTranslateTaskOutcome> GetHtmlTranslateTaskOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::GetHtmlTranslateTaskRequest&, const GetHtmlTranslateTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetHtmlTranslateTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetImageTranslateTaskResult> GetImageTranslateTaskOutcome;
|
||||
typedef std::future<GetImageTranslateTaskOutcome> GetImageTranslateTaskOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::GetImageTranslateTaskRequest&, const GetImageTranslateTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetImageTranslateTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetLongTextTranslateTaskResult> GetLongTextTranslateTaskOutcome;
|
||||
typedef std::future<GetLongTextTranslateTaskOutcome> GetLongTextTranslateTaskOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::GetLongTextTranslateTaskRequest&, const GetLongTextTranslateTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetLongTextTranslateTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::SubmitDocTranslateTaskResult> SubmitDocTranslateTaskOutcome;
|
||||
typedef std::future<SubmitDocTranslateTaskOutcome> SubmitDocTranslateTaskOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::SubmitDocTranslateTaskRequest&, const SubmitDocTranslateTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SubmitDocTranslateTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::SubmitHtmlTranslateTaskResult> SubmitHtmlTranslateTaskOutcome;
|
||||
typedef std::future<SubmitHtmlTranslateTaskOutcome> SubmitHtmlTranslateTaskOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::SubmitHtmlTranslateTaskRequest&, const SubmitHtmlTranslateTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SubmitHtmlTranslateTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::SubmitImageTranslateTaskResult> SubmitImageTranslateTaskOutcome;
|
||||
typedef std::future<SubmitImageTranslateTaskOutcome> SubmitImageTranslateTaskOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::SubmitImageTranslateTaskRequest&, const SubmitImageTranslateTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SubmitImageTranslateTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::SubmitLongTextTranslateTaskResult> SubmitLongTextTranslateTaskOutcome;
|
||||
typedef std::future<SubmitLongTextTranslateTaskOutcome> SubmitLongTextTranslateTaskOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::SubmitLongTextTranslateTaskRequest&, const SubmitLongTextTranslateTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SubmitLongTextTranslateTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::TermEditResult> TermEditOutcome;
|
||||
typedef std::future<TermEditOutcome> TermEditOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::TermEditRequest&, const TermEditOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> TermEditAsyncHandler;
|
||||
typedef Outcome<Error, Model::TermQueryResult> TermQueryOutcome;
|
||||
typedef std::future<TermQueryOutcome> TermQueryOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::TermQueryRequest&, const TermQueryOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> TermQueryAsyncHandler;
|
||||
typedef Outcome<Error, Model::TextTranslateResult> TextTranslateOutcome;
|
||||
typedef std::future<TextTranslateOutcome> TextTranslateOutcomeCallable;
|
||||
typedef std::function<void(const AnyTransClient*, const Model::TextTranslateRequest&, const TextTranslateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> TextTranslateAsyncHandler;
|
||||
|
||||
AnyTransClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||
AnyTransClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||
AnyTransClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||
~AnyTransClient();
|
||||
BatchTranslateOutcome batchTranslate(const Model::BatchTranslateRequest &request)const;
|
||||
void batchTranslateAsync(const Model::BatchTranslateRequest& request, const BatchTranslateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
BatchTranslateOutcomeCallable batchTranslateCallable(const Model::BatchTranslateRequest& request) const;
|
||||
BatchTranslateForHtmlOutcome batchTranslateForHtml(const Model::BatchTranslateForHtmlRequest &request)const;
|
||||
void batchTranslateForHtmlAsync(const Model::BatchTranslateForHtmlRequest& request, const BatchTranslateForHtmlAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
BatchTranslateForHtmlOutcomeCallable batchTranslateForHtmlCallable(const Model::BatchTranslateForHtmlRequest& request) const;
|
||||
GetDocTranslateTaskOutcome getDocTranslateTask(const Model::GetDocTranslateTaskRequest &request)const;
|
||||
void getDocTranslateTaskAsync(const Model::GetDocTranslateTaskRequest& request, const GetDocTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetDocTranslateTaskOutcomeCallable getDocTranslateTaskCallable(const Model::GetDocTranslateTaskRequest& request) const;
|
||||
GetHtmlTranslateTaskOutcome getHtmlTranslateTask(const Model::GetHtmlTranslateTaskRequest &request)const;
|
||||
void getHtmlTranslateTaskAsync(const Model::GetHtmlTranslateTaskRequest& request, const GetHtmlTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetHtmlTranslateTaskOutcomeCallable getHtmlTranslateTaskCallable(const Model::GetHtmlTranslateTaskRequest& request) const;
|
||||
GetImageTranslateTaskOutcome getImageTranslateTask(const Model::GetImageTranslateTaskRequest &request)const;
|
||||
void getImageTranslateTaskAsync(const Model::GetImageTranslateTaskRequest& request, const GetImageTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetImageTranslateTaskOutcomeCallable getImageTranslateTaskCallable(const Model::GetImageTranslateTaskRequest& request) const;
|
||||
GetLongTextTranslateTaskOutcome getLongTextTranslateTask(const Model::GetLongTextTranslateTaskRequest &request)const;
|
||||
void getLongTextTranslateTaskAsync(const Model::GetLongTextTranslateTaskRequest& request, const GetLongTextTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetLongTextTranslateTaskOutcomeCallable getLongTextTranslateTaskCallable(const Model::GetLongTextTranslateTaskRequest& request) const;
|
||||
SubmitDocTranslateTaskOutcome submitDocTranslateTask(const Model::SubmitDocTranslateTaskRequest &request)const;
|
||||
void submitDocTranslateTaskAsync(const Model::SubmitDocTranslateTaskRequest& request, const SubmitDocTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
SubmitDocTranslateTaskOutcomeCallable submitDocTranslateTaskCallable(const Model::SubmitDocTranslateTaskRequest& request) const;
|
||||
SubmitHtmlTranslateTaskOutcome submitHtmlTranslateTask(const Model::SubmitHtmlTranslateTaskRequest &request)const;
|
||||
void submitHtmlTranslateTaskAsync(const Model::SubmitHtmlTranslateTaskRequest& request, const SubmitHtmlTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
SubmitHtmlTranslateTaskOutcomeCallable submitHtmlTranslateTaskCallable(const Model::SubmitHtmlTranslateTaskRequest& request) const;
|
||||
SubmitImageTranslateTaskOutcome submitImageTranslateTask(const Model::SubmitImageTranslateTaskRequest &request)const;
|
||||
void submitImageTranslateTaskAsync(const Model::SubmitImageTranslateTaskRequest& request, const SubmitImageTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
SubmitImageTranslateTaskOutcomeCallable submitImageTranslateTaskCallable(const Model::SubmitImageTranslateTaskRequest& request) const;
|
||||
SubmitLongTextTranslateTaskOutcome submitLongTextTranslateTask(const Model::SubmitLongTextTranslateTaskRequest &request)const;
|
||||
void submitLongTextTranslateTaskAsync(const Model::SubmitLongTextTranslateTaskRequest& request, const SubmitLongTextTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
SubmitLongTextTranslateTaskOutcomeCallable submitLongTextTranslateTaskCallable(const Model::SubmitLongTextTranslateTaskRequest& request) const;
|
||||
TermEditOutcome termEdit(const Model::TermEditRequest &request)const;
|
||||
void termEditAsync(const Model::TermEditRequest& request, const TermEditAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
TermEditOutcomeCallable termEditCallable(const Model::TermEditRequest& request) const;
|
||||
TermQueryOutcome termQuery(const Model::TermQueryRequest &request)const;
|
||||
void termQueryAsync(const Model::TermQueryRequest& request, const TermQueryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
TermQueryOutcomeCallable termQueryCallable(const Model::TermQueryRequest& request) const;
|
||||
TextTranslateOutcome textTranslate(const Model::TextTranslateRequest &request)const;
|
||||
void textTranslateAsync(const Model::TextTranslateRequest& request, const TextTranslateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
TextTranslateOutcomeCallable textTranslateCallable(const Model::TextTranslateRequest& request) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_ANYTRANSCLIENT_H_
|
||||
32
anytrans/include/alibabacloud/anytrans/AnyTransExport.h
Normal file
32
anytrans/include/alibabacloud/anytrans/AnyTransExport.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_ANYTRANSEXPORT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_ANYTRANSEXPORT_H_
|
||||
|
||||
#include <alibabacloud/core/Global.h>
|
||||
|
||||
#if defined(ALIBABACLOUD_SHARED)
|
||||
# if defined(ALIBABACLOUD_ANYTRANS_LIBRARY)
|
||||
# define ALIBABACLOUD_ANYTRANS_EXPORT ALIBABACLOUD_DECL_EXPORT
|
||||
# else
|
||||
# define ALIBABACLOUD_ANYTRANS_EXPORT ALIBABACLOUD_DECL_IMPORT
|
||||
# endif
|
||||
#else
|
||||
# define ALIBABACLOUD_ANYTRANS_EXPORT
|
||||
#endif
|
||||
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_ANYTRANSEXPORT_H_
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_BATCHTRANSLATEFORHTMLREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_BATCHTRANSLATEFORHTMLREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT BatchTranslateForHtmlRequest : public RoaServiceRequest {
|
||||
public:
|
||||
struct Ext {
|
||||
std::string string;
|
||||
std::vector<std::string> sensitives;
|
||||
struct TerminologiesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
terminologiesItem terminologiesItem;
|
||||
std::vector<terminologiesItem> terminologies;
|
||||
struct TextTransform {
|
||||
bool toLower;
|
||||
bool toUpper;
|
||||
bool toTitle;
|
||||
};
|
||||
textTransform textTransform;
|
||||
struct ExamplesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
examplesItem examplesItem;
|
||||
std::vector<examplesItem> examples;
|
||||
struct Config {
|
||||
bool skipCsiCheck;
|
||||
};
|
||||
config config;
|
||||
std::string domainHint;
|
||||
};
|
||||
BatchTranslateForHtmlRequest();
|
||||
~BatchTranslateForHtmlRequest();
|
||||
ext getExt() const;
|
||||
void setExt(const ext &ext);
|
||||
std::string getSourceLanguage() const;
|
||||
void setSourceLanguage(const std::string &sourceLanguage);
|
||||
std::string getFormat() const;
|
||||
void setFormat(const std::string &format);
|
||||
std::string getScene() const;
|
||||
void setScene(const std::string &scene);
|
||||
std::string getAppName() const;
|
||||
void setAppName(const std::string &appName);
|
||||
std::string getTargetLanguage() const;
|
||||
void setTargetLanguage(const std::string &targetLanguage);
|
||||
std::map<std::string, std::string> getText() const;
|
||||
void setText(const std::map<std::string, std::string> &text);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
ext ext_;
|
||||
std::string sourceLanguage_;
|
||||
std::string format_;
|
||||
std::string scene_;
|
||||
std::string appName_;
|
||||
std::string targetLanguage_;
|
||||
std::map<std::string, std::string> text_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_BATCHTRANSLATEFORHTMLREQUEST_H_
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_BATCHTRANSLATEFORHTMLRESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_BATCHTRANSLATEFORHTMLRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT BatchTranslateForHtmlResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct TranslationListItem
|
||||
{
|
||||
struct Usage
|
||||
{
|
||||
long inputTokens;
|
||||
long totalTokens;
|
||||
long outputTokens;
|
||||
};
|
||||
Usage usage;
|
||||
std::string translation;
|
||||
std::string message;
|
||||
std::string index;
|
||||
long code;
|
||||
};
|
||||
std::vector<TranslationListItem> translationList;
|
||||
};
|
||||
|
||||
|
||||
BatchTranslateForHtmlResult();
|
||||
explicit BatchTranslateForHtmlResult(const std::string &payload);
|
||||
~BatchTranslateForHtmlResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_BATCHTRANSLATEFORHTMLRESULT_H_
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_BATCHTRANSLATEREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_BATCHTRANSLATEREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT BatchTranslateRequest : public RoaServiceRequest {
|
||||
public:
|
||||
struct Ext {
|
||||
std::string string;
|
||||
std::vector<std::string> sensitives;
|
||||
struct TerminologiesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
terminologiesItem terminologiesItem;
|
||||
std::vector<terminologiesItem> terminologies;
|
||||
struct TextTransform {
|
||||
bool toLower;
|
||||
bool toUpper;
|
||||
bool toTitle;
|
||||
};
|
||||
textTransform textTransform;
|
||||
struct ExamplesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
examplesItem examplesItem;
|
||||
std::vector<examplesItem> examples;
|
||||
struct Config {
|
||||
bool skipCsiCheck;
|
||||
};
|
||||
config config;
|
||||
std::string domainHint;
|
||||
};
|
||||
BatchTranslateRequest();
|
||||
~BatchTranslateRequest();
|
||||
ext getExt() const;
|
||||
void setExt(const ext &ext);
|
||||
std::string getSourceLanguage() const;
|
||||
void setSourceLanguage(const std::string &sourceLanguage);
|
||||
std::string getFormat() const;
|
||||
void setFormat(const std::string &format);
|
||||
std::string getScene() const;
|
||||
void setScene(const std::string &scene);
|
||||
std::string getAppName() const;
|
||||
void setAppName(const std::string &appName);
|
||||
std::string getTargetLanguage() const;
|
||||
void setTargetLanguage(const std::string &targetLanguage);
|
||||
std::map<std::string, std::string> getText() const;
|
||||
void setText(const std::map<std::string, std::string> &text);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
ext ext_;
|
||||
std::string sourceLanguage_;
|
||||
std::string format_;
|
||||
std::string scene_;
|
||||
std::string appName_;
|
||||
std::string targetLanguage_;
|
||||
std::map<std::string, std::string> text_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_BATCHTRANSLATEREQUEST_H_
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_BATCHTRANSLATERESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_BATCHTRANSLATERESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT BatchTranslateResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct TranslationListItem
|
||||
{
|
||||
struct Usage
|
||||
{
|
||||
long inputTokens;
|
||||
long totalTokens;
|
||||
long outputTokens;
|
||||
};
|
||||
Usage usage;
|
||||
std::string translation;
|
||||
std::string message;
|
||||
std::string index;
|
||||
long code;
|
||||
};
|
||||
std::vector<TranslationListItem> translationList;
|
||||
};
|
||||
|
||||
|
||||
BatchTranslateResult();
|
||||
explicit BatchTranslateResult(const std::string &payload);
|
||||
~BatchTranslateResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_BATCHTRANSLATERESULT_H_
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_GETDOCTRANSLATETASKREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_GETDOCTRANSLATETASKREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT GetDocTranslateTaskRequest : public RoaServiceRequest {
|
||||
public:
|
||||
GetDocTranslateTaskRequest();
|
||||
~GetDocTranslateTaskRequest();
|
||||
std::string getTaskId() const;
|
||||
void setTaskId(const std::string &taskId);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
std::string taskId_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_GETDOCTRANSLATETASKREQUEST_H_
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_GETDOCTRANSLATETASKRESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_GETDOCTRANSLATETASKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT GetDocTranslateTaskResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string status;
|
||||
int charactersCount;
|
||||
std::string taskId;
|
||||
int pageCount;
|
||||
std::string translateFileUrl;
|
||||
};
|
||||
|
||||
|
||||
GetDocTranslateTaskResult();
|
||||
explicit GetDocTranslateTaskResult(const std::string &payload);
|
||||
~GetDocTranslateTaskResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_GETDOCTRANSLATETASKRESULT_H_
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_GETHTMLTRANSLATETASKREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_GETHTMLTRANSLATETASKREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT GetHtmlTranslateTaskRequest : public RoaServiceRequest {
|
||||
public:
|
||||
GetHtmlTranslateTaskRequest();
|
||||
~GetHtmlTranslateTaskRequest();
|
||||
std::string getTaskId() const;
|
||||
void setTaskId(const std::string &taskId);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
std::string taskId_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_GETHTMLTRANSLATETASKREQUEST_H_
|
||||
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_GETHTMLTRANSLATETASKRESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_GETHTMLTRANSLATETASKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT GetHtmlTranslateTaskResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct Usage
|
||||
{
|
||||
long inputTokens;
|
||||
long totalTokens;
|
||||
long outputTokens;
|
||||
};
|
||||
Usage usage;
|
||||
std::string translation;
|
||||
};
|
||||
|
||||
|
||||
GetHtmlTranslateTaskResult();
|
||||
explicit GetHtmlTranslateTaskResult(const std::string &payload);
|
||||
~GetHtmlTranslateTaskResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_GETHTMLTRANSLATETASKRESULT_H_
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_GETIMAGETRANSLATETASKREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_GETIMAGETRANSLATETASKREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT GetImageTranslateTaskRequest : public RoaServiceRequest {
|
||||
public:
|
||||
GetImageTranslateTaskRequest();
|
||||
~GetImageTranslateTaskRequest();
|
||||
std::string getTaskId() const;
|
||||
void setTaskId(const std::string &taskId);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
std::string taskId_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_GETIMAGETRANSLATETASKREQUEST_H_
|
||||
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_GETIMAGETRANSLATETASKRESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_GETIMAGETRANSLATETASKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT GetImageTranslateTaskResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct Translation
|
||||
{
|
||||
struct BoundingBoxesItem
|
||||
{
|
||||
struct UpLeft
|
||||
{
|
||||
long x;
|
||||
long y;
|
||||
};
|
||||
struct UpRight
|
||||
{
|
||||
long x;
|
||||
long y;
|
||||
};
|
||||
struct DownLeft
|
||||
{
|
||||
long x;
|
||||
long y;
|
||||
};
|
||||
struct DownRight
|
||||
{
|
||||
long x;
|
||||
long y;
|
||||
};
|
||||
long tableId;
|
||||
long tableCellId;
|
||||
std::string translation;
|
||||
UpRight upRight;
|
||||
DownRight downRight;
|
||||
float confidence;
|
||||
UpLeft upLeft;
|
||||
std::string text;
|
||||
long direction;
|
||||
DownLeft downLeft;
|
||||
};
|
||||
struct TableInfosItem
|
||||
{
|
||||
struct CellInfosItem
|
||||
{
|
||||
struct PosItem
|
||||
{
|
||||
long x;
|
||||
long y;
|
||||
};
|
||||
long tableCellId;
|
||||
std::vector<CellInfosItem::PosItem> pos;
|
||||
long yec;
|
||||
long xec;
|
||||
long ysc;
|
||||
long xsc;
|
||||
std::string text;
|
||||
};
|
||||
long tableId;
|
||||
std::vector<TableInfosItem::CellInfosItem> cellInfos;
|
||||
long xCellSize;
|
||||
long yCellSize;
|
||||
};
|
||||
long orgWidth;
|
||||
std::vector<BoundingBoxesItem> boundingBoxes;
|
||||
long angle;
|
||||
long orgHeight;
|
||||
long boxesCount;
|
||||
long height;
|
||||
std::vector<TableInfosItem> tableInfos;
|
||||
long width;
|
||||
};
|
||||
Translation translation;
|
||||
std::string traceId;
|
||||
};
|
||||
|
||||
|
||||
GetImageTranslateTaskResult();
|
||||
explicit GetImageTranslateTaskResult(const std::string &payload);
|
||||
~GetImageTranslateTaskResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
bool getSynchro()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
bool synchro_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_GETIMAGETRANSLATETASKRESULT_H_
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_GETLONGTEXTTRANSLATETASKREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_GETLONGTEXTTRANSLATETASKREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT GetLongTextTranslateTaskRequest : public RoaServiceRequest {
|
||||
public:
|
||||
GetLongTextTranslateTaskRequest();
|
||||
~GetLongTextTranslateTaskRequest();
|
||||
std::string getTaskId() const;
|
||||
void setTaskId(const std::string &taskId);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
std::string taskId_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_GETLONGTEXTTRANSLATETASKREQUEST_H_
|
||||
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_GETLONGTEXTTRANSLATETASKRESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_GETLONGTEXTTRANSLATETASKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT GetLongTextTranslateTaskResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct Usage
|
||||
{
|
||||
long inputTokens;
|
||||
long totalTokens;
|
||||
long outputTokens;
|
||||
};
|
||||
Usage usage;
|
||||
std::string translation;
|
||||
};
|
||||
|
||||
|
||||
GetLongTextTranslateTaskResult();
|
||||
explicit GetLongTextTranslateTaskResult(const std::string &payload);
|
||||
~GetLongTextTranslateTaskResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_GETLONGTEXTTRANSLATETASKRESULT_H_
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_SUBMITDOCTRANSLATETASKREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_SUBMITDOCTRANSLATETASKREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT SubmitDocTranslateTaskRequest : public RoaServiceRequest {
|
||||
public:
|
||||
struct Ext {
|
||||
struct TerminologiesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
terminologiesItem terminologiesItem;
|
||||
std::vector<terminologiesItem> terminologies;
|
||||
struct Config {
|
||||
bool skipImgTrans;
|
||||
};
|
||||
config config;
|
||||
std::string domainHint;
|
||||
};
|
||||
SubmitDocTranslateTaskRequest();
|
||||
~SubmitDocTranslateTaskRequest();
|
||||
ext getExt() const;
|
||||
void setExt(const ext &ext);
|
||||
std::string getSourceLanguage() const;
|
||||
void setSourceLanguage(const std::string &sourceLanguage);
|
||||
std::string getFormat() const;
|
||||
void setFormat(const std::string &format);
|
||||
std::string getScene() const;
|
||||
void setScene(const std::string &scene);
|
||||
std::string getTargetLanguage() const;
|
||||
void setTargetLanguage(const std::string &targetLanguage);
|
||||
std::string getText() const;
|
||||
void setText(const std::string &text);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
ext ext_;
|
||||
std::string sourceLanguage_;
|
||||
std::string format_;
|
||||
std::string scene_;
|
||||
std::string targetLanguage_;
|
||||
std::string text_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_SUBMITDOCTRANSLATETASKREQUEST_H_
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_SUBMITDOCTRANSLATETASKRESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_SUBMITDOCTRANSLATETASKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT SubmitDocTranslateTaskResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string status;
|
||||
std::string taskId;
|
||||
};
|
||||
|
||||
|
||||
SubmitDocTranslateTaskResult();
|
||||
explicit SubmitDocTranslateTaskResult(const std::string &payload);
|
||||
~SubmitDocTranslateTaskResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_SUBMITDOCTRANSLATETASKRESULT_H_
|
||||
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_SUBMITHTMLTRANSLATETASKREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_SUBMITHTMLTRANSLATETASKREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT SubmitHtmlTranslateTaskRequest : public RoaServiceRequest {
|
||||
public:
|
||||
struct Ext {
|
||||
std::string string;
|
||||
std::vector<std::string> sensitives;
|
||||
struct TerminologiesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
terminologiesItem terminologiesItem;
|
||||
std::vector<terminologiesItem> terminologies;
|
||||
struct TextTransform {
|
||||
bool toLower;
|
||||
bool toUpper;
|
||||
bool toTitle;
|
||||
};
|
||||
textTransform textTransform;
|
||||
struct ExamplesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
examplesItem examplesItem;
|
||||
std::vector<examplesItem> examples;
|
||||
struct Config {
|
||||
bool skipCsiCheck;
|
||||
std::string callbackUrl;
|
||||
};
|
||||
config config;
|
||||
std::string domainHint;
|
||||
};
|
||||
SubmitHtmlTranslateTaskRequest();
|
||||
~SubmitHtmlTranslateTaskRequest();
|
||||
ext getExt() const;
|
||||
void setExt(const ext &ext);
|
||||
std::string getSourceLanguage() const;
|
||||
void setSourceLanguage(const std::string &sourceLanguage);
|
||||
std::string getFormat() const;
|
||||
void setFormat(const std::string &format);
|
||||
std::string getScene() const;
|
||||
void setScene(const std::string &scene);
|
||||
std::string getTargetLanguage() const;
|
||||
void setTargetLanguage(const std::string &targetLanguage);
|
||||
std::string getText() const;
|
||||
void setText(const std::string &text);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
ext ext_;
|
||||
std::string sourceLanguage_;
|
||||
std::string format_;
|
||||
std::string scene_;
|
||||
std::string targetLanguage_;
|
||||
std::string text_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_SUBMITHTMLTRANSLATETASKREQUEST_H_
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_SUBMITHTMLTRANSLATETASKRESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_SUBMITHTMLTRANSLATETASKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT SubmitHtmlTranslateTaskResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string status;
|
||||
std::string taskId;
|
||||
};
|
||||
|
||||
|
||||
SubmitHtmlTranslateTaskResult();
|
||||
explicit SubmitHtmlTranslateTaskResult(const std::string &payload);
|
||||
~SubmitHtmlTranslateTaskResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_SUBMITHTMLTRANSLATETASKRESULT_H_
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_SUBMITIMAGETRANSLATETASKREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_SUBMITIMAGETRANSLATETASKREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT SubmitImageTranslateTaskRequest : public RoaServiceRequest {
|
||||
public:
|
||||
struct Ext {
|
||||
std::string string;
|
||||
std::vector<std::string> sensitives;
|
||||
struct TerminologiesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
terminologiesItem terminologiesItem;
|
||||
std::vector<terminologiesItem> terminologies;
|
||||
struct TextTransform {
|
||||
bool toLower;
|
||||
bool toUpper;
|
||||
bool toTitle;
|
||||
};
|
||||
textTransform textTransform;
|
||||
struct ExamplesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
examplesItem examplesItem;
|
||||
std::vector<examplesItem> examples;
|
||||
std::string domainHint;
|
||||
};
|
||||
SubmitImageTranslateTaskRequest();
|
||||
~SubmitImageTranslateTaskRequest();
|
||||
ext getExt() const;
|
||||
void setExt(const ext &ext);
|
||||
std::string getSourceLanguage() const;
|
||||
void setSourceLanguage(const std::string &sourceLanguage);
|
||||
std::string getFormat() const;
|
||||
void setFormat(const std::string &format);
|
||||
std::string getScene() const;
|
||||
void setScene(const std::string &scene);
|
||||
std::string getText() const;
|
||||
void setText(const std::string &text);
|
||||
std::vector<std::string> getTargetLanguage() const;
|
||||
void setTargetLanguage(const std::vector<std::string> &targetLanguage);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
ext ext_;
|
||||
std::string sourceLanguage_;
|
||||
std::string format_;
|
||||
std::string scene_;
|
||||
std::string text_;
|
||||
std::vector<std::string> targetLanguage_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_SUBMITIMAGETRANSLATETASKREQUEST_H_
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_SUBMITIMAGETRANSLATETASKRESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_SUBMITIMAGETRANSLATETASKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT SubmitImageTranslateTaskResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string status;
|
||||
std::string taskId;
|
||||
};
|
||||
|
||||
|
||||
SubmitImageTranslateTaskResult();
|
||||
explicit SubmitImageTranslateTaskResult(const std::string &payload);
|
||||
~SubmitImageTranslateTaskResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_SUBMITIMAGETRANSLATETASKRESULT_H_
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_SUBMITLONGTEXTTRANSLATETASKREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_SUBMITLONGTEXTTRANSLATETASKREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT SubmitLongTextTranslateTaskRequest : public RoaServiceRequest {
|
||||
public:
|
||||
struct Ext {
|
||||
std::string string;
|
||||
std::vector<std::string> sensitives;
|
||||
struct TerminologiesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
terminologiesItem terminologiesItem;
|
||||
std::vector<terminologiesItem> terminologies;
|
||||
struct TextTransform {
|
||||
bool toLower;
|
||||
bool toUpper;
|
||||
bool toTitle;
|
||||
};
|
||||
textTransform textTransform;
|
||||
struct ExamplesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
examplesItem examplesItem;
|
||||
std::vector<examplesItem> examples;
|
||||
struct Config {
|
||||
bool skipCsiCheck;
|
||||
};
|
||||
config config;
|
||||
std::string domainHint;
|
||||
};
|
||||
SubmitLongTextTranslateTaskRequest();
|
||||
~SubmitLongTextTranslateTaskRequest();
|
||||
ext getExt() const;
|
||||
void setExt(const ext &ext);
|
||||
std::string getSourceLanguage() const;
|
||||
void setSourceLanguage(const std::string &sourceLanguage);
|
||||
std::string getFormat() const;
|
||||
void setFormat(const std::string &format);
|
||||
std::string getScene() const;
|
||||
void setScene(const std::string &scene);
|
||||
std::string getTargetLanguage() const;
|
||||
void setTargetLanguage(const std::string &targetLanguage);
|
||||
std::string getText() const;
|
||||
void setText(const std::string &text);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
ext ext_;
|
||||
std::string sourceLanguage_;
|
||||
std::string format_;
|
||||
std::string scene_;
|
||||
std::string targetLanguage_;
|
||||
std::string text_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_SUBMITLONGTEXTTRANSLATETASKREQUEST_H_
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_SUBMITLONGTEXTTRANSLATETASKRESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_SUBMITLONGTEXTTRANSLATETASKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT SubmitLongTextTranslateTaskResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string status;
|
||||
std::string taskId;
|
||||
};
|
||||
|
||||
|
||||
SubmitLongTextTranslateTaskResult();
|
||||
explicit SubmitLongTextTranslateTaskResult(const std::string &payload);
|
||||
~SubmitLongTextTranslateTaskResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_SUBMITLONGTEXTTRANSLATETASKRESULT_H_
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_TERMEDITREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_TERMEDITREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT TermEditRequest : public RoaServiceRequest {
|
||||
public:
|
||||
struct Ext {
|
||||
struct TermsItem {
|
||||
std::string tgt;
|
||||
std::string termId;
|
||||
std::string src;
|
||||
};
|
||||
termsItem termsItem;
|
||||
std::vector<termsItem> terms;
|
||||
};
|
||||
TermEditRequest();
|
||||
~TermEditRequest();
|
||||
ext getExt() const;
|
||||
void setExt(const ext &ext);
|
||||
std::string getSourceLanguage() const;
|
||||
void setSourceLanguage(const std::string &sourceLanguage);
|
||||
std::string getScene() const;
|
||||
void setScene(const std::string &scene);
|
||||
std::string getAction() const;
|
||||
void setAction(const std::string &action);
|
||||
std::string getTargetLanguage() const;
|
||||
void setTargetLanguage(const std::string &targetLanguage);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
ext ext_;
|
||||
std::string sourceLanguage_;
|
||||
std::string scene_;
|
||||
std::string action_;
|
||||
std::string targetLanguage_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_TERMEDITREQUEST_H_
|
||||
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_TERMEDITRESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_TERMEDITRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT TermEditResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct TermsItem
|
||||
{
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
std::string termId;
|
||||
};
|
||||
std::vector<TermsItem> terms;
|
||||
long failCount;
|
||||
};
|
||||
|
||||
|
||||
TermEditResult();
|
||||
explicit TermEditResult(const std::string &payload);
|
||||
~TermEditResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_TERMEDITRESULT_H_
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_TERMQUERYREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_TERMQUERYREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT TermQueryRequest : public RoaServiceRequest {
|
||||
public:
|
||||
TermQueryRequest();
|
||||
~TermQueryRequest();
|
||||
std::string getSourceLanguage() const;
|
||||
void setSourceLanguage(const std::string &sourceLanguage);
|
||||
std::string getScene() const;
|
||||
void setScene(const std::string &scene);
|
||||
std::string getTargetLanguage() const;
|
||||
void setTargetLanguage(const std::string &targetLanguage);
|
||||
std::string getText() const;
|
||||
void setText(const std::string &text);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
std::string sourceLanguage_;
|
||||
std::string scene_;
|
||||
std::string targetLanguage_;
|
||||
std::string text_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_TERMQUERYREQUEST_H_
|
||||
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_TERMQUERYRESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_TERMQUERYRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT TermQueryResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct TermsItem
|
||||
{
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
std::string termId;
|
||||
};
|
||||
std::vector<TermsItem> terms;
|
||||
long failCount;
|
||||
};
|
||||
|
||||
|
||||
TermQueryResult();
|
||||
explicit TermQueryResult(const std::string &payload);
|
||||
~TermQueryResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_TERMQUERYRESULT_H_
|
||||
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_TEXTTRANSLATEREQUEST_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_TEXTTRANSLATEREQUEST_H_
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AnyTrans {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT TextTranslateRequest : public RoaServiceRequest {
|
||||
public:
|
||||
struct Ext {
|
||||
std::string string;
|
||||
std::vector<std::string> sensitives;
|
||||
struct TerminologiesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
terminologiesItem terminologiesItem;
|
||||
std::vector<terminologiesItem> terminologies;
|
||||
struct TextTransform {
|
||||
bool toLower;
|
||||
bool toUpper;
|
||||
bool toTitle;
|
||||
};
|
||||
textTransform textTransform;
|
||||
std::string agent;
|
||||
struct ExamplesItem {
|
||||
std::string tgt;
|
||||
std::string src;
|
||||
};
|
||||
examplesItem examplesItem;
|
||||
std::vector<examplesItem> examples;
|
||||
struct Config {
|
||||
bool skipCsiCheck;
|
||||
};
|
||||
config config;
|
||||
std::string domainHint;
|
||||
};
|
||||
TextTranslateRequest();
|
||||
~TextTranslateRequest();
|
||||
ext getExt() const;
|
||||
void setExt(const ext &ext);
|
||||
std::string getSourceLanguage() const;
|
||||
void setSourceLanguage(const std::string &sourceLanguage);
|
||||
std::string getFormat() const;
|
||||
void setFormat(const std::string &format);
|
||||
std::string getScene() const;
|
||||
void setScene(const std::string &scene);
|
||||
std::string getTargetLanguage() const;
|
||||
void setTargetLanguage(const std::string &targetLanguage);
|
||||
std::string getText() const;
|
||||
void setText(const std::string &text);
|
||||
std::string getWorkspaceId() const;
|
||||
void setWorkspaceId(const std::string &workspaceId);
|
||||
|
||||
private:
|
||||
ext ext_;
|
||||
std::string sourceLanguage_;
|
||||
std::string format_;
|
||||
std::string scene_;
|
||||
std::string targetLanguage_;
|
||||
std::string text_;
|
||||
std::string workspaceId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AnyTrans
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_TEXTTRANSLATEREQUEST_H_
|
||||
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ANYTRANS_MODEL_TEXTTRANSLATERESULT_H_
|
||||
#define ALIBABACLOUD_ANYTRANS_MODEL_TEXTTRANSLATERESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/anytrans/AnyTransExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AnyTrans
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ANYTRANS_EXPORT TextTranslateResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct Usage
|
||||
{
|
||||
long inputTokens;
|
||||
long totalTokens;
|
||||
long outputTokens;
|
||||
};
|
||||
Usage usage;
|
||||
std::string translation;
|
||||
};
|
||||
|
||||
|
||||
TextTranslateResult();
|
||||
explicit TextTranslateResult(const std::string &payload);
|
||||
~TextTranslateResult();
|
||||
std::string getMessage()const;
|
||||
std::string getRequestId()const;
|
||||
std::string getHttpStatusCode()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string requestId_;
|
||||
std::string httpStatusCode_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ANYTRANS_MODEL_TEXTTRANSLATERESULT_H_
|
||||
521
anytrans/src/AnyTransClient.cc
Normal file
521
anytrans/src/AnyTransClient.cc
Normal file
@@ -0,0 +1,521 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/AnyTransClient.h>
|
||||
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||
|
||||
using namespace AlibabaCloud;
|
||||
using namespace AlibabaCloud::Location;
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
namespace
|
||||
{
|
||||
const std::string SERVICE_NAME = "AnyTrans";
|
||||
}
|
||||
|
||||
AnyTransClient::AnyTransClient(const Credentials &credentials, const ClientConfiguration &configuration) :
|
||||
RoaServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
AnyTransClient::AnyTransClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||
RoaServiceClient(SERVICE_NAME, credentialsProvider, configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
AnyTransClient::AnyTransClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
|
||||
RoaServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
AnyTransClient::~AnyTransClient()
|
||||
{}
|
||||
|
||||
AnyTransClient::BatchTranslateOutcome AnyTransClient::batchTranslate(const BatchTranslateRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return BatchTranslateOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return BatchTranslateOutcome(BatchTranslateResult(outcome.result()));
|
||||
else
|
||||
return BatchTranslateOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::batchTranslateAsync(const BatchTranslateRequest& request, const BatchTranslateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, batchTranslate(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::BatchTranslateOutcomeCallable AnyTransClient::batchTranslateCallable(const BatchTranslateRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<BatchTranslateOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->batchTranslate(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::BatchTranslateForHtmlOutcome AnyTransClient::batchTranslateForHtml(const BatchTranslateForHtmlRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return BatchTranslateForHtmlOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return BatchTranslateForHtmlOutcome(BatchTranslateForHtmlResult(outcome.result()));
|
||||
else
|
||||
return BatchTranslateForHtmlOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::batchTranslateForHtmlAsync(const BatchTranslateForHtmlRequest& request, const BatchTranslateForHtmlAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, batchTranslateForHtml(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::BatchTranslateForHtmlOutcomeCallable AnyTransClient::batchTranslateForHtmlCallable(const BatchTranslateForHtmlRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<BatchTranslateForHtmlOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->batchTranslateForHtml(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::GetDocTranslateTaskOutcome AnyTransClient::getDocTranslateTask(const GetDocTranslateTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetDocTranslateTaskOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetDocTranslateTaskOutcome(GetDocTranslateTaskResult(outcome.result()));
|
||||
else
|
||||
return GetDocTranslateTaskOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::getDocTranslateTaskAsync(const GetDocTranslateTaskRequest& request, const GetDocTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getDocTranslateTask(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::GetDocTranslateTaskOutcomeCallable AnyTransClient::getDocTranslateTaskCallable(const GetDocTranslateTaskRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetDocTranslateTaskOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getDocTranslateTask(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::GetHtmlTranslateTaskOutcome AnyTransClient::getHtmlTranslateTask(const GetHtmlTranslateTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetHtmlTranslateTaskOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetHtmlTranslateTaskOutcome(GetHtmlTranslateTaskResult(outcome.result()));
|
||||
else
|
||||
return GetHtmlTranslateTaskOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::getHtmlTranslateTaskAsync(const GetHtmlTranslateTaskRequest& request, const GetHtmlTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getHtmlTranslateTask(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::GetHtmlTranslateTaskOutcomeCallable AnyTransClient::getHtmlTranslateTaskCallable(const GetHtmlTranslateTaskRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetHtmlTranslateTaskOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getHtmlTranslateTask(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::GetImageTranslateTaskOutcome AnyTransClient::getImageTranslateTask(const GetImageTranslateTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetImageTranslateTaskOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetImageTranslateTaskOutcome(GetImageTranslateTaskResult(outcome.result()));
|
||||
else
|
||||
return GetImageTranslateTaskOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::getImageTranslateTaskAsync(const GetImageTranslateTaskRequest& request, const GetImageTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getImageTranslateTask(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::GetImageTranslateTaskOutcomeCallable AnyTransClient::getImageTranslateTaskCallable(const GetImageTranslateTaskRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetImageTranslateTaskOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getImageTranslateTask(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::GetLongTextTranslateTaskOutcome AnyTransClient::getLongTextTranslateTask(const GetLongTextTranslateTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetLongTextTranslateTaskOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetLongTextTranslateTaskOutcome(GetLongTextTranslateTaskResult(outcome.result()));
|
||||
else
|
||||
return GetLongTextTranslateTaskOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::getLongTextTranslateTaskAsync(const GetLongTextTranslateTaskRequest& request, const GetLongTextTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getLongTextTranslateTask(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::GetLongTextTranslateTaskOutcomeCallable AnyTransClient::getLongTextTranslateTaskCallable(const GetLongTextTranslateTaskRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetLongTextTranslateTaskOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getLongTextTranslateTask(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::SubmitDocTranslateTaskOutcome AnyTransClient::submitDocTranslateTask(const SubmitDocTranslateTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return SubmitDocTranslateTaskOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return SubmitDocTranslateTaskOutcome(SubmitDocTranslateTaskResult(outcome.result()));
|
||||
else
|
||||
return SubmitDocTranslateTaskOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::submitDocTranslateTaskAsync(const SubmitDocTranslateTaskRequest& request, const SubmitDocTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, submitDocTranslateTask(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::SubmitDocTranslateTaskOutcomeCallable AnyTransClient::submitDocTranslateTaskCallable(const SubmitDocTranslateTaskRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<SubmitDocTranslateTaskOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->submitDocTranslateTask(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::SubmitHtmlTranslateTaskOutcome AnyTransClient::submitHtmlTranslateTask(const SubmitHtmlTranslateTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return SubmitHtmlTranslateTaskOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return SubmitHtmlTranslateTaskOutcome(SubmitHtmlTranslateTaskResult(outcome.result()));
|
||||
else
|
||||
return SubmitHtmlTranslateTaskOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::submitHtmlTranslateTaskAsync(const SubmitHtmlTranslateTaskRequest& request, const SubmitHtmlTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, submitHtmlTranslateTask(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::SubmitHtmlTranslateTaskOutcomeCallable AnyTransClient::submitHtmlTranslateTaskCallable(const SubmitHtmlTranslateTaskRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<SubmitHtmlTranslateTaskOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->submitHtmlTranslateTask(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::SubmitImageTranslateTaskOutcome AnyTransClient::submitImageTranslateTask(const SubmitImageTranslateTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return SubmitImageTranslateTaskOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return SubmitImageTranslateTaskOutcome(SubmitImageTranslateTaskResult(outcome.result()));
|
||||
else
|
||||
return SubmitImageTranslateTaskOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::submitImageTranslateTaskAsync(const SubmitImageTranslateTaskRequest& request, const SubmitImageTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, submitImageTranslateTask(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::SubmitImageTranslateTaskOutcomeCallable AnyTransClient::submitImageTranslateTaskCallable(const SubmitImageTranslateTaskRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<SubmitImageTranslateTaskOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->submitImageTranslateTask(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::SubmitLongTextTranslateTaskOutcome AnyTransClient::submitLongTextTranslateTask(const SubmitLongTextTranslateTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return SubmitLongTextTranslateTaskOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return SubmitLongTextTranslateTaskOutcome(SubmitLongTextTranslateTaskResult(outcome.result()));
|
||||
else
|
||||
return SubmitLongTextTranslateTaskOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::submitLongTextTranslateTaskAsync(const SubmitLongTextTranslateTaskRequest& request, const SubmitLongTextTranslateTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, submitLongTextTranslateTask(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::SubmitLongTextTranslateTaskOutcomeCallable AnyTransClient::submitLongTextTranslateTaskCallable(const SubmitLongTextTranslateTaskRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<SubmitLongTextTranslateTaskOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->submitLongTextTranslateTask(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::TermEditOutcome AnyTransClient::termEdit(const TermEditRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return TermEditOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return TermEditOutcome(TermEditResult(outcome.result()));
|
||||
else
|
||||
return TermEditOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::termEditAsync(const TermEditRequest& request, const TermEditAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, termEdit(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::TermEditOutcomeCallable AnyTransClient::termEditCallable(const TermEditRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<TermEditOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->termEdit(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::TermQueryOutcome AnyTransClient::termQuery(const TermQueryRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return TermQueryOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return TermQueryOutcome(TermQueryResult(outcome.result()));
|
||||
else
|
||||
return TermQueryOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::termQueryAsync(const TermQueryRequest& request, const TermQueryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, termQuery(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::TermQueryOutcomeCallable AnyTransClient::termQueryCallable(const TermQueryRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<TermQueryOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->termQuery(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AnyTransClient::TextTranslateOutcome AnyTransClient::textTranslate(const TextTranslateRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return TextTranslateOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return TextTranslateOutcome(TextTranslateResult(outcome.result()));
|
||||
else
|
||||
return TextTranslateOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AnyTransClient::textTranslateAsync(const TextTranslateRequest& request, const TextTranslateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, textTranslate(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AnyTransClient::TextTranslateOutcomeCallable AnyTransClient::textTranslateCallable(const TextTranslateRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<TextTranslateOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->textTranslate(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
117
anytrans/src/model/BatchTranslateForHtmlRequest.cc
Normal file
117
anytrans/src/model/BatchTranslateForHtmlRequest.cc
Normal file
@@ -0,0 +1,117 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/BatchTranslateForHtmlRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::BatchTranslateForHtmlRequest;
|
||||
|
||||
BatchTranslateForHtmlRequest::BatchTranslateForHtmlRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/batchForHtml"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
BatchTranslateForHtmlRequest::~BatchTranslateForHtmlRequest() {}
|
||||
|
||||
BatchTranslateForHtmlRequest::ext BatchTranslateForHtmlRequest::getExt() const {
|
||||
return ext_;
|
||||
}
|
||||
|
||||
void BatchTranslateForHtmlRequest::setExt(const BatchTranslateForHtmlRequest::ext &ext) {
|
||||
ext_ = ext;
|
||||
for(int dep1 = 0; dep1 != ext.sensitives.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".sensitives." + std::to_string(dep1 + 1), ext.sensitives[dep1]);
|
||||
}
|
||||
for(int dep1 = 0; dep1 != ext.terminologies.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".tgt", ext.terminologies[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".src", ext.terminologies[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toLower", ext.textTransform.toLower ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toUpper", ext.textTransform.toUpper ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toTitle", ext.textTransform.toTitle ? "true" : "false");
|
||||
for(int dep1 = 0; dep1 != ext.examples.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".tgt", ext.examples[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".src", ext.examples[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".config.skipCsiCheck", ext.config.skipCsiCheck ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".domainHint", ext.domainHint);
|
||||
}
|
||||
|
||||
std::string BatchTranslateForHtmlRequest::getSourceLanguage() const {
|
||||
return sourceLanguage_;
|
||||
}
|
||||
|
||||
void BatchTranslateForHtmlRequest::setSourceLanguage(const std::string &sourceLanguage) {
|
||||
sourceLanguage_ = sourceLanguage;
|
||||
setBodyParameter(std::string("sourceLanguage"), sourceLanguage);
|
||||
}
|
||||
|
||||
std::string BatchTranslateForHtmlRequest::getFormat() const {
|
||||
return format_;
|
||||
}
|
||||
|
||||
void BatchTranslateForHtmlRequest::setFormat(const std::string &format) {
|
||||
format_ = format;
|
||||
setBodyParameter(std::string("format"), format);
|
||||
}
|
||||
|
||||
std::string BatchTranslateForHtmlRequest::getScene() const {
|
||||
return scene_;
|
||||
}
|
||||
|
||||
void BatchTranslateForHtmlRequest::setScene(const std::string &scene) {
|
||||
scene_ = scene;
|
||||
setBodyParameter(std::string("scene"), scene);
|
||||
}
|
||||
|
||||
std::string BatchTranslateForHtmlRequest::getAppName() const {
|
||||
return appName_;
|
||||
}
|
||||
|
||||
void BatchTranslateForHtmlRequest::setAppName(const std::string &appName) {
|
||||
appName_ = appName;
|
||||
setBodyParameter(std::string("appName"), appName);
|
||||
}
|
||||
|
||||
std::string BatchTranslateForHtmlRequest::getTargetLanguage() const {
|
||||
return targetLanguage_;
|
||||
}
|
||||
|
||||
void BatchTranslateForHtmlRequest::setTargetLanguage(const std::string &targetLanguage) {
|
||||
targetLanguage_ = targetLanguage;
|
||||
setBodyParameter(std::string("targetLanguage"), targetLanguage);
|
||||
}
|
||||
|
||||
std::map<std::string, std::string> BatchTranslateForHtmlRequest::getText() const {
|
||||
return text_;
|
||||
}
|
||||
|
||||
void BatchTranslateForHtmlRequest::setText(const std::map<std::string, std::string> &text) {
|
||||
text_ = text;
|
||||
for(auto const &iter1 : text) {
|
||||
setBodyParameter(std::string("text") + "." + iter1.first, iter1.second);
|
||||
}
|
||||
}
|
||||
|
||||
std::string BatchTranslateForHtmlRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void BatchTranslateForHtmlRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
106
anytrans/src/model/BatchTranslateForHtmlResult.cc
Normal file
106
anytrans/src/model/BatchTranslateForHtmlResult.cc
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/BatchTranslateForHtmlResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
BatchTranslateForHtmlResult::BatchTranslateForHtmlResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
BatchTranslateForHtmlResult::BatchTranslateForHtmlResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
BatchTranslateForHtmlResult::~BatchTranslateForHtmlResult()
|
||||
{}
|
||||
|
||||
void BatchTranslateForHtmlResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
auto alltranslationListNode = dataNode["translationList"]["translationListItem"];
|
||||
for (auto dataNodetranslationListtranslationListItem : alltranslationListNode)
|
||||
{
|
||||
Data::TranslationListItem translationListItemObject;
|
||||
if(!dataNodetranslationListtranslationListItem["code"].isNull())
|
||||
translationListItemObject.code = std::stol(dataNodetranslationListtranslationListItem["code"].asString());
|
||||
if(!dataNodetranslationListtranslationListItem["message"].isNull())
|
||||
translationListItemObject.message = dataNodetranslationListtranslationListItem["message"].asString();
|
||||
if(!dataNodetranslationListtranslationListItem["index"].isNull())
|
||||
translationListItemObject.index = dataNodetranslationListtranslationListItem["index"].asString();
|
||||
if(!dataNodetranslationListtranslationListItem["translation"].isNull())
|
||||
translationListItemObject.translation = dataNodetranslationListtranslationListItem["translation"].asString();
|
||||
auto usageNode = value["usage"];
|
||||
if(!usageNode["inputTokens"].isNull())
|
||||
translationListItemObject.usage.inputTokens = std::stol(usageNode["inputTokens"].asString());
|
||||
if(!usageNode["outputTokens"].isNull())
|
||||
translationListItemObject.usage.outputTokens = std::stol(usageNode["outputTokens"].asString());
|
||||
if(!usageNode["totalTokens"].isNull())
|
||||
translationListItemObject.usage.totalTokens = std::stol(usageNode["totalTokens"].asString());
|
||||
data_.translationList.push_back(translationListItemObject);
|
||||
}
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string BatchTranslateForHtmlResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string BatchTranslateForHtmlResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string BatchTranslateForHtmlResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
BatchTranslateForHtmlResult::Data BatchTranslateForHtmlResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string BatchTranslateForHtmlResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool BatchTranslateForHtmlResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
117
anytrans/src/model/BatchTranslateRequest.cc
Normal file
117
anytrans/src/model/BatchTranslateRequest.cc
Normal file
@@ -0,0 +1,117 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/BatchTranslateRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::BatchTranslateRequest;
|
||||
|
||||
BatchTranslateRequest::BatchTranslateRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/batch"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
BatchTranslateRequest::~BatchTranslateRequest() {}
|
||||
|
||||
BatchTranslateRequest::ext BatchTranslateRequest::getExt() const {
|
||||
return ext_;
|
||||
}
|
||||
|
||||
void BatchTranslateRequest::setExt(const BatchTranslateRequest::ext &ext) {
|
||||
ext_ = ext;
|
||||
for(int dep1 = 0; dep1 != ext.sensitives.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".sensitives." + std::to_string(dep1 + 1), ext.sensitives[dep1]);
|
||||
}
|
||||
for(int dep1 = 0; dep1 != ext.terminologies.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".tgt", ext.terminologies[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".src", ext.terminologies[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toLower", ext.textTransform.toLower ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toUpper", ext.textTransform.toUpper ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toTitle", ext.textTransform.toTitle ? "true" : "false");
|
||||
for(int dep1 = 0; dep1 != ext.examples.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".tgt", ext.examples[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".src", ext.examples[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".config.skipCsiCheck", ext.config.skipCsiCheck ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".domainHint", ext.domainHint);
|
||||
}
|
||||
|
||||
std::string BatchTranslateRequest::getSourceLanguage() const {
|
||||
return sourceLanguage_;
|
||||
}
|
||||
|
||||
void BatchTranslateRequest::setSourceLanguage(const std::string &sourceLanguage) {
|
||||
sourceLanguage_ = sourceLanguage;
|
||||
setBodyParameter(std::string("sourceLanguage"), sourceLanguage);
|
||||
}
|
||||
|
||||
std::string BatchTranslateRequest::getFormat() const {
|
||||
return format_;
|
||||
}
|
||||
|
||||
void BatchTranslateRequest::setFormat(const std::string &format) {
|
||||
format_ = format;
|
||||
setBodyParameter(std::string("format"), format);
|
||||
}
|
||||
|
||||
std::string BatchTranslateRequest::getScene() const {
|
||||
return scene_;
|
||||
}
|
||||
|
||||
void BatchTranslateRequest::setScene(const std::string &scene) {
|
||||
scene_ = scene;
|
||||
setBodyParameter(std::string("scene"), scene);
|
||||
}
|
||||
|
||||
std::string BatchTranslateRequest::getAppName() const {
|
||||
return appName_;
|
||||
}
|
||||
|
||||
void BatchTranslateRequest::setAppName(const std::string &appName) {
|
||||
appName_ = appName;
|
||||
setBodyParameter(std::string("appName"), appName);
|
||||
}
|
||||
|
||||
std::string BatchTranslateRequest::getTargetLanguage() const {
|
||||
return targetLanguage_;
|
||||
}
|
||||
|
||||
void BatchTranslateRequest::setTargetLanguage(const std::string &targetLanguage) {
|
||||
targetLanguage_ = targetLanguage;
|
||||
setBodyParameter(std::string("targetLanguage"), targetLanguage);
|
||||
}
|
||||
|
||||
std::map<std::string, std::string> BatchTranslateRequest::getText() const {
|
||||
return text_;
|
||||
}
|
||||
|
||||
void BatchTranslateRequest::setText(const std::map<std::string, std::string> &text) {
|
||||
text_ = text;
|
||||
for(auto const &iter1 : text) {
|
||||
setBodyParameter(std::string("text") + "." + iter1.first, iter1.second);
|
||||
}
|
||||
}
|
||||
|
||||
std::string BatchTranslateRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void BatchTranslateRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
106
anytrans/src/model/BatchTranslateResult.cc
Normal file
106
anytrans/src/model/BatchTranslateResult.cc
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/BatchTranslateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
BatchTranslateResult::BatchTranslateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
BatchTranslateResult::BatchTranslateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
BatchTranslateResult::~BatchTranslateResult()
|
||||
{}
|
||||
|
||||
void BatchTranslateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
auto alltranslationListNode = dataNode["translationList"]["translationListItem"];
|
||||
for (auto dataNodetranslationListtranslationListItem : alltranslationListNode)
|
||||
{
|
||||
Data::TranslationListItem translationListItemObject;
|
||||
if(!dataNodetranslationListtranslationListItem["code"].isNull())
|
||||
translationListItemObject.code = std::stol(dataNodetranslationListtranslationListItem["code"].asString());
|
||||
if(!dataNodetranslationListtranslationListItem["message"].isNull())
|
||||
translationListItemObject.message = dataNodetranslationListtranslationListItem["message"].asString();
|
||||
if(!dataNodetranslationListtranslationListItem["index"].isNull())
|
||||
translationListItemObject.index = dataNodetranslationListtranslationListItem["index"].asString();
|
||||
if(!dataNodetranslationListtranslationListItem["translation"].isNull())
|
||||
translationListItemObject.translation = dataNodetranslationListtranslationListItem["translation"].asString();
|
||||
auto usageNode = value["usage"];
|
||||
if(!usageNode["inputTokens"].isNull())
|
||||
translationListItemObject.usage.inputTokens = std::stol(usageNode["inputTokens"].asString());
|
||||
if(!usageNode["outputTokens"].isNull())
|
||||
translationListItemObject.usage.outputTokens = std::stol(usageNode["outputTokens"].asString());
|
||||
if(!usageNode["totalTokens"].isNull())
|
||||
translationListItemObject.usage.totalTokens = std::stol(usageNode["totalTokens"].asString());
|
||||
data_.translationList.push_back(translationListItemObject);
|
||||
}
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string BatchTranslateResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string BatchTranslateResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string BatchTranslateResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
BatchTranslateResult::Data BatchTranslateResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string BatchTranslateResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool BatchTranslateResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
46
anytrans/src/model/GetDocTranslateTaskRequest.cc
Normal file
46
anytrans/src/model/GetDocTranslateTaskRequest.cc
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/GetDocTranslateTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::GetDocTranslateTaskRequest;
|
||||
|
||||
GetDocTranslateTaskRequest::GetDocTranslateTaskRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/doc/get"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetDocTranslateTaskRequest::~GetDocTranslateTaskRequest() {}
|
||||
|
||||
std::string GetDocTranslateTaskRequest::getTaskId() const {
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
void GetDocTranslateTaskRequest::setTaskId(const std::string &taskId) {
|
||||
taskId_ = taskId;
|
||||
setBodyParameter(std::string("taskId"), taskId);
|
||||
}
|
||||
|
||||
std::string GetDocTranslateTaskRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void GetDocTranslateTaskRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
95
anytrans/src/model/GetDocTranslateTaskResult.cc
Normal file
95
anytrans/src/model/GetDocTranslateTaskResult.cc
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/GetDocTranslateTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
GetDocTranslateTaskResult::GetDocTranslateTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetDocTranslateTaskResult::GetDocTranslateTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetDocTranslateTaskResult::~GetDocTranslateTaskResult()
|
||||
{}
|
||||
|
||||
void GetDocTranslateTaskResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
if(!dataNode["taskId"].isNull())
|
||||
data_.taskId = dataNode["taskId"].asString();
|
||||
if(!dataNode["status"].isNull())
|
||||
data_.status = dataNode["status"].asString();
|
||||
if(!dataNode["charactersCount"].isNull())
|
||||
data_.charactersCount = std::stoi(dataNode["charactersCount"].asString());
|
||||
if(!dataNode["pageCount"].isNull())
|
||||
data_.pageCount = std::stoi(dataNode["pageCount"].asString());
|
||||
if(!dataNode["translateFileUrl"].isNull())
|
||||
data_.translateFileUrl = dataNode["translateFileUrl"].asString();
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetDocTranslateTaskResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string GetDocTranslateTaskResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string GetDocTranslateTaskResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
GetDocTranslateTaskResult::Data GetDocTranslateTaskResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string GetDocTranslateTaskResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool GetDocTranslateTaskResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
46
anytrans/src/model/GetHtmlTranslateTaskRequest.cc
Normal file
46
anytrans/src/model/GetHtmlTranslateTaskRequest.cc
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/GetHtmlTranslateTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::GetHtmlTranslateTaskRequest;
|
||||
|
||||
GetHtmlTranslateTaskRequest::GetHtmlTranslateTaskRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/html/get"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetHtmlTranslateTaskRequest::~GetHtmlTranslateTaskRequest() {}
|
||||
|
||||
std::string GetHtmlTranslateTaskRequest::getTaskId() const {
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
void GetHtmlTranslateTaskRequest::setTaskId(const std::string &taskId) {
|
||||
taskId_ = taskId;
|
||||
setBodyParameter(std::string("taskId"), taskId);
|
||||
}
|
||||
|
||||
std::string GetHtmlTranslateTaskRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void GetHtmlTranslateTaskRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
94
anytrans/src/model/GetHtmlTranslateTaskResult.cc
Normal file
94
anytrans/src/model/GetHtmlTranslateTaskResult.cc
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/GetHtmlTranslateTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
GetHtmlTranslateTaskResult::GetHtmlTranslateTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetHtmlTranslateTaskResult::GetHtmlTranslateTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetHtmlTranslateTaskResult::~GetHtmlTranslateTaskResult()
|
||||
{}
|
||||
|
||||
void GetHtmlTranslateTaskResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
if(!dataNode["translation"].isNull())
|
||||
data_.translation = dataNode["translation"].asString();
|
||||
auto usageNode = dataNode["usage"];
|
||||
if(!usageNode["inputTokens"].isNull())
|
||||
data_.usage.inputTokens = std::stol(usageNode["inputTokens"].asString());
|
||||
if(!usageNode["outputTokens"].isNull())
|
||||
data_.usage.outputTokens = std::stol(usageNode["outputTokens"].asString());
|
||||
if(!usageNode["totalTokens"].isNull())
|
||||
data_.usage.totalTokens = std::stol(usageNode["totalTokens"].asString());
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetHtmlTranslateTaskResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string GetHtmlTranslateTaskResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string GetHtmlTranslateTaskResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
GetHtmlTranslateTaskResult::Data GetHtmlTranslateTaskResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string GetHtmlTranslateTaskResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool GetHtmlTranslateTaskResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
46
anytrans/src/model/GetImageTranslateTaskRequest.cc
Normal file
46
anytrans/src/model/GetImageTranslateTaskRequest.cc
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/GetImageTranslateTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::GetImageTranslateTaskRequest;
|
||||
|
||||
GetImageTranslateTaskRequest::GetImageTranslateTaskRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/image/get"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetImageTranslateTaskRequest::~GetImageTranslateTaskRequest() {}
|
||||
|
||||
std::string GetImageTranslateTaskRequest::getTaskId() const {
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
void GetImageTranslateTaskRequest::setTaskId(const std::string &taskId) {
|
||||
taskId_ = taskId;
|
||||
setBodyParameter(std::string("taskId"), taskId);
|
||||
}
|
||||
|
||||
std::string GetImageTranslateTaskRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void GetImageTranslateTaskRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
185
anytrans/src/model/GetImageTranslateTaskResult.cc
Normal file
185
anytrans/src/model/GetImageTranslateTaskResult.cc
Normal file
@@ -0,0 +1,185 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/GetImageTranslateTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
GetImageTranslateTaskResult::GetImageTranslateTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetImageTranslateTaskResult::GetImageTranslateTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetImageTranslateTaskResult::~GetImageTranslateTaskResult()
|
||||
{}
|
||||
|
||||
void GetImageTranslateTaskResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
if(!dataNode["traceId"].isNull())
|
||||
data_.traceId = dataNode["traceId"].asString();
|
||||
auto translationNode = dataNode["translation"];
|
||||
if(!translationNode["angle"].isNull())
|
||||
data_.translation.angle = std::stol(translationNode["angle"].asString());
|
||||
if(!translationNode["width"].isNull())
|
||||
data_.translation.width = std::stol(translationNode["width"].asString());
|
||||
if(!translationNode["height"].isNull())
|
||||
data_.translation.height = std::stol(translationNode["height"].asString());
|
||||
if(!translationNode["orgWidth"].isNull())
|
||||
data_.translation.orgWidth = std::stol(translationNode["orgWidth"].asString());
|
||||
if(!translationNode["orgHeight"].isNull())
|
||||
data_.translation.orgHeight = std::stol(translationNode["orgHeight"].asString());
|
||||
if(!translationNode["boxesCount"].isNull())
|
||||
data_.translation.boxesCount = std::stol(translationNode["boxesCount"].asString());
|
||||
auto allboundingBoxesNode = translationNode["boundingBoxes"]["boundingBoxesItem"];
|
||||
for (auto translationNodeboundingBoxesboundingBoxesItem : allboundingBoxesNode)
|
||||
{
|
||||
Data::Translation::BoundingBoxesItem boundingBoxesItemObject;
|
||||
if(!translationNodeboundingBoxesboundingBoxesItem["confidence"].isNull())
|
||||
boundingBoxesItemObject.confidence = std::stof(translationNodeboundingBoxesboundingBoxesItem["confidence"].asString());
|
||||
if(!translationNodeboundingBoxesboundingBoxesItem["text"].isNull())
|
||||
boundingBoxesItemObject.text = translationNodeboundingBoxesboundingBoxesItem["text"].asString();
|
||||
if(!translationNodeboundingBoxesboundingBoxesItem["direction"].isNull())
|
||||
boundingBoxesItemObject.direction = std::stol(translationNodeboundingBoxesboundingBoxesItem["direction"].asString());
|
||||
if(!translationNodeboundingBoxesboundingBoxesItem["tableId"].isNull())
|
||||
boundingBoxesItemObject.tableId = std::stol(translationNodeboundingBoxesboundingBoxesItem["tableId"].asString());
|
||||
if(!translationNodeboundingBoxesboundingBoxesItem["tableCellId"].isNull())
|
||||
boundingBoxesItemObject.tableCellId = std::stol(translationNodeboundingBoxesboundingBoxesItem["tableCellId"].asString());
|
||||
if(!translationNodeboundingBoxesboundingBoxesItem["translation"].isNull())
|
||||
boundingBoxesItemObject.translation = translationNodeboundingBoxesboundingBoxesItem["translation"].asString();
|
||||
auto upLeftNode = value["upLeft"];
|
||||
if(!upLeftNode["x"].isNull())
|
||||
boundingBoxesItemObject.upLeft.x = std::stol(upLeftNode["x"].asString());
|
||||
if(!upLeftNode["y"].isNull())
|
||||
boundingBoxesItemObject.upLeft.y = std::stol(upLeftNode["y"].asString());
|
||||
auto upRightNode = value["upRight"];
|
||||
if(!upRightNode["x"].isNull())
|
||||
boundingBoxesItemObject.upRight.x = std::stol(upRightNode["x"].asString());
|
||||
if(!upRightNode["y"].isNull())
|
||||
boundingBoxesItemObject.upRight.y = std::stol(upRightNode["y"].asString());
|
||||
auto downLeftNode = value["downLeft"];
|
||||
if(!downLeftNode["x"].isNull())
|
||||
boundingBoxesItemObject.downLeft.x = std::stol(downLeftNode["x"].asString());
|
||||
if(!downLeftNode["y"].isNull())
|
||||
boundingBoxesItemObject.downLeft.y = std::stol(downLeftNode["y"].asString());
|
||||
auto downRightNode = value["downRight"];
|
||||
if(!downRightNode["x"].isNull())
|
||||
boundingBoxesItemObject.downRight.x = std::stol(downRightNode["x"].asString());
|
||||
if(!downRightNode["y"].isNull())
|
||||
boundingBoxesItemObject.downRight.y = std::stol(downRightNode["y"].asString());
|
||||
data_.translation.boundingBoxes.push_back(boundingBoxesItemObject);
|
||||
}
|
||||
auto alltableInfosNode = translationNode["tableInfos"]["tableInfosItem"];
|
||||
for (auto translationNodetableInfostableInfosItem : alltableInfosNode)
|
||||
{
|
||||
Data::Translation::TableInfosItem tableInfosItemObject;
|
||||
if(!translationNodetableInfostableInfosItem["tableId"].isNull())
|
||||
tableInfosItemObject.tableId = std::stol(translationNodetableInfostableInfosItem["tableId"].asString());
|
||||
if(!translationNodetableInfostableInfosItem["xCellSize"].isNull())
|
||||
tableInfosItemObject.xCellSize = std::stol(translationNodetableInfostableInfosItem["xCellSize"].asString());
|
||||
if(!translationNodetableInfostableInfosItem["yCellSize"].isNull())
|
||||
tableInfosItemObject.yCellSize = std::stol(translationNodetableInfostableInfosItem["yCellSize"].asString());
|
||||
auto allcellInfosNode = translationNodetableInfostableInfosItem["cellInfos"]["cellInfosItem"];
|
||||
for (auto translationNodetableInfostableInfosItemcellInfoscellInfosItem : allcellInfosNode)
|
||||
{
|
||||
Data::Translation::TableInfosItem::CellInfosItem cellInfosObject;
|
||||
if(!translationNodetableInfostableInfosItemcellInfoscellInfosItem["tableCellId"].isNull())
|
||||
cellInfosObject.tableCellId = std::stol(translationNodetableInfostableInfosItemcellInfoscellInfosItem["tableCellId"].asString());
|
||||
if(!translationNodetableInfostableInfosItemcellInfoscellInfosItem["text"].isNull())
|
||||
cellInfosObject.text = translationNodetableInfostableInfosItemcellInfoscellInfosItem["text"].asString();
|
||||
if(!translationNodetableInfostableInfosItemcellInfoscellInfosItem["xsc"].isNull())
|
||||
cellInfosObject.xsc = std::stol(translationNodetableInfostableInfosItemcellInfoscellInfosItem["xsc"].asString());
|
||||
if(!translationNodetableInfostableInfosItemcellInfoscellInfosItem["xec"].isNull())
|
||||
cellInfosObject.xec = std::stol(translationNodetableInfostableInfosItemcellInfoscellInfosItem["xec"].asString());
|
||||
if(!translationNodetableInfostableInfosItemcellInfoscellInfosItem["ysc"].isNull())
|
||||
cellInfosObject.ysc = std::stol(translationNodetableInfostableInfosItemcellInfoscellInfosItem["ysc"].asString());
|
||||
if(!translationNodetableInfostableInfosItemcellInfoscellInfosItem["yec"].isNull())
|
||||
cellInfosObject.yec = std::stol(translationNodetableInfostableInfosItemcellInfoscellInfosItem["yec"].asString());
|
||||
auto allposNode = translationNodetableInfostableInfosItemcellInfoscellInfosItem["pos"]["posItem"];
|
||||
for (auto translationNodetableInfostableInfosItemcellInfoscellInfosItemposposItem : allposNode)
|
||||
{
|
||||
Data::Translation::TableInfosItem::CellInfosItem::PosItem posObject;
|
||||
if(!translationNodetableInfostableInfosItemcellInfoscellInfosItemposposItem["x"].isNull())
|
||||
posObject.x = std::stol(translationNodetableInfostableInfosItemcellInfoscellInfosItemposposItem["x"].asString());
|
||||
if(!translationNodetableInfostableInfosItemcellInfoscellInfosItemposposItem["y"].isNull())
|
||||
posObject.y = std::stol(translationNodetableInfostableInfosItemcellInfoscellInfosItemposposItem["y"].asString());
|
||||
cellInfosObject.pos.push_back(posObject);
|
||||
}
|
||||
tableInfosItemObject.cellInfos.push_back(cellInfosObject);
|
||||
}
|
||||
data_.translation.tableInfos.push_back(tableInfosItemObject);
|
||||
}
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
if(!value["synchro"].isNull())
|
||||
synchro_ = value["synchro"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::string GetImageTranslateTaskResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string GetImageTranslateTaskResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
bool GetImageTranslateTaskResult::getSynchro()const
|
||||
{
|
||||
return synchro_;
|
||||
}
|
||||
|
||||
std::string GetImageTranslateTaskResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
GetImageTranslateTaskResult::Data GetImageTranslateTaskResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string GetImageTranslateTaskResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool GetImageTranslateTaskResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
46
anytrans/src/model/GetLongTextTranslateTaskRequest.cc
Normal file
46
anytrans/src/model/GetLongTextTranslateTaskRequest.cc
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/GetLongTextTranslateTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::GetLongTextTranslateTaskRequest;
|
||||
|
||||
GetLongTextTranslateTaskRequest::GetLongTextTranslateTaskRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/longText/get"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetLongTextTranslateTaskRequest::~GetLongTextTranslateTaskRequest() {}
|
||||
|
||||
std::string GetLongTextTranslateTaskRequest::getTaskId() const {
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
void GetLongTextTranslateTaskRequest::setTaskId(const std::string &taskId) {
|
||||
taskId_ = taskId;
|
||||
setBodyParameter(std::string("taskId"), taskId);
|
||||
}
|
||||
|
||||
std::string GetLongTextTranslateTaskRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void GetLongTextTranslateTaskRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
94
anytrans/src/model/GetLongTextTranslateTaskResult.cc
Normal file
94
anytrans/src/model/GetLongTextTranslateTaskResult.cc
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/GetLongTextTranslateTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
GetLongTextTranslateTaskResult::GetLongTextTranslateTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetLongTextTranslateTaskResult::GetLongTextTranslateTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetLongTextTranslateTaskResult::~GetLongTextTranslateTaskResult()
|
||||
{}
|
||||
|
||||
void GetLongTextTranslateTaskResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
if(!dataNode["translation"].isNull())
|
||||
data_.translation = dataNode["translation"].asString();
|
||||
auto usageNode = dataNode["usage"];
|
||||
if(!usageNode["inputTokens"].isNull())
|
||||
data_.usage.inputTokens = std::stol(usageNode["inputTokens"].asString());
|
||||
if(!usageNode["outputTokens"].isNull())
|
||||
data_.usage.outputTokens = std::stol(usageNode["outputTokens"].asString());
|
||||
if(!usageNode["totalTokens"].isNull())
|
||||
data_.usage.totalTokens = std::stol(usageNode["totalTokens"].asString());
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetLongTextTranslateTaskResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string GetLongTextTranslateTaskResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string GetLongTextTranslateTaskResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
GetLongTextTranslateTaskResult::Data GetLongTextTranslateTaskResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string GetLongTextTranslateTaskResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool GetLongTextTranslateTaskResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
96
anytrans/src/model/SubmitDocTranslateTaskRequest.cc
Normal file
96
anytrans/src/model/SubmitDocTranslateTaskRequest.cc
Normal file
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/SubmitDocTranslateTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::SubmitDocTranslateTaskRequest;
|
||||
|
||||
SubmitDocTranslateTaskRequest::SubmitDocTranslateTaskRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/doc/submit"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
SubmitDocTranslateTaskRequest::~SubmitDocTranslateTaskRequest() {}
|
||||
|
||||
SubmitDocTranslateTaskRequest::ext SubmitDocTranslateTaskRequest::getExt() const {
|
||||
return ext_;
|
||||
}
|
||||
|
||||
void SubmitDocTranslateTaskRequest::setExt(const SubmitDocTranslateTaskRequest::ext &ext) {
|
||||
ext_ = ext;
|
||||
for(int dep1 = 0; dep1 != ext.terminologies.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".tgt", ext.terminologies[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".src", ext.terminologies[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".config.skipImgTrans", ext.config.skipImgTrans ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".domainHint", ext.domainHint);
|
||||
}
|
||||
|
||||
std::string SubmitDocTranslateTaskRequest::getSourceLanguage() const {
|
||||
return sourceLanguage_;
|
||||
}
|
||||
|
||||
void SubmitDocTranslateTaskRequest::setSourceLanguage(const std::string &sourceLanguage) {
|
||||
sourceLanguage_ = sourceLanguage;
|
||||
setBodyParameter(std::string("sourceLanguage"), sourceLanguage);
|
||||
}
|
||||
|
||||
std::string SubmitDocTranslateTaskRequest::getFormat() const {
|
||||
return format_;
|
||||
}
|
||||
|
||||
void SubmitDocTranslateTaskRequest::setFormat(const std::string &format) {
|
||||
format_ = format;
|
||||
setBodyParameter(std::string("format"), format);
|
||||
}
|
||||
|
||||
std::string SubmitDocTranslateTaskRequest::getScene() const {
|
||||
return scene_;
|
||||
}
|
||||
|
||||
void SubmitDocTranslateTaskRequest::setScene(const std::string &scene) {
|
||||
scene_ = scene;
|
||||
setBodyParameter(std::string("scene"), scene);
|
||||
}
|
||||
|
||||
std::string SubmitDocTranslateTaskRequest::getTargetLanguage() const {
|
||||
return targetLanguage_;
|
||||
}
|
||||
|
||||
void SubmitDocTranslateTaskRequest::setTargetLanguage(const std::string &targetLanguage) {
|
||||
targetLanguage_ = targetLanguage;
|
||||
setBodyParameter(std::string("targetLanguage"), targetLanguage);
|
||||
}
|
||||
|
||||
std::string SubmitDocTranslateTaskRequest::getText() const {
|
||||
return text_;
|
||||
}
|
||||
|
||||
void SubmitDocTranslateTaskRequest::setText(const std::string &text) {
|
||||
text_ = text;
|
||||
setBodyParameter(std::string("text"), text);
|
||||
}
|
||||
|
||||
std::string SubmitDocTranslateTaskRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void SubmitDocTranslateTaskRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
89
anytrans/src/model/SubmitDocTranslateTaskResult.cc
Normal file
89
anytrans/src/model/SubmitDocTranslateTaskResult.cc
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/SubmitDocTranslateTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
SubmitDocTranslateTaskResult::SubmitDocTranslateTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
SubmitDocTranslateTaskResult::SubmitDocTranslateTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
SubmitDocTranslateTaskResult::~SubmitDocTranslateTaskResult()
|
||||
{}
|
||||
|
||||
void SubmitDocTranslateTaskResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
if(!dataNode["taskId"].isNull())
|
||||
data_.taskId = dataNode["taskId"].asString();
|
||||
if(!dataNode["status"].isNull())
|
||||
data_.status = dataNode["status"].asString();
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string SubmitDocTranslateTaskResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string SubmitDocTranslateTaskResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string SubmitDocTranslateTaskResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
SubmitDocTranslateTaskResult::Data SubmitDocTranslateTaskResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string SubmitDocTranslateTaskResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool SubmitDocTranslateTaskResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
107
anytrans/src/model/SubmitHtmlTranslateTaskRequest.cc
Normal file
107
anytrans/src/model/SubmitHtmlTranslateTaskRequest.cc
Normal file
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/SubmitHtmlTranslateTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::SubmitHtmlTranslateTaskRequest;
|
||||
|
||||
SubmitHtmlTranslateTaskRequest::SubmitHtmlTranslateTaskRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/html/submit"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
SubmitHtmlTranslateTaskRequest::~SubmitHtmlTranslateTaskRequest() {}
|
||||
|
||||
SubmitHtmlTranslateTaskRequest::ext SubmitHtmlTranslateTaskRequest::getExt() const {
|
||||
return ext_;
|
||||
}
|
||||
|
||||
void SubmitHtmlTranslateTaskRequest::setExt(const SubmitHtmlTranslateTaskRequest::ext &ext) {
|
||||
ext_ = ext;
|
||||
for(int dep1 = 0; dep1 != ext.sensitives.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".sensitives." + std::to_string(dep1 + 1), ext.sensitives[dep1]);
|
||||
}
|
||||
for(int dep1 = 0; dep1 != ext.terminologies.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".tgt", ext.terminologies[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".src", ext.terminologies[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toLower", ext.textTransform.toLower ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toUpper", ext.textTransform.toUpper ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toTitle", ext.textTransform.toTitle ? "true" : "false");
|
||||
for(int dep1 = 0; dep1 != ext.examples.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".tgt", ext.examples[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".src", ext.examples[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".config.skipCsiCheck", ext.config.skipCsiCheck ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".config.callbackUrl", ext.config.callbackUrl);
|
||||
setBodyParameter(std::string("ext") + ".domainHint", ext.domainHint);
|
||||
}
|
||||
|
||||
std::string SubmitHtmlTranslateTaskRequest::getSourceLanguage() const {
|
||||
return sourceLanguage_;
|
||||
}
|
||||
|
||||
void SubmitHtmlTranslateTaskRequest::setSourceLanguage(const std::string &sourceLanguage) {
|
||||
sourceLanguage_ = sourceLanguage;
|
||||
setBodyParameter(std::string("sourceLanguage"), sourceLanguage);
|
||||
}
|
||||
|
||||
std::string SubmitHtmlTranslateTaskRequest::getFormat() const {
|
||||
return format_;
|
||||
}
|
||||
|
||||
void SubmitHtmlTranslateTaskRequest::setFormat(const std::string &format) {
|
||||
format_ = format;
|
||||
setBodyParameter(std::string("format"), format);
|
||||
}
|
||||
|
||||
std::string SubmitHtmlTranslateTaskRequest::getScene() const {
|
||||
return scene_;
|
||||
}
|
||||
|
||||
void SubmitHtmlTranslateTaskRequest::setScene(const std::string &scene) {
|
||||
scene_ = scene;
|
||||
setBodyParameter(std::string("scene"), scene);
|
||||
}
|
||||
|
||||
std::string SubmitHtmlTranslateTaskRequest::getTargetLanguage() const {
|
||||
return targetLanguage_;
|
||||
}
|
||||
|
||||
void SubmitHtmlTranslateTaskRequest::setTargetLanguage(const std::string &targetLanguage) {
|
||||
targetLanguage_ = targetLanguage;
|
||||
setBodyParameter(std::string("targetLanguage"), targetLanguage);
|
||||
}
|
||||
|
||||
std::string SubmitHtmlTranslateTaskRequest::getText() const {
|
||||
return text_;
|
||||
}
|
||||
|
||||
void SubmitHtmlTranslateTaskRequest::setText(const std::string &text) {
|
||||
text_ = text;
|
||||
setBodyParameter(std::string("text"), text);
|
||||
}
|
||||
|
||||
std::string SubmitHtmlTranslateTaskRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void SubmitHtmlTranslateTaskRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
89
anytrans/src/model/SubmitHtmlTranslateTaskResult.cc
Normal file
89
anytrans/src/model/SubmitHtmlTranslateTaskResult.cc
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/SubmitHtmlTranslateTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
SubmitHtmlTranslateTaskResult::SubmitHtmlTranslateTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
SubmitHtmlTranslateTaskResult::SubmitHtmlTranslateTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
SubmitHtmlTranslateTaskResult::~SubmitHtmlTranslateTaskResult()
|
||||
{}
|
||||
|
||||
void SubmitHtmlTranslateTaskResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
if(!dataNode["taskId"].isNull())
|
||||
data_.taskId = dataNode["taskId"].asString();
|
||||
if(!dataNode["status"].isNull())
|
||||
data_.status = dataNode["status"].asString();
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string SubmitHtmlTranslateTaskResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string SubmitHtmlTranslateTaskResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string SubmitHtmlTranslateTaskResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
SubmitHtmlTranslateTaskResult::Data SubmitHtmlTranslateTaskResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string SubmitHtmlTranslateTaskResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool SubmitHtmlTranslateTaskResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
107
anytrans/src/model/SubmitImageTranslateTaskRequest.cc
Normal file
107
anytrans/src/model/SubmitImageTranslateTaskRequest.cc
Normal file
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/SubmitImageTranslateTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::SubmitImageTranslateTaskRequest;
|
||||
|
||||
SubmitImageTranslateTaskRequest::SubmitImageTranslateTaskRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/image/submit"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
SubmitImageTranslateTaskRequest::~SubmitImageTranslateTaskRequest() {}
|
||||
|
||||
SubmitImageTranslateTaskRequest::ext SubmitImageTranslateTaskRequest::getExt() const {
|
||||
return ext_;
|
||||
}
|
||||
|
||||
void SubmitImageTranslateTaskRequest::setExt(const SubmitImageTranslateTaskRequest::ext &ext) {
|
||||
ext_ = ext;
|
||||
for(int dep1 = 0; dep1 != ext.sensitives.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".sensitives." + std::to_string(dep1 + 1), ext.sensitives[dep1]);
|
||||
}
|
||||
for(int dep1 = 0; dep1 != ext.terminologies.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".tgt", ext.terminologies[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".src", ext.terminologies[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toLower", ext.textTransform.toLower ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toUpper", ext.textTransform.toUpper ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toTitle", ext.textTransform.toTitle ? "true" : "false");
|
||||
for(int dep1 = 0; dep1 != ext.examples.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".tgt", ext.examples[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".src", ext.examples[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".domainHint", ext.domainHint);
|
||||
}
|
||||
|
||||
std::string SubmitImageTranslateTaskRequest::getSourceLanguage() const {
|
||||
return sourceLanguage_;
|
||||
}
|
||||
|
||||
void SubmitImageTranslateTaskRequest::setSourceLanguage(const std::string &sourceLanguage) {
|
||||
sourceLanguage_ = sourceLanguage;
|
||||
setBodyParameter(std::string("sourceLanguage"), sourceLanguage);
|
||||
}
|
||||
|
||||
std::string SubmitImageTranslateTaskRequest::getFormat() const {
|
||||
return format_;
|
||||
}
|
||||
|
||||
void SubmitImageTranslateTaskRequest::setFormat(const std::string &format) {
|
||||
format_ = format;
|
||||
setBodyParameter(std::string("format"), format);
|
||||
}
|
||||
|
||||
std::string SubmitImageTranslateTaskRequest::getScene() const {
|
||||
return scene_;
|
||||
}
|
||||
|
||||
void SubmitImageTranslateTaskRequest::setScene(const std::string &scene) {
|
||||
scene_ = scene;
|
||||
setBodyParameter(std::string("scene"), scene);
|
||||
}
|
||||
|
||||
std::string SubmitImageTranslateTaskRequest::getText() const {
|
||||
return text_;
|
||||
}
|
||||
|
||||
void SubmitImageTranslateTaskRequest::setText(const std::string &text) {
|
||||
text_ = text;
|
||||
setBodyParameter(std::string("text"), text);
|
||||
}
|
||||
|
||||
std::vector<SubmitImageTranslateTaskRequest::std::string> SubmitImageTranslateTaskRequest::getTargetLanguage() const {
|
||||
return targetLanguage_;
|
||||
}
|
||||
|
||||
void SubmitImageTranslateTaskRequest::setTargetLanguage(const std::vector<SubmitImageTranslateTaskRequest::std::string> &targetLanguage) {
|
||||
targetLanguage_ = targetLanguage;
|
||||
for(int dep1 = 0; dep1 != targetLanguage.size(); dep1++) {
|
||||
setBodyParameter(std::string("targetLanguage") + "." + std::to_string(dep1 + 1), targetLanguage[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
std::string SubmitImageTranslateTaskRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void SubmitImageTranslateTaskRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
89
anytrans/src/model/SubmitImageTranslateTaskResult.cc
Normal file
89
anytrans/src/model/SubmitImageTranslateTaskResult.cc
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/SubmitImageTranslateTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
SubmitImageTranslateTaskResult::SubmitImageTranslateTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
SubmitImageTranslateTaskResult::SubmitImageTranslateTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
SubmitImageTranslateTaskResult::~SubmitImageTranslateTaskResult()
|
||||
{}
|
||||
|
||||
void SubmitImageTranslateTaskResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
if(!dataNode["taskId"].isNull())
|
||||
data_.taskId = dataNode["taskId"].asString();
|
||||
if(!dataNode["status"].isNull())
|
||||
data_.status = dataNode["status"].asString();
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string SubmitImageTranslateTaskResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string SubmitImageTranslateTaskResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string SubmitImageTranslateTaskResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
SubmitImageTranslateTaskResult::Data SubmitImageTranslateTaskResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string SubmitImageTranslateTaskResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool SubmitImageTranslateTaskResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
106
anytrans/src/model/SubmitLongTextTranslateTaskRequest.cc
Normal file
106
anytrans/src/model/SubmitLongTextTranslateTaskRequest.cc
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/SubmitLongTextTranslateTaskRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::SubmitLongTextTranslateTaskRequest;
|
||||
|
||||
SubmitLongTextTranslateTaskRequest::SubmitLongTextTranslateTaskRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/longText/submit"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
SubmitLongTextTranslateTaskRequest::~SubmitLongTextTranslateTaskRequest() {}
|
||||
|
||||
SubmitLongTextTranslateTaskRequest::ext SubmitLongTextTranslateTaskRequest::getExt() const {
|
||||
return ext_;
|
||||
}
|
||||
|
||||
void SubmitLongTextTranslateTaskRequest::setExt(const SubmitLongTextTranslateTaskRequest::ext &ext) {
|
||||
ext_ = ext;
|
||||
for(int dep1 = 0; dep1 != ext.sensitives.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".sensitives." + std::to_string(dep1 + 1), ext.sensitives[dep1]);
|
||||
}
|
||||
for(int dep1 = 0; dep1 != ext.terminologies.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".tgt", ext.terminologies[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".src", ext.terminologies[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toLower", ext.textTransform.toLower ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toUpper", ext.textTransform.toUpper ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toTitle", ext.textTransform.toTitle ? "true" : "false");
|
||||
for(int dep1 = 0; dep1 != ext.examples.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".tgt", ext.examples[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".src", ext.examples[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".config.skipCsiCheck", ext.config.skipCsiCheck ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".domainHint", ext.domainHint);
|
||||
}
|
||||
|
||||
std::string SubmitLongTextTranslateTaskRequest::getSourceLanguage() const {
|
||||
return sourceLanguage_;
|
||||
}
|
||||
|
||||
void SubmitLongTextTranslateTaskRequest::setSourceLanguage(const std::string &sourceLanguage) {
|
||||
sourceLanguage_ = sourceLanguage;
|
||||
setBodyParameter(std::string("sourceLanguage"), sourceLanguage);
|
||||
}
|
||||
|
||||
std::string SubmitLongTextTranslateTaskRequest::getFormat() const {
|
||||
return format_;
|
||||
}
|
||||
|
||||
void SubmitLongTextTranslateTaskRequest::setFormat(const std::string &format) {
|
||||
format_ = format;
|
||||
setBodyParameter(std::string("format"), format);
|
||||
}
|
||||
|
||||
std::string SubmitLongTextTranslateTaskRequest::getScene() const {
|
||||
return scene_;
|
||||
}
|
||||
|
||||
void SubmitLongTextTranslateTaskRequest::setScene(const std::string &scene) {
|
||||
scene_ = scene;
|
||||
setBodyParameter(std::string("scene"), scene);
|
||||
}
|
||||
|
||||
std::string SubmitLongTextTranslateTaskRequest::getTargetLanguage() const {
|
||||
return targetLanguage_;
|
||||
}
|
||||
|
||||
void SubmitLongTextTranslateTaskRequest::setTargetLanguage(const std::string &targetLanguage) {
|
||||
targetLanguage_ = targetLanguage;
|
||||
setBodyParameter(std::string("targetLanguage"), targetLanguage);
|
||||
}
|
||||
|
||||
std::string SubmitLongTextTranslateTaskRequest::getText() const {
|
||||
return text_;
|
||||
}
|
||||
|
||||
void SubmitLongTextTranslateTaskRequest::setText(const std::string &text) {
|
||||
text_ = text;
|
||||
setBodyParameter(std::string("text"), text);
|
||||
}
|
||||
|
||||
std::string SubmitLongTextTranslateTaskRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void SubmitLongTextTranslateTaskRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
89
anytrans/src/model/SubmitLongTextTranslateTaskResult.cc
Normal file
89
anytrans/src/model/SubmitLongTextTranslateTaskResult.cc
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/SubmitLongTextTranslateTaskResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
SubmitLongTextTranslateTaskResult::SubmitLongTextTranslateTaskResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
SubmitLongTextTranslateTaskResult::SubmitLongTextTranslateTaskResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
SubmitLongTextTranslateTaskResult::~SubmitLongTextTranslateTaskResult()
|
||||
{}
|
||||
|
||||
void SubmitLongTextTranslateTaskResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
if(!dataNode["taskId"].isNull())
|
||||
data_.taskId = dataNode["taskId"].asString();
|
||||
if(!dataNode["status"].isNull())
|
||||
data_.status = dataNode["status"].asString();
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string SubmitLongTextTranslateTaskResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string SubmitLongTextTranslateTaskResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string SubmitLongTextTranslateTaskResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
SubmitLongTextTranslateTaskResult::Data SubmitLongTextTranslateTaskResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string SubmitLongTextTranslateTaskResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool SubmitLongTextTranslateTaskResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
86
anytrans/src/model/TermEditRequest.cc
Normal file
86
anytrans/src/model/TermEditRequest.cc
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/TermEditRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::TermEditRequest;
|
||||
|
||||
TermEditRequest::TermEditRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/intervene/edit"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
TermEditRequest::~TermEditRequest() {}
|
||||
|
||||
TermEditRequest::ext TermEditRequest::getExt() const {
|
||||
return ext_;
|
||||
}
|
||||
|
||||
void TermEditRequest::setExt(const TermEditRequest::ext &ext) {
|
||||
ext_ = ext;
|
||||
for(int dep1 = 0; dep1 != ext.terms.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".terms." + std::to_string(dep1 + 1) + ".tgt", ext.terms[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".terms." + std::to_string(dep1 + 1) + ".termId", ext.terms[dep1].termId);
|
||||
setBodyParameter(std::string("ext") + ".terms." + std::to_string(dep1 + 1) + ".src", ext.terms[dep1].src);
|
||||
}
|
||||
}
|
||||
|
||||
std::string TermEditRequest::getSourceLanguage() const {
|
||||
return sourceLanguage_;
|
||||
}
|
||||
|
||||
void TermEditRequest::setSourceLanguage(const std::string &sourceLanguage) {
|
||||
sourceLanguage_ = sourceLanguage;
|
||||
setBodyParameter(std::string("sourceLanguage"), sourceLanguage);
|
||||
}
|
||||
|
||||
std::string TermEditRequest::getScene() const {
|
||||
return scene_;
|
||||
}
|
||||
|
||||
void TermEditRequest::setScene(const std::string &scene) {
|
||||
scene_ = scene;
|
||||
setBodyParameter(std::string("scene"), scene);
|
||||
}
|
||||
|
||||
std::string TermEditRequest::getAction() const {
|
||||
return action_;
|
||||
}
|
||||
|
||||
void TermEditRequest::setAction(const std::string &action) {
|
||||
action_ = action;
|
||||
setBodyParameter(std::string("action"), action);
|
||||
}
|
||||
|
||||
std::string TermEditRequest::getTargetLanguage() const {
|
||||
return targetLanguage_;
|
||||
}
|
||||
|
||||
void TermEditRequest::setTargetLanguage(const std::string &targetLanguage) {
|
||||
targetLanguage_ = targetLanguage;
|
||||
setBodyParameter(std::string("targetLanguage"), targetLanguage);
|
||||
}
|
||||
|
||||
std::string TermEditRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void TermEditRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
99
anytrans/src/model/TermEditResult.cc
Normal file
99
anytrans/src/model/TermEditResult.cc
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/TermEditResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
TermEditResult::TermEditResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
TermEditResult::TermEditResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
TermEditResult::~TermEditResult()
|
||||
{}
|
||||
|
||||
void TermEditResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
if(!dataNode["failCount"].isNull())
|
||||
data_.failCount = std::stol(dataNode["failCount"].asString());
|
||||
auto alltermsNode = dataNode["terms"]["termsItem"];
|
||||
for (auto dataNodetermstermsItem : alltermsNode)
|
||||
{
|
||||
Data::TermsItem termsItemObject;
|
||||
if(!dataNodetermstermsItem["termId"].isNull())
|
||||
termsItemObject.termId = dataNodetermstermsItem["termId"].asString();
|
||||
if(!dataNodetermstermsItem["src"].isNull())
|
||||
termsItemObject.src = dataNodetermstermsItem["src"].asString();
|
||||
if(!dataNodetermstermsItem["tgt"].isNull())
|
||||
termsItemObject.tgt = dataNodetermstermsItem["tgt"].asString();
|
||||
data_.terms.push_back(termsItemObject);
|
||||
}
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string TermEditResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string TermEditResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string TermEditResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
TermEditResult::Data TermEditResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string TermEditResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool TermEditResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
73
anytrans/src/model/TermQueryRequest.cc
Normal file
73
anytrans/src/model/TermQueryRequest.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/TermQueryRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::TermQueryRequest;
|
||||
|
||||
TermQueryRequest::TermQueryRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/intervene/query"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
TermQueryRequest::~TermQueryRequest() {}
|
||||
|
||||
std::string TermQueryRequest::getSourceLanguage() const {
|
||||
return sourceLanguage_;
|
||||
}
|
||||
|
||||
void TermQueryRequest::setSourceLanguage(const std::string &sourceLanguage) {
|
||||
sourceLanguage_ = sourceLanguage;
|
||||
setBodyParameter(std::string("sourceLanguage"), sourceLanguage);
|
||||
}
|
||||
|
||||
std::string TermQueryRequest::getScene() const {
|
||||
return scene_;
|
||||
}
|
||||
|
||||
void TermQueryRequest::setScene(const std::string &scene) {
|
||||
scene_ = scene;
|
||||
setBodyParameter(std::string("scene"), scene);
|
||||
}
|
||||
|
||||
std::string TermQueryRequest::getTargetLanguage() const {
|
||||
return targetLanguage_;
|
||||
}
|
||||
|
||||
void TermQueryRequest::setTargetLanguage(const std::string &targetLanguage) {
|
||||
targetLanguage_ = targetLanguage;
|
||||
setBodyParameter(std::string("targetLanguage"), targetLanguage);
|
||||
}
|
||||
|
||||
std::string TermQueryRequest::getText() const {
|
||||
return text_;
|
||||
}
|
||||
|
||||
void TermQueryRequest::setText(const std::string &text) {
|
||||
text_ = text;
|
||||
setBodyParameter(std::string("text"), text);
|
||||
}
|
||||
|
||||
std::string TermQueryRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void TermQueryRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
99
anytrans/src/model/TermQueryResult.cc
Normal file
99
anytrans/src/model/TermQueryResult.cc
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/TermQueryResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
TermQueryResult::TermQueryResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
TermQueryResult::TermQueryResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
TermQueryResult::~TermQueryResult()
|
||||
{}
|
||||
|
||||
void TermQueryResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
if(!dataNode["failCount"].isNull())
|
||||
data_.failCount = std::stol(dataNode["failCount"].asString());
|
||||
auto alltermsNode = dataNode["terms"]["termsItem"];
|
||||
for (auto dataNodetermstermsItem : alltermsNode)
|
||||
{
|
||||
Data::TermsItem termsItemObject;
|
||||
if(!dataNodetermstermsItem["termId"].isNull())
|
||||
termsItemObject.termId = dataNodetermstermsItem["termId"].asString();
|
||||
if(!dataNodetermstermsItem["src"].isNull())
|
||||
termsItemObject.src = dataNodetermstermsItem["src"].asString();
|
||||
if(!dataNodetermstermsItem["tgt"].isNull())
|
||||
termsItemObject.tgt = dataNodetermstermsItem["tgt"].asString();
|
||||
data_.terms.push_back(termsItemObject);
|
||||
}
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string TermQueryResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string TermQueryResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string TermQueryResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
TermQueryResult::Data TermQueryResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string TermQueryResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool TermQueryResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
107
anytrans/src/model/TextTranslateRequest.cc
Normal file
107
anytrans/src/model/TextTranslateRequest.cc
Normal file
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/TextTranslateRequest.h>
|
||||
|
||||
using AlibabaCloud::AnyTrans::Model::TextTranslateRequest;
|
||||
|
||||
TextTranslateRequest::TextTranslateRequest()
|
||||
: RoaServiceRequest("anytrans", "2025-07-07") {
|
||||
setResourcePath("/anytrans/translate/text"};
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
TextTranslateRequest::~TextTranslateRequest() {}
|
||||
|
||||
TextTranslateRequest::ext TextTranslateRequest::getExt() const {
|
||||
return ext_;
|
||||
}
|
||||
|
||||
void TextTranslateRequest::setExt(const TextTranslateRequest::ext &ext) {
|
||||
ext_ = ext;
|
||||
for(int dep1 = 0; dep1 != ext.sensitives.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".sensitives." + std::to_string(dep1 + 1), ext.sensitives[dep1]);
|
||||
}
|
||||
for(int dep1 = 0; dep1 != ext.terminologies.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".tgt", ext.terminologies[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".terminologies." + std::to_string(dep1 + 1) + ".src", ext.terminologies[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toLower", ext.textTransform.toLower ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toUpper", ext.textTransform.toUpper ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".textTransform.toTitle", ext.textTransform.toTitle ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".agent", ext.agent);
|
||||
for(int dep1 = 0; dep1 != ext.examples.size(); dep1++) {
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".tgt", ext.examples[dep1].tgt);
|
||||
setBodyParameter(std::string("ext") + ".examples." + std::to_string(dep1 + 1) + ".src", ext.examples[dep1].src);
|
||||
}
|
||||
setBodyParameter(std::string("ext") + ".config.skipCsiCheck", ext.config.skipCsiCheck ? "true" : "false");
|
||||
setBodyParameter(std::string("ext") + ".domainHint", ext.domainHint);
|
||||
}
|
||||
|
||||
std::string TextTranslateRequest::getSourceLanguage() const {
|
||||
return sourceLanguage_;
|
||||
}
|
||||
|
||||
void TextTranslateRequest::setSourceLanguage(const std::string &sourceLanguage) {
|
||||
sourceLanguage_ = sourceLanguage;
|
||||
setBodyParameter(std::string("sourceLanguage"), sourceLanguage);
|
||||
}
|
||||
|
||||
std::string TextTranslateRequest::getFormat() const {
|
||||
return format_;
|
||||
}
|
||||
|
||||
void TextTranslateRequest::setFormat(const std::string &format) {
|
||||
format_ = format;
|
||||
setBodyParameter(std::string("format"), format);
|
||||
}
|
||||
|
||||
std::string TextTranslateRequest::getScene() const {
|
||||
return scene_;
|
||||
}
|
||||
|
||||
void TextTranslateRequest::setScene(const std::string &scene) {
|
||||
scene_ = scene;
|
||||
setBodyParameter(std::string("scene"), scene);
|
||||
}
|
||||
|
||||
std::string TextTranslateRequest::getTargetLanguage() const {
|
||||
return targetLanguage_;
|
||||
}
|
||||
|
||||
void TextTranslateRequest::setTargetLanguage(const std::string &targetLanguage) {
|
||||
targetLanguage_ = targetLanguage;
|
||||
setBodyParameter(std::string("targetLanguage"), targetLanguage);
|
||||
}
|
||||
|
||||
std::string TextTranslateRequest::getText() const {
|
||||
return text_;
|
||||
}
|
||||
|
||||
void TextTranslateRequest::setText(const std::string &text) {
|
||||
text_ = text;
|
||||
setBodyParameter(std::string("text"), text);
|
||||
}
|
||||
|
||||
std::string TextTranslateRequest::getWorkspaceId() const {
|
||||
return workspaceId_;
|
||||
}
|
||||
|
||||
void TextTranslateRequest::setWorkspaceId(const std::string &workspaceId) {
|
||||
workspaceId_ = workspaceId;
|
||||
setBodyParameter(std::string("workspaceId"), workspaceId);
|
||||
}
|
||||
|
||||
94
anytrans/src/model/TextTranslateResult.cc
Normal file
94
anytrans/src/model/TextTranslateResult.cc
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/anytrans/model/TextTranslateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AnyTrans;
|
||||
using namespace AlibabaCloud::AnyTrans::Model;
|
||||
|
||||
TextTranslateResult::TextTranslateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
TextTranslateResult::TextTranslateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
TextTranslateResult::~TextTranslateResult()
|
||||
{}
|
||||
|
||||
void TextTranslateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["data"];
|
||||
if(!dataNode["translation"].isNull())
|
||||
data_.translation = dataNode["translation"].asString();
|
||||
auto usageNode = dataNode["usage"];
|
||||
if(!usageNode["inputTokens"].isNull())
|
||||
data_.usage.inputTokens = std::stol(usageNode["inputTokens"].asString());
|
||||
if(!usageNode["outputTokens"].isNull())
|
||||
data_.usage.outputTokens = std::stol(usageNode["outputTokens"].asString());
|
||||
if(!usageNode["totalTokens"].isNull())
|
||||
data_.usage.totalTokens = std::stol(usageNode["totalTokens"].asString());
|
||||
if(!value["code"].isNull())
|
||||
code_ = value["code"].asString();
|
||||
if(!value["message"].isNull())
|
||||
message_ = value["message"].asString();
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["success"].isNull())
|
||||
success_ = value["success"].asString() == "true";
|
||||
if(!value["httpStatusCode"].isNull())
|
||||
httpStatusCode_ = value["httpStatusCode"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string TextTranslateResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string TextTranslateResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string TextTranslateResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
TextTranslateResult::Data TextTranslateResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string TextTranslateResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool TextTranslateResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -21,105 +21,101 @@ set(cas_public_header
|
||||
include/alibabacloud/cas/CasExport.h )
|
||||
|
||||
set(cas_public_header_model
|
||||
include/alibabacloud/cas/model/CancelCertificateForPackageRequestRequest.h
|
||||
include/alibabacloud/cas/model/CancelCertificateForPackageRequestResult.h
|
||||
include/alibabacloud/cas/model/CancelOrderRequestRequest.h
|
||||
include/alibabacloud/cas/model/CancelOrderRequestResult.h
|
||||
include/alibabacloud/cas/model/CreateCertificateForPackageRequestRequest.h
|
||||
include/alibabacloud/cas/model/CreateCertificateForPackageRequestResult.h
|
||||
include/alibabacloud/cas/model/CreateCertificateRequestRequest.h
|
||||
include/alibabacloud/cas/model/CreateCertificateRequestResult.h
|
||||
include/alibabacloud/cas/model/CreateCertificateWithCsrRequestRequest.h
|
||||
include/alibabacloud/cas/model/CreateCertificateWithCsrRequestResult.h
|
||||
include/alibabacloud/cas/model/CreateWHClientCertificateRequest.h
|
||||
include/alibabacloud/cas/model/CreateWHClientCertificateResult.h
|
||||
include/alibabacloud/cas/model/DecryptRequest.h
|
||||
include/alibabacloud/cas/model/DecryptResult.h
|
||||
include/alibabacloud/cas/model/DeleteCertificateRequestRequest.h
|
||||
include/alibabacloud/cas/model/DeleteCertificateRequestResult.h
|
||||
include/alibabacloud/cas/model/DeletePCACertRequest.h
|
||||
include/alibabacloud/cas/model/DeletePCACertResult.h
|
||||
include/alibabacloud/cas/model/DeleteUserCertificateRequest.h
|
||||
include/alibabacloud/cas/model/DeleteUserCertificateResult.h
|
||||
include/alibabacloud/cas/model/DescribeCertificateStateRequest.h
|
||||
include/alibabacloud/cas/model/DescribeCertificateStateResult.h
|
||||
include/alibabacloud/cas/model/DescribePackageStateRequest.h
|
||||
include/alibabacloud/cas/model/DescribePackageStateResult.h
|
||||
include/alibabacloud/cas/model/EncryptRequest.h
|
||||
include/alibabacloud/cas/model/EncryptResult.h
|
||||
include/alibabacloud/cas/model/GetCertWarehouseQuotaRequest.h
|
||||
include/alibabacloud/cas/model/GetCertWarehouseQuotaResult.h
|
||||
include/alibabacloud/cas/model/GetUserCertificateDetailRequest.h
|
||||
include/alibabacloud/cas/model/GetUserCertificateDetailResult.h
|
||||
include/alibabacloud/cas/model/CreateClientCertificateRequest.h
|
||||
include/alibabacloud/cas/model/CreateClientCertificateResult.h
|
||||
include/alibabacloud/cas/model/CreateClientCertificateWithCsrRequest.h
|
||||
include/alibabacloud/cas/model/CreateClientCertificateWithCsrResult.h
|
||||
include/alibabacloud/cas/model/CreateCustomCertificateRequest.h
|
||||
include/alibabacloud/cas/model/CreateCustomCertificateResult.h
|
||||
include/alibabacloud/cas/model/CreateExternalCACertificateRequest.h
|
||||
include/alibabacloud/cas/model/CreateExternalCACertificateResult.h
|
||||
include/alibabacloud/cas/model/CreateRevokeClientCertificateRequest.h
|
||||
include/alibabacloud/cas/model/CreateRevokeClientCertificateResult.h
|
||||
include/alibabacloud/cas/model/CreateRootCACertificateRequest.h
|
||||
include/alibabacloud/cas/model/CreateRootCACertificateResult.h
|
||||
include/alibabacloud/cas/model/CreateServerCertificateRequest.h
|
||||
include/alibabacloud/cas/model/CreateServerCertificateResult.h
|
||||
include/alibabacloud/cas/model/CreateServerCertificateWithCsrRequest.h
|
||||
include/alibabacloud/cas/model/CreateServerCertificateWithCsrResult.h
|
||||
include/alibabacloud/cas/model/CreateSubCACertificateRequest.h
|
||||
include/alibabacloud/cas/model/CreateSubCACertificateResult.h
|
||||
include/alibabacloud/cas/model/DeleteClientCertificateRequest.h
|
||||
include/alibabacloud/cas/model/DeleteClientCertificateResult.h
|
||||
include/alibabacloud/cas/model/DescribeCACertificateRequest.h
|
||||
include/alibabacloud/cas/model/DescribeCACertificateResult.h
|
||||
include/alibabacloud/cas/model/DescribeCACertificateCountRequest.h
|
||||
include/alibabacloud/cas/model/DescribeCACertificateCountResult.h
|
||||
include/alibabacloud/cas/model/DescribeCACertificateListRequest.h
|
||||
include/alibabacloud/cas/model/DescribeCACertificateListResult.h
|
||||
include/alibabacloud/cas/model/DescribeCertificatePrivateKeyRequest.h
|
||||
include/alibabacloud/cas/model/DescribeCertificatePrivateKeyResult.h
|
||||
include/alibabacloud/cas/model/DescribeClientCertificateRequest.h
|
||||
include/alibabacloud/cas/model/DescribeClientCertificateResult.h
|
||||
include/alibabacloud/cas/model/DescribeClientCertificateStatusRequest.h
|
||||
include/alibabacloud/cas/model/DescribeClientCertificateStatusResult.h
|
||||
include/alibabacloud/cas/model/GetCAInstanceStatusRequest.h
|
||||
include/alibabacloud/cas/model/GetCAInstanceStatusResult.h
|
||||
include/alibabacloud/cas/model/ListCertRequest.h
|
||||
include/alibabacloud/cas/model/ListCertResult.h
|
||||
include/alibabacloud/cas/model/ListCertWarehouseRequest.h
|
||||
include/alibabacloud/cas/model/ListCertWarehouseResult.h
|
||||
include/alibabacloud/cas/model/ListUserCertificateOrderRequest.h
|
||||
include/alibabacloud/cas/model/ListUserCertificateOrderResult.h
|
||||
include/alibabacloud/cas/model/RenewCertificateOrderForPackageRequestRequest.h
|
||||
include/alibabacloud/cas/model/RenewCertificateOrderForPackageRequestResult.h
|
||||
include/alibabacloud/cas/model/RevokeWHClientCertificateRequest.h
|
||||
include/alibabacloud/cas/model/RevokeWHClientCertificateResult.h
|
||||
include/alibabacloud/cas/model/SignRequest.h
|
||||
include/alibabacloud/cas/model/SignResult.h
|
||||
include/alibabacloud/cas/model/UploadPCACertRequest.h
|
||||
include/alibabacloud/cas/model/UploadPCACertResult.h
|
||||
include/alibabacloud/cas/model/UploadUserCertificateRequest.h
|
||||
include/alibabacloud/cas/model/UploadUserCertificateResult.h
|
||||
include/alibabacloud/cas/model/VerifyRequest.h
|
||||
include/alibabacloud/cas/model/VerifyResult.h )
|
||||
include/alibabacloud/cas/model/ListClientCertificateRequest.h
|
||||
include/alibabacloud/cas/model/ListClientCertificateResult.h
|
||||
include/alibabacloud/cas/model/ListPcaCaCertificateRequest.h
|
||||
include/alibabacloud/cas/model/ListPcaCaCertificateResult.h
|
||||
include/alibabacloud/cas/model/ListRevokeCertificateRequest.h
|
||||
include/alibabacloud/cas/model/ListRevokeCertificateResult.h
|
||||
include/alibabacloud/cas/model/UpdateCACertificateStatusRequest.h
|
||||
include/alibabacloud/cas/model/UpdateCACertificateStatusResult.h
|
||||
include/alibabacloud/cas/model/UploadPcaCertToCasRequest.h
|
||||
include/alibabacloud/cas/model/UploadPcaCertToCasResult.h )
|
||||
|
||||
set(cas_src
|
||||
src/CasClient.cc
|
||||
src/model/CancelCertificateForPackageRequestRequest.cc
|
||||
src/model/CancelCertificateForPackageRequestResult.cc
|
||||
src/model/CancelOrderRequestRequest.cc
|
||||
src/model/CancelOrderRequestResult.cc
|
||||
src/model/CreateCertificateForPackageRequestRequest.cc
|
||||
src/model/CreateCertificateForPackageRequestResult.cc
|
||||
src/model/CreateCertificateRequestRequest.cc
|
||||
src/model/CreateCertificateRequestResult.cc
|
||||
src/model/CreateCertificateWithCsrRequestRequest.cc
|
||||
src/model/CreateCertificateWithCsrRequestResult.cc
|
||||
src/model/CreateWHClientCertificateRequest.cc
|
||||
src/model/CreateWHClientCertificateResult.cc
|
||||
src/model/DecryptRequest.cc
|
||||
src/model/DecryptResult.cc
|
||||
src/model/DeleteCertificateRequestRequest.cc
|
||||
src/model/DeleteCertificateRequestResult.cc
|
||||
src/model/DeletePCACertRequest.cc
|
||||
src/model/DeletePCACertResult.cc
|
||||
src/model/DeleteUserCertificateRequest.cc
|
||||
src/model/DeleteUserCertificateResult.cc
|
||||
src/model/DescribeCertificateStateRequest.cc
|
||||
src/model/DescribeCertificateStateResult.cc
|
||||
src/model/DescribePackageStateRequest.cc
|
||||
src/model/DescribePackageStateResult.cc
|
||||
src/model/EncryptRequest.cc
|
||||
src/model/EncryptResult.cc
|
||||
src/model/GetCertWarehouseQuotaRequest.cc
|
||||
src/model/GetCertWarehouseQuotaResult.cc
|
||||
src/model/GetUserCertificateDetailRequest.cc
|
||||
src/model/GetUserCertificateDetailResult.cc
|
||||
src/model/CreateClientCertificateRequest.cc
|
||||
src/model/CreateClientCertificateResult.cc
|
||||
src/model/CreateClientCertificateWithCsrRequest.cc
|
||||
src/model/CreateClientCertificateWithCsrResult.cc
|
||||
src/model/CreateCustomCertificateRequest.cc
|
||||
src/model/CreateCustomCertificateResult.cc
|
||||
src/model/CreateExternalCACertificateRequest.cc
|
||||
src/model/CreateExternalCACertificateResult.cc
|
||||
src/model/CreateRevokeClientCertificateRequest.cc
|
||||
src/model/CreateRevokeClientCertificateResult.cc
|
||||
src/model/CreateRootCACertificateRequest.cc
|
||||
src/model/CreateRootCACertificateResult.cc
|
||||
src/model/CreateServerCertificateRequest.cc
|
||||
src/model/CreateServerCertificateResult.cc
|
||||
src/model/CreateServerCertificateWithCsrRequest.cc
|
||||
src/model/CreateServerCertificateWithCsrResult.cc
|
||||
src/model/CreateSubCACertificateRequest.cc
|
||||
src/model/CreateSubCACertificateResult.cc
|
||||
src/model/DeleteClientCertificateRequest.cc
|
||||
src/model/DeleteClientCertificateResult.cc
|
||||
src/model/DescribeCACertificateRequest.cc
|
||||
src/model/DescribeCACertificateResult.cc
|
||||
src/model/DescribeCACertificateCountRequest.cc
|
||||
src/model/DescribeCACertificateCountResult.cc
|
||||
src/model/DescribeCACertificateListRequest.cc
|
||||
src/model/DescribeCACertificateListResult.cc
|
||||
src/model/DescribeCertificatePrivateKeyRequest.cc
|
||||
src/model/DescribeCertificatePrivateKeyResult.cc
|
||||
src/model/DescribeClientCertificateRequest.cc
|
||||
src/model/DescribeClientCertificateResult.cc
|
||||
src/model/DescribeClientCertificateStatusRequest.cc
|
||||
src/model/DescribeClientCertificateStatusResult.cc
|
||||
src/model/GetCAInstanceStatusRequest.cc
|
||||
src/model/GetCAInstanceStatusResult.cc
|
||||
src/model/ListCertRequest.cc
|
||||
src/model/ListCertResult.cc
|
||||
src/model/ListCertWarehouseRequest.cc
|
||||
src/model/ListCertWarehouseResult.cc
|
||||
src/model/ListUserCertificateOrderRequest.cc
|
||||
src/model/ListUserCertificateOrderResult.cc
|
||||
src/model/RenewCertificateOrderForPackageRequestRequest.cc
|
||||
src/model/RenewCertificateOrderForPackageRequestResult.cc
|
||||
src/model/RevokeWHClientCertificateRequest.cc
|
||||
src/model/RevokeWHClientCertificateResult.cc
|
||||
src/model/SignRequest.cc
|
||||
src/model/SignResult.cc
|
||||
src/model/UploadPCACertRequest.cc
|
||||
src/model/UploadPCACertResult.cc
|
||||
src/model/UploadUserCertificateRequest.cc
|
||||
src/model/UploadUserCertificateResult.cc
|
||||
src/model/VerifyRequest.cc
|
||||
src/model/VerifyResult.cc )
|
||||
src/model/ListClientCertificateRequest.cc
|
||||
src/model/ListClientCertificateResult.cc
|
||||
src/model/ListPcaCaCertificateRequest.cc
|
||||
src/model/ListPcaCaCertificateResult.cc
|
||||
src/model/ListRevokeCertificateRequest.cc
|
||||
src/model/ListRevokeCertificateResult.cc
|
||||
src/model/UpdateCACertificateStatusRequest.cc
|
||||
src/model/UpdateCACertificateStatusResult.cc
|
||||
src/model/UploadPcaCertToCasRequest.cc
|
||||
src/model/UploadPcaCertToCasResult.cc )
|
||||
|
||||
add_library(cas ${LIB_TYPE}
|
||||
${cas_public_header}
|
||||
|
||||
@@ -22,54 +22,52 @@
|
||||
#include <alibabacloud/core/EndpointProvider.h>
|
||||
#include <alibabacloud/core/RpcServiceClient.h>
|
||||
#include "CasExport.h"
|
||||
#include "model/CancelCertificateForPackageRequestRequest.h"
|
||||
#include "model/CancelCertificateForPackageRequestResult.h"
|
||||
#include "model/CancelOrderRequestRequest.h"
|
||||
#include "model/CancelOrderRequestResult.h"
|
||||
#include "model/CreateCertificateForPackageRequestRequest.h"
|
||||
#include "model/CreateCertificateForPackageRequestResult.h"
|
||||
#include "model/CreateCertificateRequestRequest.h"
|
||||
#include "model/CreateCertificateRequestResult.h"
|
||||
#include "model/CreateCertificateWithCsrRequestRequest.h"
|
||||
#include "model/CreateCertificateWithCsrRequestResult.h"
|
||||
#include "model/CreateWHClientCertificateRequest.h"
|
||||
#include "model/CreateWHClientCertificateResult.h"
|
||||
#include "model/DecryptRequest.h"
|
||||
#include "model/DecryptResult.h"
|
||||
#include "model/DeleteCertificateRequestRequest.h"
|
||||
#include "model/DeleteCertificateRequestResult.h"
|
||||
#include "model/DeletePCACertRequest.h"
|
||||
#include "model/DeletePCACertResult.h"
|
||||
#include "model/DeleteUserCertificateRequest.h"
|
||||
#include "model/DeleteUserCertificateResult.h"
|
||||
#include "model/DescribeCertificateStateRequest.h"
|
||||
#include "model/DescribeCertificateStateResult.h"
|
||||
#include "model/DescribePackageStateRequest.h"
|
||||
#include "model/DescribePackageStateResult.h"
|
||||
#include "model/EncryptRequest.h"
|
||||
#include "model/EncryptResult.h"
|
||||
#include "model/GetCertWarehouseQuotaRequest.h"
|
||||
#include "model/GetCertWarehouseQuotaResult.h"
|
||||
#include "model/GetUserCertificateDetailRequest.h"
|
||||
#include "model/GetUserCertificateDetailResult.h"
|
||||
#include "model/CreateClientCertificateRequest.h"
|
||||
#include "model/CreateClientCertificateResult.h"
|
||||
#include "model/CreateClientCertificateWithCsrRequest.h"
|
||||
#include "model/CreateClientCertificateWithCsrResult.h"
|
||||
#include "model/CreateCustomCertificateRequest.h"
|
||||
#include "model/CreateCustomCertificateResult.h"
|
||||
#include "model/CreateExternalCACertificateRequest.h"
|
||||
#include "model/CreateExternalCACertificateResult.h"
|
||||
#include "model/CreateRevokeClientCertificateRequest.h"
|
||||
#include "model/CreateRevokeClientCertificateResult.h"
|
||||
#include "model/CreateRootCACertificateRequest.h"
|
||||
#include "model/CreateRootCACertificateResult.h"
|
||||
#include "model/CreateServerCertificateRequest.h"
|
||||
#include "model/CreateServerCertificateResult.h"
|
||||
#include "model/CreateServerCertificateWithCsrRequest.h"
|
||||
#include "model/CreateServerCertificateWithCsrResult.h"
|
||||
#include "model/CreateSubCACertificateRequest.h"
|
||||
#include "model/CreateSubCACertificateResult.h"
|
||||
#include "model/DeleteClientCertificateRequest.h"
|
||||
#include "model/DeleteClientCertificateResult.h"
|
||||
#include "model/DescribeCACertificateRequest.h"
|
||||
#include "model/DescribeCACertificateResult.h"
|
||||
#include "model/DescribeCACertificateCountRequest.h"
|
||||
#include "model/DescribeCACertificateCountResult.h"
|
||||
#include "model/DescribeCACertificateListRequest.h"
|
||||
#include "model/DescribeCACertificateListResult.h"
|
||||
#include "model/DescribeCertificatePrivateKeyRequest.h"
|
||||
#include "model/DescribeCertificatePrivateKeyResult.h"
|
||||
#include "model/DescribeClientCertificateRequest.h"
|
||||
#include "model/DescribeClientCertificateResult.h"
|
||||
#include "model/DescribeClientCertificateStatusRequest.h"
|
||||
#include "model/DescribeClientCertificateStatusResult.h"
|
||||
#include "model/GetCAInstanceStatusRequest.h"
|
||||
#include "model/GetCAInstanceStatusResult.h"
|
||||
#include "model/ListCertRequest.h"
|
||||
#include "model/ListCertResult.h"
|
||||
#include "model/ListCertWarehouseRequest.h"
|
||||
#include "model/ListCertWarehouseResult.h"
|
||||
#include "model/ListUserCertificateOrderRequest.h"
|
||||
#include "model/ListUserCertificateOrderResult.h"
|
||||
#include "model/RenewCertificateOrderForPackageRequestRequest.h"
|
||||
#include "model/RenewCertificateOrderForPackageRequestResult.h"
|
||||
#include "model/RevokeWHClientCertificateRequest.h"
|
||||
#include "model/RevokeWHClientCertificateResult.h"
|
||||
#include "model/SignRequest.h"
|
||||
#include "model/SignResult.h"
|
||||
#include "model/UploadPCACertRequest.h"
|
||||
#include "model/UploadPCACertResult.h"
|
||||
#include "model/UploadUserCertificateRequest.h"
|
||||
#include "model/UploadUserCertificateResult.h"
|
||||
#include "model/VerifyRequest.h"
|
||||
#include "model/VerifyResult.h"
|
||||
#include "model/ListClientCertificateRequest.h"
|
||||
#include "model/ListClientCertificateResult.h"
|
||||
#include "model/ListPcaCaCertificateRequest.h"
|
||||
#include "model/ListPcaCaCertificateResult.h"
|
||||
#include "model/ListRevokeCertificateRequest.h"
|
||||
#include "model/ListRevokeCertificateResult.h"
|
||||
#include "model/UpdateCACertificateStatusRequest.h"
|
||||
#include "model/UpdateCACertificateStatusResult.h"
|
||||
#include "model/UploadPcaCertToCasRequest.h"
|
||||
#include "model/UploadPcaCertToCasResult.h"
|
||||
|
||||
|
||||
namespace AlibabaCloud
|
||||
@@ -79,155 +77,149 @@ namespace AlibabaCloud
|
||||
class ALIBABACLOUD_CAS_EXPORT CasClient : public RpcServiceClient
|
||||
{
|
||||
public:
|
||||
typedef Outcome<Error, Model::CancelCertificateForPackageRequestResult> CancelCertificateForPackageRequestOutcome;
|
||||
typedef std::future<CancelCertificateForPackageRequestOutcome> CancelCertificateForPackageRequestOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::CancelCertificateForPackageRequestRequest&, const CancelCertificateForPackageRequestOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CancelCertificateForPackageRequestAsyncHandler;
|
||||
typedef Outcome<Error, Model::CancelOrderRequestResult> CancelOrderRequestOutcome;
|
||||
typedef std::future<CancelOrderRequestOutcome> CancelOrderRequestOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::CancelOrderRequestRequest&, const CancelOrderRequestOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CancelOrderRequestAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateCertificateForPackageRequestResult> CreateCertificateForPackageRequestOutcome;
|
||||
typedef std::future<CreateCertificateForPackageRequestOutcome> CreateCertificateForPackageRequestOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::CreateCertificateForPackageRequestRequest&, const CreateCertificateForPackageRequestOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateCertificateForPackageRequestAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateCertificateRequestResult> CreateCertificateRequestOutcome;
|
||||
typedef std::future<CreateCertificateRequestOutcome> CreateCertificateRequestOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::CreateCertificateRequestRequest&, const CreateCertificateRequestOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateCertificateRequestAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateCertificateWithCsrRequestResult> CreateCertificateWithCsrRequestOutcome;
|
||||
typedef std::future<CreateCertificateWithCsrRequestOutcome> CreateCertificateWithCsrRequestOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::CreateCertificateWithCsrRequestRequest&, const CreateCertificateWithCsrRequestOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateCertificateWithCsrRequestAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateWHClientCertificateResult> CreateWHClientCertificateOutcome;
|
||||
typedef std::future<CreateWHClientCertificateOutcome> CreateWHClientCertificateOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::CreateWHClientCertificateRequest&, const CreateWHClientCertificateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateWHClientCertificateAsyncHandler;
|
||||
typedef Outcome<Error, Model::DecryptResult> DecryptOutcome;
|
||||
typedef std::future<DecryptOutcome> DecryptOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::DecryptRequest&, const DecryptOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DecryptAsyncHandler;
|
||||
typedef Outcome<Error, Model::DeleteCertificateRequestResult> DeleteCertificateRequestOutcome;
|
||||
typedef std::future<DeleteCertificateRequestOutcome> DeleteCertificateRequestOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::DeleteCertificateRequestRequest&, const DeleteCertificateRequestOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteCertificateRequestAsyncHandler;
|
||||
typedef Outcome<Error, Model::DeletePCACertResult> DeletePCACertOutcome;
|
||||
typedef std::future<DeletePCACertOutcome> DeletePCACertOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::DeletePCACertRequest&, const DeletePCACertOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeletePCACertAsyncHandler;
|
||||
typedef Outcome<Error, Model::DeleteUserCertificateResult> DeleteUserCertificateOutcome;
|
||||
typedef std::future<DeleteUserCertificateOutcome> DeleteUserCertificateOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::DeleteUserCertificateRequest&, const DeleteUserCertificateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteUserCertificateAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeCertificateStateResult> DescribeCertificateStateOutcome;
|
||||
typedef std::future<DescribeCertificateStateOutcome> DescribeCertificateStateOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::DescribeCertificateStateRequest&, const DescribeCertificateStateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeCertificateStateAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribePackageStateResult> DescribePackageStateOutcome;
|
||||
typedef std::future<DescribePackageStateOutcome> DescribePackageStateOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::DescribePackageStateRequest&, const DescribePackageStateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribePackageStateAsyncHandler;
|
||||
typedef Outcome<Error, Model::EncryptResult> EncryptOutcome;
|
||||
typedef std::future<EncryptOutcome> EncryptOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::EncryptRequest&, const EncryptOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> EncryptAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetCertWarehouseQuotaResult> GetCertWarehouseQuotaOutcome;
|
||||
typedef std::future<GetCertWarehouseQuotaOutcome> GetCertWarehouseQuotaOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::GetCertWarehouseQuotaRequest&, const GetCertWarehouseQuotaOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetCertWarehouseQuotaAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetUserCertificateDetailResult> GetUserCertificateDetailOutcome;
|
||||
typedef std::future<GetUserCertificateDetailOutcome> GetUserCertificateDetailOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::GetUserCertificateDetailRequest&, const GetUserCertificateDetailOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetUserCertificateDetailAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateClientCertificateResult> CreateClientCertificateOutcome;
|
||||
typedef std::future<CreateClientCertificateOutcome> CreateClientCertificateOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::CreateClientCertificateRequest&, const CreateClientCertificateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateClientCertificateAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateClientCertificateWithCsrResult> CreateClientCertificateWithCsrOutcome;
|
||||
typedef std::future<CreateClientCertificateWithCsrOutcome> CreateClientCertificateWithCsrOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::CreateClientCertificateWithCsrRequest&, const CreateClientCertificateWithCsrOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateClientCertificateWithCsrAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateCustomCertificateResult> CreateCustomCertificateOutcome;
|
||||
typedef std::future<CreateCustomCertificateOutcome> CreateCustomCertificateOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::CreateCustomCertificateRequest&, const CreateCustomCertificateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateCustomCertificateAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateExternalCACertificateResult> CreateExternalCACertificateOutcome;
|
||||
typedef std::future<CreateExternalCACertificateOutcome> CreateExternalCACertificateOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::CreateExternalCACertificateRequest&, const CreateExternalCACertificateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateExternalCACertificateAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateRevokeClientCertificateResult> CreateRevokeClientCertificateOutcome;
|
||||
typedef std::future<CreateRevokeClientCertificateOutcome> CreateRevokeClientCertificateOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::CreateRevokeClientCertificateRequest&, const CreateRevokeClientCertificateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateRevokeClientCertificateAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateRootCACertificateResult> CreateRootCACertificateOutcome;
|
||||
typedef std::future<CreateRootCACertificateOutcome> CreateRootCACertificateOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::CreateRootCACertificateRequest&, const CreateRootCACertificateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateRootCACertificateAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateServerCertificateResult> CreateServerCertificateOutcome;
|
||||
typedef std::future<CreateServerCertificateOutcome> CreateServerCertificateOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::CreateServerCertificateRequest&, const CreateServerCertificateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateServerCertificateAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateServerCertificateWithCsrResult> CreateServerCertificateWithCsrOutcome;
|
||||
typedef std::future<CreateServerCertificateWithCsrOutcome> CreateServerCertificateWithCsrOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::CreateServerCertificateWithCsrRequest&, const CreateServerCertificateWithCsrOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateServerCertificateWithCsrAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateSubCACertificateResult> CreateSubCACertificateOutcome;
|
||||
typedef std::future<CreateSubCACertificateOutcome> CreateSubCACertificateOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::CreateSubCACertificateRequest&, const CreateSubCACertificateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateSubCACertificateAsyncHandler;
|
||||
typedef Outcome<Error, Model::DeleteClientCertificateResult> DeleteClientCertificateOutcome;
|
||||
typedef std::future<DeleteClientCertificateOutcome> DeleteClientCertificateOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::DeleteClientCertificateRequest&, const DeleteClientCertificateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteClientCertificateAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeCACertificateResult> DescribeCACertificateOutcome;
|
||||
typedef std::future<DescribeCACertificateOutcome> DescribeCACertificateOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::DescribeCACertificateRequest&, const DescribeCACertificateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeCACertificateAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeCACertificateCountResult> DescribeCACertificateCountOutcome;
|
||||
typedef std::future<DescribeCACertificateCountOutcome> DescribeCACertificateCountOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::DescribeCACertificateCountRequest&, const DescribeCACertificateCountOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeCACertificateCountAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeCACertificateListResult> DescribeCACertificateListOutcome;
|
||||
typedef std::future<DescribeCACertificateListOutcome> DescribeCACertificateListOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::DescribeCACertificateListRequest&, const DescribeCACertificateListOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeCACertificateListAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeCertificatePrivateKeyResult> DescribeCertificatePrivateKeyOutcome;
|
||||
typedef std::future<DescribeCertificatePrivateKeyOutcome> DescribeCertificatePrivateKeyOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::DescribeCertificatePrivateKeyRequest&, const DescribeCertificatePrivateKeyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeCertificatePrivateKeyAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeClientCertificateResult> DescribeClientCertificateOutcome;
|
||||
typedef std::future<DescribeClientCertificateOutcome> DescribeClientCertificateOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::DescribeClientCertificateRequest&, const DescribeClientCertificateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeClientCertificateAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeClientCertificateStatusResult> DescribeClientCertificateStatusOutcome;
|
||||
typedef std::future<DescribeClientCertificateStatusOutcome> DescribeClientCertificateStatusOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::DescribeClientCertificateStatusRequest&, const DescribeClientCertificateStatusOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeClientCertificateStatusAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetCAInstanceStatusResult> GetCAInstanceStatusOutcome;
|
||||
typedef std::future<GetCAInstanceStatusOutcome> GetCAInstanceStatusOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::GetCAInstanceStatusRequest&, const GetCAInstanceStatusOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetCAInstanceStatusAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListCertResult> ListCertOutcome;
|
||||
typedef std::future<ListCertOutcome> ListCertOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::ListCertRequest&, const ListCertOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListCertAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListCertWarehouseResult> ListCertWarehouseOutcome;
|
||||
typedef std::future<ListCertWarehouseOutcome> ListCertWarehouseOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::ListCertWarehouseRequest&, const ListCertWarehouseOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListCertWarehouseAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListUserCertificateOrderResult> ListUserCertificateOrderOutcome;
|
||||
typedef std::future<ListUserCertificateOrderOutcome> ListUserCertificateOrderOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::ListUserCertificateOrderRequest&, const ListUserCertificateOrderOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListUserCertificateOrderAsyncHandler;
|
||||
typedef Outcome<Error, Model::RenewCertificateOrderForPackageRequestResult> RenewCertificateOrderForPackageRequestOutcome;
|
||||
typedef std::future<RenewCertificateOrderForPackageRequestOutcome> RenewCertificateOrderForPackageRequestOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::RenewCertificateOrderForPackageRequestRequest&, const RenewCertificateOrderForPackageRequestOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RenewCertificateOrderForPackageRequestAsyncHandler;
|
||||
typedef Outcome<Error, Model::RevokeWHClientCertificateResult> RevokeWHClientCertificateOutcome;
|
||||
typedef std::future<RevokeWHClientCertificateOutcome> RevokeWHClientCertificateOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::RevokeWHClientCertificateRequest&, const RevokeWHClientCertificateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RevokeWHClientCertificateAsyncHandler;
|
||||
typedef Outcome<Error, Model::SignResult> SignOutcome;
|
||||
typedef std::future<SignOutcome> SignOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::SignRequest&, const SignOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SignAsyncHandler;
|
||||
typedef Outcome<Error, Model::UploadPCACertResult> UploadPCACertOutcome;
|
||||
typedef std::future<UploadPCACertOutcome> UploadPCACertOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::UploadPCACertRequest&, const UploadPCACertOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UploadPCACertAsyncHandler;
|
||||
typedef Outcome<Error, Model::UploadUserCertificateResult> UploadUserCertificateOutcome;
|
||||
typedef std::future<UploadUserCertificateOutcome> UploadUserCertificateOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::UploadUserCertificateRequest&, const UploadUserCertificateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UploadUserCertificateAsyncHandler;
|
||||
typedef Outcome<Error, Model::VerifyResult> VerifyOutcome;
|
||||
typedef std::future<VerifyOutcome> VerifyOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::VerifyRequest&, const VerifyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> VerifyAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListClientCertificateResult> ListClientCertificateOutcome;
|
||||
typedef std::future<ListClientCertificateOutcome> ListClientCertificateOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::ListClientCertificateRequest&, const ListClientCertificateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListClientCertificateAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListPcaCaCertificateResult> ListPcaCaCertificateOutcome;
|
||||
typedef std::future<ListPcaCaCertificateOutcome> ListPcaCaCertificateOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::ListPcaCaCertificateRequest&, const ListPcaCaCertificateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListPcaCaCertificateAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListRevokeCertificateResult> ListRevokeCertificateOutcome;
|
||||
typedef std::future<ListRevokeCertificateOutcome> ListRevokeCertificateOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::ListRevokeCertificateRequest&, const ListRevokeCertificateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListRevokeCertificateAsyncHandler;
|
||||
typedef Outcome<Error, Model::UpdateCACertificateStatusResult> UpdateCACertificateStatusOutcome;
|
||||
typedef std::future<UpdateCACertificateStatusOutcome> UpdateCACertificateStatusOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::UpdateCACertificateStatusRequest&, const UpdateCACertificateStatusOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateCACertificateStatusAsyncHandler;
|
||||
typedef Outcome<Error, Model::UploadPcaCertToCasResult> UploadPcaCertToCasOutcome;
|
||||
typedef std::future<UploadPcaCertToCasOutcome> UploadPcaCertToCasOutcomeCallable;
|
||||
typedef std::function<void(const CasClient*, const Model::UploadPcaCertToCasRequest&, const UploadPcaCertToCasOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UploadPcaCertToCasAsyncHandler;
|
||||
|
||||
CasClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||
CasClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||
CasClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||
~CasClient();
|
||||
CancelCertificateForPackageRequestOutcome cancelCertificateForPackageRequest(const Model::CancelCertificateForPackageRequestRequest &request)const;
|
||||
void cancelCertificateForPackageRequestAsync(const Model::CancelCertificateForPackageRequestRequest& request, const CancelCertificateForPackageRequestAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CancelCertificateForPackageRequestOutcomeCallable cancelCertificateForPackageRequestCallable(const Model::CancelCertificateForPackageRequestRequest& request) const;
|
||||
CancelOrderRequestOutcome cancelOrderRequest(const Model::CancelOrderRequestRequest &request)const;
|
||||
void cancelOrderRequestAsync(const Model::CancelOrderRequestRequest& request, const CancelOrderRequestAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CancelOrderRequestOutcomeCallable cancelOrderRequestCallable(const Model::CancelOrderRequestRequest& request) const;
|
||||
CreateCertificateForPackageRequestOutcome createCertificateForPackageRequest(const Model::CreateCertificateForPackageRequestRequest &request)const;
|
||||
void createCertificateForPackageRequestAsync(const Model::CreateCertificateForPackageRequestRequest& request, const CreateCertificateForPackageRequestAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateCertificateForPackageRequestOutcomeCallable createCertificateForPackageRequestCallable(const Model::CreateCertificateForPackageRequestRequest& request) const;
|
||||
CreateCertificateRequestOutcome createCertificateRequest(const Model::CreateCertificateRequestRequest &request)const;
|
||||
void createCertificateRequestAsync(const Model::CreateCertificateRequestRequest& request, const CreateCertificateRequestAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateCertificateRequestOutcomeCallable createCertificateRequestCallable(const Model::CreateCertificateRequestRequest& request) const;
|
||||
CreateCertificateWithCsrRequestOutcome createCertificateWithCsrRequest(const Model::CreateCertificateWithCsrRequestRequest &request)const;
|
||||
void createCertificateWithCsrRequestAsync(const Model::CreateCertificateWithCsrRequestRequest& request, const CreateCertificateWithCsrRequestAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateCertificateWithCsrRequestOutcomeCallable createCertificateWithCsrRequestCallable(const Model::CreateCertificateWithCsrRequestRequest& request) const;
|
||||
CreateWHClientCertificateOutcome createWHClientCertificate(const Model::CreateWHClientCertificateRequest &request)const;
|
||||
void createWHClientCertificateAsync(const Model::CreateWHClientCertificateRequest& request, const CreateWHClientCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateWHClientCertificateOutcomeCallable createWHClientCertificateCallable(const Model::CreateWHClientCertificateRequest& request) const;
|
||||
DecryptOutcome decrypt(const Model::DecryptRequest &request)const;
|
||||
void decryptAsync(const Model::DecryptRequest& request, const DecryptAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DecryptOutcomeCallable decryptCallable(const Model::DecryptRequest& request) const;
|
||||
DeleteCertificateRequestOutcome deleteCertificateRequest(const Model::DeleteCertificateRequestRequest &request)const;
|
||||
void deleteCertificateRequestAsync(const Model::DeleteCertificateRequestRequest& request, const DeleteCertificateRequestAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DeleteCertificateRequestOutcomeCallable deleteCertificateRequestCallable(const Model::DeleteCertificateRequestRequest& request) const;
|
||||
DeletePCACertOutcome deletePCACert(const Model::DeletePCACertRequest &request)const;
|
||||
void deletePCACertAsync(const Model::DeletePCACertRequest& request, const DeletePCACertAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DeletePCACertOutcomeCallable deletePCACertCallable(const Model::DeletePCACertRequest& request) const;
|
||||
DeleteUserCertificateOutcome deleteUserCertificate(const Model::DeleteUserCertificateRequest &request)const;
|
||||
void deleteUserCertificateAsync(const Model::DeleteUserCertificateRequest& request, const DeleteUserCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DeleteUserCertificateOutcomeCallable deleteUserCertificateCallable(const Model::DeleteUserCertificateRequest& request) const;
|
||||
DescribeCertificateStateOutcome describeCertificateState(const Model::DescribeCertificateStateRequest &request)const;
|
||||
void describeCertificateStateAsync(const Model::DescribeCertificateStateRequest& request, const DescribeCertificateStateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeCertificateStateOutcomeCallable describeCertificateStateCallable(const Model::DescribeCertificateStateRequest& request) const;
|
||||
DescribePackageStateOutcome describePackageState(const Model::DescribePackageStateRequest &request)const;
|
||||
void describePackageStateAsync(const Model::DescribePackageStateRequest& request, const DescribePackageStateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribePackageStateOutcomeCallable describePackageStateCallable(const Model::DescribePackageStateRequest& request) const;
|
||||
EncryptOutcome encrypt(const Model::EncryptRequest &request)const;
|
||||
void encryptAsync(const Model::EncryptRequest& request, const EncryptAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
EncryptOutcomeCallable encryptCallable(const Model::EncryptRequest& request) const;
|
||||
GetCertWarehouseQuotaOutcome getCertWarehouseQuota(const Model::GetCertWarehouseQuotaRequest &request)const;
|
||||
void getCertWarehouseQuotaAsync(const Model::GetCertWarehouseQuotaRequest& request, const GetCertWarehouseQuotaAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetCertWarehouseQuotaOutcomeCallable getCertWarehouseQuotaCallable(const Model::GetCertWarehouseQuotaRequest& request) const;
|
||||
GetUserCertificateDetailOutcome getUserCertificateDetail(const Model::GetUserCertificateDetailRequest &request)const;
|
||||
void getUserCertificateDetailAsync(const Model::GetUserCertificateDetailRequest& request, const GetUserCertificateDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetUserCertificateDetailOutcomeCallable getUserCertificateDetailCallable(const Model::GetUserCertificateDetailRequest& request) const;
|
||||
CreateClientCertificateOutcome createClientCertificate(const Model::CreateClientCertificateRequest &request)const;
|
||||
void createClientCertificateAsync(const Model::CreateClientCertificateRequest& request, const CreateClientCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateClientCertificateOutcomeCallable createClientCertificateCallable(const Model::CreateClientCertificateRequest& request) const;
|
||||
CreateClientCertificateWithCsrOutcome createClientCertificateWithCsr(const Model::CreateClientCertificateWithCsrRequest &request)const;
|
||||
void createClientCertificateWithCsrAsync(const Model::CreateClientCertificateWithCsrRequest& request, const CreateClientCertificateWithCsrAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateClientCertificateWithCsrOutcomeCallable createClientCertificateWithCsrCallable(const Model::CreateClientCertificateWithCsrRequest& request) const;
|
||||
CreateCustomCertificateOutcome createCustomCertificate(const Model::CreateCustomCertificateRequest &request)const;
|
||||
void createCustomCertificateAsync(const Model::CreateCustomCertificateRequest& request, const CreateCustomCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateCustomCertificateOutcomeCallable createCustomCertificateCallable(const Model::CreateCustomCertificateRequest& request) const;
|
||||
CreateExternalCACertificateOutcome createExternalCACertificate(const Model::CreateExternalCACertificateRequest &request)const;
|
||||
void createExternalCACertificateAsync(const Model::CreateExternalCACertificateRequest& request, const CreateExternalCACertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateExternalCACertificateOutcomeCallable createExternalCACertificateCallable(const Model::CreateExternalCACertificateRequest& request) const;
|
||||
CreateRevokeClientCertificateOutcome createRevokeClientCertificate(const Model::CreateRevokeClientCertificateRequest &request)const;
|
||||
void createRevokeClientCertificateAsync(const Model::CreateRevokeClientCertificateRequest& request, const CreateRevokeClientCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateRevokeClientCertificateOutcomeCallable createRevokeClientCertificateCallable(const Model::CreateRevokeClientCertificateRequest& request) const;
|
||||
CreateRootCACertificateOutcome createRootCACertificate(const Model::CreateRootCACertificateRequest &request)const;
|
||||
void createRootCACertificateAsync(const Model::CreateRootCACertificateRequest& request, const CreateRootCACertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateRootCACertificateOutcomeCallable createRootCACertificateCallable(const Model::CreateRootCACertificateRequest& request) const;
|
||||
CreateServerCertificateOutcome createServerCertificate(const Model::CreateServerCertificateRequest &request)const;
|
||||
void createServerCertificateAsync(const Model::CreateServerCertificateRequest& request, const CreateServerCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateServerCertificateOutcomeCallable createServerCertificateCallable(const Model::CreateServerCertificateRequest& request) const;
|
||||
CreateServerCertificateWithCsrOutcome createServerCertificateWithCsr(const Model::CreateServerCertificateWithCsrRequest &request)const;
|
||||
void createServerCertificateWithCsrAsync(const Model::CreateServerCertificateWithCsrRequest& request, const CreateServerCertificateWithCsrAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateServerCertificateWithCsrOutcomeCallable createServerCertificateWithCsrCallable(const Model::CreateServerCertificateWithCsrRequest& request) const;
|
||||
CreateSubCACertificateOutcome createSubCACertificate(const Model::CreateSubCACertificateRequest &request)const;
|
||||
void createSubCACertificateAsync(const Model::CreateSubCACertificateRequest& request, const CreateSubCACertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateSubCACertificateOutcomeCallable createSubCACertificateCallable(const Model::CreateSubCACertificateRequest& request) const;
|
||||
DeleteClientCertificateOutcome deleteClientCertificate(const Model::DeleteClientCertificateRequest &request)const;
|
||||
void deleteClientCertificateAsync(const Model::DeleteClientCertificateRequest& request, const DeleteClientCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DeleteClientCertificateOutcomeCallable deleteClientCertificateCallable(const Model::DeleteClientCertificateRequest& request) const;
|
||||
DescribeCACertificateOutcome describeCACertificate(const Model::DescribeCACertificateRequest &request)const;
|
||||
void describeCACertificateAsync(const Model::DescribeCACertificateRequest& request, const DescribeCACertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeCACertificateOutcomeCallable describeCACertificateCallable(const Model::DescribeCACertificateRequest& request) const;
|
||||
DescribeCACertificateCountOutcome describeCACertificateCount(const Model::DescribeCACertificateCountRequest &request)const;
|
||||
void describeCACertificateCountAsync(const Model::DescribeCACertificateCountRequest& request, const DescribeCACertificateCountAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeCACertificateCountOutcomeCallable describeCACertificateCountCallable(const Model::DescribeCACertificateCountRequest& request) const;
|
||||
DescribeCACertificateListOutcome describeCACertificateList(const Model::DescribeCACertificateListRequest &request)const;
|
||||
void describeCACertificateListAsync(const Model::DescribeCACertificateListRequest& request, const DescribeCACertificateListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeCACertificateListOutcomeCallable describeCACertificateListCallable(const Model::DescribeCACertificateListRequest& request) const;
|
||||
DescribeCertificatePrivateKeyOutcome describeCertificatePrivateKey(const Model::DescribeCertificatePrivateKeyRequest &request)const;
|
||||
void describeCertificatePrivateKeyAsync(const Model::DescribeCertificatePrivateKeyRequest& request, const DescribeCertificatePrivateKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeCertificatePrivateKeyOutcomeCallable describeCertificatePrivateKeyCallable(const Model::DescribeCertificatePrivateKeyRequest& request) const;
|
||||
DescribeClientCertificateOutcome describeClientCertificate(const Model::DescribeClientCertificateRequest &request)const;
|
||||
void describeClientCertificateAsync(const Model::DescribeClientCertificateRequest& request, const DescribeClientCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeClientCertificateOutcomeCallable describeClientCertificateCallable(const Model::DescribeClientCertificateRequest& request) const;
|
||||
DescribeClientCertificateStatusOutcome describeClientCertificateStatus(const Model::DescribeClientCertificateStatusRequest &request)const;
|
||||
void describeClientCertificateStatusAsync(const Model::DescribeClientCertificateStatusRequest& request, const DescribeClientCertificateStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeClientCertificateStatusOutcomeCallable describeClientCertificateStatusCallable(const Model::DescribeClientCertificateStatusRequest& request) const;
|
||||
GetCAInstanceStatusOutcome getCAInstanceStatus(const Model::GetCAInstanceStatusRequest &request)const;
|
||||
void getCAInstanceStatusAsync(const Model::GetCAInstanceStatusRequest& request, const GetCAInstanceStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetCAInstanceStatusOutcomeCallable getCAInstanceStatusCallable(const Model::GetCAInstanceStatusRequest& request) const;
|
||||
ListCertOutcome listCert(const Model::ListCertRequest &request)const;
|
||||
void listCertAsync(const Model::ListCertRequest& request, const ListCertAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListCertOutcomeCallable listCertCallable(const Model::ListCertRequest& request) const;
|
||||
ListCertWarehouseOutcome listCertWarehouse(const Model::ListCertWarehouseRequest &request)const;
|
||||
void listCertWarehouseAsync(const Model::ListCertWarehouseRequest& request, const ListCertWarehouseAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListCertWarehouseOutcomeCallable listCertWarehouseCallable(const Model::ListCertWarehouseRequest& request) const;
|
||||
ListUserCertificateOrderOutcome listUserCertificateOrder(const Model::ListUserCertificateOrderRequest &request)const;
|
||||
void listUserCertificateOrderAsync(const Model::ListUserCertificateOrderRequest& request, const ListUserCertificateOrderAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListUserCertificateOrderOutcomeCallable listUserCertificateOrderCallable(const Model::ListUserCertificateOrderRequest& request) const;
|
||||
RenewCertificateOrderForPackageRequestOutcome renewCertificateOrderForPackageRequest(const Model::RenewCertificateOrderForPackageRequestRequest &request)const;
|
||||
void renewCertificateOrderForPackageRequestAsync(const Model::RenewCertificateOrderForPackageRequestRequest& request, const RenewCertificateOrderForPackageRequestAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
RenewCertificateOrderForPackageRequestOutcomeCallable renewCertificateOrderForPackageRequestCallable(const Model::RenewCertificateOrderForPackageRequestRequest& request) const;
|
||||
RevokeWHClientCertificateOutcome revokeWHClientCertificate(const Model::RevokeWHClientCertificateRequest &request)const;
|
||||
void revokeWHClientCertificateAsync(const Model::RevokeWHClientCertificateRequest& request, const RevokeWHClientCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
RevokeWHClientCertificateOutcomeCallable revokeWHClientCertificateCallable(const Model::RevokeWHClientCertificateRequest& request) const;
|
||||
SignOutcome sign(const Model::SignRequest &request)const;
|
||||
void signAsync(const Model::SignRequest& request, const SignAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
SignOutcomeCallable signCallable(const Model::SignRequest& request) const;
|
||||
UploadPCACertOutcome uploadPCACert(const Model::UploadPCACertRequest &request)const;
|
||||
void uploadPCACertAsync(const Model::UploadPCACertRequest& request, const UploadPCACertAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
UploadPCACertOutcomeCallable uploadPCACertCallable(const Model::UploadPCACertRequest& request) const;
|
||||
UploadUserCertificateOutcome uploadUserCertificate(const Model::UploadUserCertificateRequest &request)const;
|
||||
void uploadUserCertificateAsync(const Model::UploadUserCertificateRequest& request, const UploadUserCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
UploadUserCertificateOutcomeCallable uploadUserCertificateCallable(const Model::UploadUserCertificateRequest& request) const;
|
||||
VerifyOutcome verify(const Model::VerifyRequest &request)const;
|
||||
void verifyAsync(const Model::VerifyRequest& request, const VerifyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
VerifyOutcomeCallable verifyCallable(const Model::VerifyRequest& request) const;
|
||||
ListClientCertificateOutcome listClientCertificate(const Model::ListClientCertificateRequest &request)const;
|
||||
void listClientCertificateAsync(const Model::ListClientCertificateRequest& request, const ListClientCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListClientCertificateOutcomeCallable listClientCertificateCallable(const Model::ListClientCertificateRequest& request) const;
|
||||
ListPcaCaCertificateOutcome listPcaCaCertificate(const Model::ListPcaCaCertificateRequest &request)const;
|
||||
void listPcaCaCertificateAsync(const Model::ListPcaCaCertificateRequest& request, const ListPcaCaCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListPcaCaCertificateOutcomeCallable listPcaCaCertificateCallable(const Model::ListPcaCaCertificateRequest& request) const;
|
||||
ListRevokeCertificateOutcome listRevokeCertificate(const Model::ListRevokeCertificateRequest &request)const;
|
||||
void listRevokeCertificateAsync(const Model::ListRevokeCertificateRequest& request, const ListRevokeCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListRevokeCertificateOutcomeCallable listRevokeCertificateCallable(const Model::ListRevokeCertificateRequest& request) const;
|
||||
UpdateCACertificateStatusOutcome updateCACertificateStatus(const Model::UpdateCACertificateStatusRequest &request)const;
|
||||
void updateCACertificateStatusAsync(const Model::UpdateCACertificateStatusRequest& request, const UpdateCACertificateStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
UpdateCACertificateStatusOutcomeCallable updateCACertificateStatusCallable(const Model::UpdateCACertificateStatusRequest& request) const;
|
||||
UploadPcaCertToCasOutcome uploadPcaCertToCas(const Model::UploadPcaCertToCasRequest &request)const;
|
||||
void uploadPcaCertToCasAsync(const Model::UploadPcaCertToCasRequest& request, const UploadPcaCertToCasAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
UploadPcaCertToCasOutcomeCallable uploadPcaCertToCasCallable(const Model::UploadPcaCertToCasRequest& request) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_CAS_MODEL_CANCELCERTIFICATEFORPACKAGEREQUESTREQUEST_H_
|
||||
#define ALIBABACLOUD_CAS_MODEL_CANCELCERTIFICATEFORPACKAGEREQUESTREQUEST_H_
|
||||
|
||||
#include <alibabacloud/cas/CasExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Cas {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_CAS_EXPORT CancelCertificateForPackageRequestRequest : public RpcServiceRequest {
|
||||
public:
|
||||
CancelCertificateForPackageRequestRequest();
|
||||
~CancelCertificateForPackageRequestRequest();
|
||||
long getOrderId() const;
|
||||
void setOrderId(long orderId);
|
||||
std::string getSourceIp() const;
|
||||
void setSourceIp(const std::string &sourceIp);
|
||||
|
||||
private:
|
||||
long orderId_;
|
||||
std::string sourceIp_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Cas
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_CAS_MODEL_CANCELCERTIFICATEFORPACKAGEREQUESTREQUEST_H_
|
||||
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_CAS_MODEL_CANCELCERTIFICATEFORPACKAGEREQUESTRESULT_H_
|
||||
#define ALIBABACLOUD_CAS_MODEL_CANCELCERTIFICATEFORPACKAGEREQUESTRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/cas/CasExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cas
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CAS_EXPORT CancelCertificateForPackageRequestResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
CancelCertificateForPackageRequestResult();
|
||||
explicit CancelCertificateForPackageRequestResult(const std::string &payload);
|
||||
~CancelCertificateForPackageRequestResult();
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CAS_MODEL_CANCELCERTIFICATEFORPACKAGEREQUESTRESULT_H_
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_CAS_MODEL_CANCELORDERREQUESTREQUEST_H_
|
||||
#define ALIBABACLOUD_CAS_MODEL_CANCELORDERREQUESTREQUEST_H_
|
||||
|
||||
#include <alibabacloud/cas/CasExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Cas {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_CAS_EXPORT CancelOrderRequestRequest : public RpcServiceRequest {
|
||||
public:
|
||||
CancelOrderRequestRequest();
|
||||
~CancelOrderRequestRequest();
|
||||
long getOrderId() const;
|
||||
void setOrderId(long orderId);
|
||||
std::string getSourceIp() const;
|
||||
void setSourceIp(const std::string &sourceIp);
|
||||
|
||||
private:
|
||||
long orderId_;
|
||||
std::string sourceIp_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Cas
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_CAS_MODEL_CANCELORDERREQUESTREQUEST_H_
|
||||
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_CAS_MODEL_CANCELORDERREQUESTRESULT_H_
|
||||
#define ALIBABACLOUD_CAS_MODEL_CANCELORDERREQUESTRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/cas/CasExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cas
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CAS_EXPORT CancelOrderRequestResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
CancelOrderRequestResult();
|
||||
explicit CancelOrderRequestResult(const std::string &payload);
|
||||
~CancelOrderRequestResult();
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CAS_MODEL_CANCELORDERREQUESTRESULT_H_
|
||||
@@ -1,66 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_CAS_MODEL_CREATECERTIFICATEFORPACKAGEREQUESTREQUEST_H_
|
||||
#define ALIBABACLOUD_CAS_MODEL_CREATECERTIFICATEFORPACKAGEREQUESTREQUEST_H_
|
||||
|
||||
#include <alibabacloud/cas/CasExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Cas {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_CAS_EXPORT CreateCertificateForPackageRequestRequest : public RpcServiceRequest {
|
||||
public:
|
||||
CreateCertificateForPackageRequestRequest();
|
||||
~CreateCertificateForPackageRequestRequest();
|
||||
std::string getProductCode() const;
|
||||
void setProductCode(const std::string &productCode);
|
||||
std::string getCsr() const;
|
||||
void setCsr(const std::string &csr);
|
||||
std::string getValidateType() const;
|
||||
void setValidateType(const std::string &validateType);
|
||||
std::string getSourceIp() const;
|
||||
void setSourceIp(const std::string &sourceIp);
|
||||
std::string getEmail() const;
|
||||
void setEmail(const std::string &email);
|
||||
std::string getPhone() const;
|
||||
void setPhone(const std::string &phone);
|
||||
std::string getCompanyName() const;
|
||||
void setCompanyName(const std::string &companyName);
|
||||
std::string getDomain() const;
|
||||
void setDomain(const std::string &domain);
|
||||
std::string getUsername() const;
|
||||
void setUsername(const std::string &username);
|
||||
|
||||
private:
|
||||
std::string productCode_;
|
||||
std::string csr_;
|
||||
std::string validateType_;
|
||||
std::string sourceIp_;
|
||||
std::string email_;
|
||||
std::string phone_;
|
||||
std::string companyName_;
|
||||
std::string domain_;
|
||||
std::string username_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Cas
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_CAS_MODEL_CREATECERTIFICATEFORPACKAGEREQUESTREQUEST_H_
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_CAS_MODEL_CREATECERTIFICATEFORPACKAGEREQUESTRESULT_H_
|
||||
#define ALIBABACLOUD_CAS_MODEL_CREATECERTIFICATEFORPACKAGEREQUESTRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/cas/CasExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cas
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CAS_EXPORT CreateCertificateForPackageRequestResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
CreateCertificateForPackageRequestResult();
|
||||
explicit CreateCertificateForPackageRequestResult(const std::string &payload);
|
||||
~CreateCertificateForPackageRequestResult();
|
||||
long getOrderId()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
long orderId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CAS_MODEL_CREATECERTIFICATEFORPACKAGEREQUESTRESULT_H_
|
||||
@@ -1,60 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_CAS_MODEL_CREATECERTIFICATEREQUESTREQUEST_H_
|
||||
#define ALIBABACLOUD_CAS_MODEL_CREATECERTIFICATEREQUESTREQUEST_H_
|
||||
|
||||
#include <alibabacloud/cas/CasExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Cas {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_CAS_EXPORT CreateCertificateRequestRequest : public RpcServiceRequest {
|
||||
public:
|
||||
CreateCertificateRequestRequest();
|
||||
~CreateCertificateRequestRequest();
|
||||
std::string getSourceIp() const;
|
||||
void setSourceIp(const std::string &sourceIp);
|
||||
std::string getProductCode() const;
|
||||
void setProductCode(const std::string &productCode);
|
||||
std::string getUsername() const;
|
||||
void setUsername(const std::string &username);
|
||||
std::string getPhone() const;
|
||||
void setPhone(const std::string &phone);
|
||||
std::string getEmail() const;
|
||||
void setEmail(const std::string &email);
|
||||
std::string getDomain() const;
|
||||
void setDomain(const std::string &domain);
|
||||
std::string getValidateType() const;
|
||||
void setValidateType(const std::string &validateType);
|
||||
|
||||
private:
|
||||
std::string sourceIp_;
|
||||
std::string productCode_;
|
||||
std::string username_;
|
||||
std::string phone_;
|
||||
std::string email_;
|
||||
std::string domain_;
|
||||
std::string validateType_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Cas
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_CAS_MODEL_CREATECERTIFICATEREQUESTREQUEST_H_
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_CAS_MODEL_CREATECERTIFICATEREQUESTRESULT_H_
|
||||
#define ALIBABACLOUD_CAS_MODEL_CREATECERTIFICATEREQUESTRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/cas/CasExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cas
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CAS_EXPORT CreateCertificateRequestResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
CreateCertificateRequestResult();
|
||||
explicit CreateCertificateRequestResult(const std::string &payload);
|
||||
~CreateCertificateRequestResult();
|
||||
long getOrderId()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
long orderId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CAS_MODEL_CREATECERTIFICATEREQUESTRESULT_H_
|
||||
@@ -1,60 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_CAS_MODEL_CREATECERTIFICATEWITHCSRREQUESTREQUEST_H_
|
||||
#define ALIBABACLOUD_CAS_MODEL_CREATECERTIFICATEWITHCSRREQUESTREQUEST_H_
|
||||
|
||||
#include <alibabacloud/cas/CasExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Cas {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_CAS_EXPORT CreateCertificateWithCsrRequestRequest : public RpcServiceRequest {
|
||||
public:
|
||||
CreateCertificateWithCsrRequestRequest();
|
||||
~CreateCertificateWithCsrRequestRequest();
|
||||
std::string getSourceIp() const;
|
||||
void setSourceIp(const std::string &sourceIp);
|
||||
std::string getCsr() const;
|
||||
void setCsr(const std::string &csr);
|
||||
std::string getProductCode() const;
|
||||
void setProductCode(const std::string &productCode);
|
||||
std::string getUsername() const;
|
||||
void setUsername(const std::string &username);
|
||||
std::string getPhone() const;
|
||||
void setPhone(const std::string &phone);
|
||||
std::string getEmail() const;
|
||||
void setEmail(const std::string &email);
|
||||
std::string getValidateType() const;
|
||||
void setValidateType(const std::string &validateType);
|
||||
|
||||
private:
|
||||
std::string sourceIp_;
|
||||
std::string csr_;
|
||||
std::string productCode_;
|
||||
std::string username_;
|
||||
std::string phone_;
|
||||
std::string email_;
|
||||
std::string validateType_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Cas
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_CAS_MODEL_CREATECERTIFICATEWITHCSRREQUESTREQUEST_H_
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_CAS_MODEL_CREATECERTIFICATEWITHCSRREQUESTRESULT_H_
|
||||
#define ALIBABACLOUD_CAS_MODEL_CREATECERTIFICATEWITHCSRREQUESTRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/cas/CasExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cas
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CAS_EXPORT CreateCertificateWithCsrRequestResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
CreateCertificateWithCsrRequestResult();
|
||||
explicit CreateCertificateWithCsrRequestResult(const std::string &payload);
|
||||
~CreateCertificateWithCsrRequestResult();
|
||||
long getOrderId()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
long orderId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CAS_MODEL_CREATECERTIFICATEWITHCSRREQUESTRESULT_H_
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_CAS_MODEL_CREATECLIENTCERTIFICATEREQUEST_H_
|
||||
#define ALIBABACLOUD_CAS_MODEL_CREATECLIENTCERTIFICATEREQUEST_H_
|
||||
|
||||
#include <alibabacloud/cas/CasExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Cas {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_CAS_EXPORT CreateClientCertificateRequest : public RpcServiceRequest {
|
||||
public:
|
||||
CreateClientCertificateRequest();
|
||||
~CreateClientCertificateRequest();
|
||||
std::string getCountry() const;
|
||||
void setCountry(const std::string &country);
|
||||
int getMonths() const;
|
||||
void setMonths(int months);
|
||||
long getEnableCrl() const;
|
||||
void setEnableCrl(long enableCrl);
|
||||
long getAfterTime() const;
|
||||
void setAfterTime(long afterTime);
|
||||
std::string getLocality() const;
|
||||
void setLocality(const std::string &locality);
|
||||
int getImmediately() const;
|
||||
void setImmediately(int immediately);
|
||||
int getYears() const;
|
||||
void setYears(int years);
|
||||
std::string getCommonName() const;
|
||||
void setCommonName(const std::string &commonName);
|
||||
std::string getOrganization() const;
|
||||
void setOrganization(const std::string &organization);
|
||||
int getDays() const;
|
||||
void setDays(int days);
|
||||
long getBeforeTime() const;
|
||||
void setBeforeTime(long beforeTime);
|
||||
std::string getState() const;
|
||||
void setState(const std::string &state);
|
||||
std::string getParentIdentifier() const;
|
||||
void setParentIdentifier(const std::string &parentIdentifier);
|
||||
std::string getOrganizationUnit() const;
|
||||
void setOrganizationUnit(const std::string &organizationUnit);
|
||||
std::string getAlgorithm() const;
|
||||
void setAlgorithm(const std::string &algorithm);
|
||||
int getSanType() const;
|
||||
void setSanType(int sanType);
|
||||
std::string getSanValue() const;
|
||||
void setSanValue(const std::string &sanValue);
|
||||
|
||||
private:
|
||||
std::string country_;
|
||||
int months_;
|
||||
long enableCrl_;
|
||||
long afterTime_;
|
||||
std::string locality_;
|
||||
int immediately_;
|
||||
int years_;
|
||||
std::string commonName_;
|
||||
std::string organization_;
|
||||
int days_;
|
||||
long beforeTime_;
|
||||
std::string state_;
|
||||
std::string parentIdentifier_;
|
||||
std::string organizationUnit_;
|
||||
std::string algorithm_;
|
||||
int sanType_;
|
||||
std::string sanValue_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Cas
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_CAS_MODEL_CREATECLIENTCERTIFICATEREQUEST_H_
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* 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_CAS_MODEL_CREATECLIENTCERTIFICATERESULT_H_
|
||||
#define ALIBABACLOUD_CAS_MODEL_CREATECLIENTCERTIFICATERESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/cas/CasExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cas
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CAS_EXPORT CreateClientCertificateResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
CreateClientCertificateResult();
|
||||
explicit CreateClientCertificateResult(const std::string &payload);
|
||||
~CreateClientCertificateResult();
|
||||
std::string getIdentifier()const;
|
||||
std::string getSerialNumber()const;
|
||||
std::string getParentX509Certificate()const;
|
||||
std::string getCertificateChain()const;
|
||||
std::string getRootX509Certificate()const;
|
||||
std::string getX509Certificate()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string identifier_;
|
||||
std::string serialNumber_;
|
||||
std::string parentX509Certificate_;
|
||||
std::string certificateChain_;
|
||||
std::string rootX509Certificate_;
|
||||
std::string x509Certificate_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CAS_MODEL_CREATECLIENTCERTIFICATERESULT_H_
|
||||
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* 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_CAS_MODEL_CREATECLIENTCERTIFICATEWITHCSRREQUEST_H_
|
||||
#define ALIBABACLOUD_CAS_MODEL_CREATECLIENTCERTIFICATEWITHCSRREQUEST_H_
|
||||
|
||||
#include <alibabacloud/cas/CasExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Cas {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_CAS_EXPORT CreateClientCertificateWithCsrRequest : public RpcServiceRequest {
|
||||
public:
|
||||
CreateClientCertificateWithCsrRequest();
|
||||
~CreateClientCertificateWithCsrRequest();
|
||||
std::string getCountry() const;
|
||||
void setCountry(const std::string &country);
|
||||
int getMonths() const;
|
||||
void setMonths(int months);
|
||||
long getEnableCrl() const;
|
||||
void setEnableCrl(long enableCrl);
|
||||
long getAfterTime() const;
|
||||
void setAfterTime(long afterTime);
|
||||
std::string getLocality() const;
|
||||
void setLocality(const std::string &locality);
|
||||
int getImmediately() const;
|
||||
void setImmediately(int immediately);
|
||||
int getYears() const;
|
||||
void setYears(int years);
|
||||
std::string getCommonName() const;
|
||||
void setCommonName(const std::string &commonName);
|
||||
std::string getOrganization() const;
|
||||
void setOrganization(const std::string &organization);
|
||||
int getDays() const;
|
||||
void setDays(int days);
|
||||
long getBeforeTime() const;
|
||||
void setBeforeTime(long beforeTime);
|
||||
std::string getState() const;
|
||||
void setState(const std::string &state);
|
||||
std::string getParentIdentifier() const;
|
||||
void setParentIdentifier(const std::string &parentIdentifier);
|
||||
std::string getOrganizationUnit() const;
|
||||
void setOrganizationUnit(const std::string &organizationUnit);
|
||||
std::string getAlgorithm() const;
|
||||
void setAlgorithm(const std::string &algorithm);
|
||||
std::string getCsr() const;
|
||||
void setCsr(const std::string &csr);
|
||||
int getSanType() const;
|
||||
void setSanType(int sanType);
|
||||
std::string getSanValue() const;
|
||||
void setSanValue(const std::string &sanValue);
|
||||
|
||||
private:
|
||||
std::string country_;
|
||||
int months_;
|
||||
long enableCrl_;
|
||||
long afterTime_;
|
||||
std::string locality_;
|
||||
int immediately_;
|
||||
int years_;
|
||||
std::string commonName_;
|
||||
std::string organization_;
|
||||
int days_;
|
||||
long beforeTime_;
|
||||
std::string state_;
|
||||
std::string parentIdentifier_;
|
||||
std::string organizationUnit_;
|
||||
std::string algorithm_;
|
||||
std::string csr_;
|
||||
int sanType_;
|
||||
std::string sanValue_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Cas
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_CAS_MODEL_CREATECLIENTCERTIFICATEWITHCSRREQUEST_H_
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_CAS_MODEL_CREATECLIENTCERTIFICATEWITHCSRRESULT_H_
|
||||
#define ALIBABACLOUD_CAS_MODEL_CREATECLIENTCERTIFICATEWITHCSRRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/cas/CasExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cas
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CAS_EXPORT CreateClientCertificateWithCsrResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
CreateClientCertificateWithCsrResult();
|
||||
explicit CreateClientCertificateWithCsrResult(const std::string &payload);
|
||||
~CreateClientCertificateWithCsrResult();
|
||||
std::string getCertKmcRep1()const;
|
||||
std::string getIdentifier()const;
|
||||
std::string getSerialNumber()const;
|
||||
std::string getParentX509Certificate()const;
|
||||
std::string getCertificateChain()const;
|
||||
std::string getRootX509Certificate()const;
|
||||
std::string getX509Certificate()const;
|
||||
std::string getCertSignBufKmc()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string certKmcRep1_;
|
||||
std::string identifier_;
|
||||
std::string serialNumber_;
|
||||
std::string parentX509Certificate_;
|
||||
std::string certificateChain_;
|
||||
std::string rootX509Certificate_;
|
||||
std::string x509Certificate_;
|
||||
std::string certSignBufKmc_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CAS_MODEL_CREATECLIENTCERTIFICATEWITHCSRRESULT_H_
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_CAS_MODEL_CREATECUSTOMCERTIFICATEREQUEST_H_
|
||||
#define ALIBABACLOUD_CAS_MODEL_CREATECUSTOMCERTIFICATEREQUEST_H_
|
||||
|
||||
#include <alibabacloud/cas/CasExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Cas {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_CAS_EXPORT CreateCustomCertificateRequest : public RpcServiceRequest {
|
||||
public:
|
||||
struct ApiPassthrough {
|
||||
struct Subject {
|
||||
std::string country;
|
||||
std::string state;
|
||||
std::string locality;
|
||||
std::string organization;
|
||||
std::string organizationUnit;
|
||||
std::string commonName;
|
||||
struct CustomAttributesItem {
|
||||
std::string objectIdentifier;
|
||||
std::string value;
|
||||
};
|
||||
CustomAttributesItem customAttributesItem;
|
||||
std::vector<CustomAttributesItem> customAttributes;
|
||||
};
|
||||
Subject subject;
|
||||
struct Extensions {
|
||||
struct KeyUsage {
|
||||
bool digitalSignature;
|
||||
bool contentCommitment;
|
||||
bool nonRepudiation;
|
||||
bool keyEncipherment;
|
||||
bool dataEncipherment;
|
||||
bool keyAgreement;
|
||||
bool encipherOnly;
|
||||
bool decipherOnly;
|
||||
};
|
||||
KeyUsage keyUsage;
|
||||
std::string string;
|
||||
std::vector<std::string> extendedKeyUsages;
|
||||
struct SubjectAlternativeNamesItem {
|
||||
std::string type;
|
||||
std::string value;
|
||||
};
|
||||
SubjectAlternativeNamesItem subjectAlternativeNamesItem;
|
||||
std::vector<SubjectAlternativeNamesItem> subjectAlternativeNames;
|
||||
std::string string;
|
||||
std::vector<std::string> criticals;
|
||||
};
|
||||
Extensions extensions;
|
||||
std::string serialNumber;
|
||||
};
|
||||
CreateCustomCertificateRequest();
|
||||
~CreateCustomCertificateRequest();
|
||||
std::string getCsr() const;
|
||||
void setCsr(const std::string &csr);
|
||||
long getEnableCrl() const;
|
||||
void setEnableCrl(long enableCrl);
|
||||
int getImmediately() const;
|
||||
void setImmediately(int immediately);
|
||||
std::string getParentIdentifier() const;
|
||||
void setParentIdentifier(const std::string &parentIdentifier);
|
||||
std::string getValidity() const;
|
||||
void setValidity(const std::string &validity);
|
||||
ApiPassthrough getApiPassthrough() const;
|
||||
void setApiPassthrough(const ApiPassthrough &apiPassthrough);
|
||||
|
||||
private:
|
||||
std::string csr_;
|
||||
long enableCrl_;
|
||||
int immediately_;
|
||||
std::string parentIdentifier_;
|
||||
std::string validity_;
|
||||
ApiPassthrough apiPassthrough_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Cas
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_CAS_MODEL_CREATECUSTOMCERTIFICATEREQUEST_H_
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_CAS_MODEL_CREATECUSTOMCERTIFICATERESULT_H_
|
||||
#define ALIBABACLOUD_CAS_MODEL_CREATECUSTOMCERTIFICATERESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/cas/CasExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cas
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CAS_EXPORT CreateCustomCertificateResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
CreateCustomCertificateResult();
|
||||
explicit CreateCustomCertificateResult(const std::string &payload);
|
||||
~CreateCustomCertificateResult();
|
||||
std::string getIdentifier()const;
|
||||
std::string getSerialNumber()const;
|
||||
std::string getCertificateChain()const;
|
||||
std::string getCertificate()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string identifier_;
|
||||
std::string serialNumber_;
|
||||
std::string certificateChain_;
|
||||
std::string certificate_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CAS_MODEL_CREATECUSTOMCERTIFICATERESULT_H_
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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_CAS_MODEL_CREATEEXTERNALCACERTIFICATEREQUEST_H_
|
||||
#define ALIBABACLOUD_CAS_MODEL_CREATEEXTERNALCACERTIFICATEREQUEST_H_
|
||||
|
||||
#include <alibabacloud/cas/CasExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Cas {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_CAS_EXPORT CreateExternalCACertificateRequest : public RpcServiceRequest {
|
||||
public:
|
||||
struct ApiPassthrough {
|
||||
struct Subject {
|
||||
std::string country;
|
||||
std::string state;
|
||||
std::string locality;
|
||||
std::string organization;
|
||||
std::string organizationUnit;
|
||||
std::string commonName;
|
||||
};
|
||||
Subject subject;
|
||||
struct Extensions {
|
||||
int pathLenConstraint;
|
||||
std::string string;
|
||||
std::vector<std::string> extendedKeyUsages;
|
||||
};
|
||||
Extensions extensions;
|
||||
};
|
||||
CreateExternalCACertificateRequest();
|
||||
~CreateExternalCACertificateRequest();
|
||||
std::string getCsr() const;
|
||||
void setCsr(const std::string &csr);
|
||||
std::string getInstanceId() const;
|
||||
void setInstanceId(const std::string &instanceId);
|
||||
std::string getAutoTesting() const;
|
||||
void setAutoTesting(const std::string &autoTesting);
|
||||
std::string getValidity() const;
|
||||
void setValidity(const std::string &validity);
|
||||
ApiPassthrough getApiPassthrough() const;
|
||||
void setApiPassthrough(const ApiPassthrough &apiPassthrough);
|
||||
|
||||
private:
|
||||
std::string csr_;
|
||||
std::string instanceId_;
|
||||
std::string autoTesting_;
|
||||
std::string validity_;
|
||||
ApiPassthrough apiPassthrough_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Cas
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_CAS_MODEL_CREATEEXTERNALCACERTIFICATEREQUEST_H_
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_CAS_MODEL_CREATEEXTERNALCACERTIFICATERESULT_H_
|
||||
#define ALIBABACLOUD_CAS_MODEL_CREATEEXTERNALCACERTIFICATERESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/cas/CasExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cas
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CAS_EXPORT CreateExternalCACertificateResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
CreateExternalCACertificateResult();
|
||||
explicit CreateExternalCACertificateResult(const std::string &payload);
|
||||
~CreateExternalCACertificateResult();
|
||||
std::string getIdentifier()const;
|
||||
std::string getCertificateChain()const;
|
||||
std::string getCertificate()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string identifier_;
|
||||
std::string certificateChain_;
|
||||
std::string certificate_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CAS_MODEL_CREATEEXTERNALCACERTIFICATERESULT_H_
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_CAS_MODEL_CREATEREVOKECLIENTCERTIFICATEREQUEST_H_
|
||||
#define ALIBABACLOUD_CAS_MODEL_CREATEREVOKECLIENTCERTIFICATEREQUEST_H_
|
||||
|
||||
#include <alibabacloud/cas/CasExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Cas {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_CAS_EXPORT CreateRevokeClientCertificateRequest : public RpcServiceRequest {
|
||||
public:
|
||||
CreateRevokeClientCertificateRequest();
|
||||
~CreateRevokeClientCertificateRequest();
|
||||
std::string getIdentifier() const;
|
||||
void setIdentifier(const std::string &identifier);
|
||||
|
||||
private:
|
||||
std::string identifier_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Cas
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_CAS_MODEL_CREATEREVOKECLIENTCERTIFICATEREQUEST_H_
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user