Compare commits
116 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 | ||
|
|
04ef9028c2 | ||
|
|
ff5406a429 | ||
|
|
18687c978c | ||
|
|
5416b57b75 | ||
|
|
43d3080407 | ||
|
|
fe745e81c4 | ||
|
|
e05ba433d0 | ||
|
|
19026e1ca1 | ||
|
|
4d0d423351 | ||
|
|
5d774bf4d2 | ||
|
|
5c863a0c43 | ||
|
|
d5a286f460 | ||
|
|
055e9fa24d | ||
|
|
779a64ae99 | ||
|
|
689a48e2ef | ||
|
|
c32d539146 | ||
|
|
348726cb09 | ||
|
|
5edf5643a2 | ||
|
|
5cdab50afe | ||
|
|
cb3e058f3f | ||
|
|
e2c46d1143 | ||
|
|
3b852794f3 | ||
|
|
16d6566bf7 |
@@ -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).
|
||||
|
||||
|
||||
102
aimath/CMakeLists.txt
Normal file
102
aimath/CMakeLists.txt
Normal file
@@ -0,0 +1,102 @@
|
||||
#
|
||||
# Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
||||
|
||||
set(aimath_public_header
|
||||
include/alibabacloud/aimath/AIMathClient.h
|
||||
include/alibabacloud/aimath/AIMathExport.h )
|
||||
|
||||
set(aimath_public_header_model
|
||||
include/alibabacloud/aimath/model/GenAnalysisRequest.h
|
||||
include/alibabacloud/aimath/model/GenAnalysisResult.h
|
||||
include/alibabacloud/aimath/model/GenStepRequest.h
|
||||
include/alibabacloud/aimath/model/GenStepResult.h
|
||||
include/alibabacloud/aimath/model/GlobalConfirmRequest.h
|
||||
include/alibabacloud/aimath/model/GlobalConfirmResult.h
|
||||
include/alibabacloud/aimath/model/UpdateAnalysisRequest.h
|
||||
include/alibabacloud/aimath/model/UpdateAnalysisResult.h
|
||||
include/alibabacloud/aimath/model/UpdateStepRequest.h
|
||||
include/alibabacloud/aimath/model/UpdateStepResult.h )
|
||||
|
||||
set(aimath_src
|
||||
src/AIMathClient.cc
|
||||
src/model/GenAnalysisRequest.cc
|
||||
src/model/GenAnalysisResult.cc
|
||||
src/model/GenStepRequest.cc
|
||||
src/model/GenStepResult.cc
|
||||
src/model/GlobalConfirmRequest.cc
|
||||
src/model/GlobalConfirmResult.cc
|
||||
src/model/UpdateAnalysisRequest.cc
|
||||
src/model/UpdateAnalysisResult.cc
|
||||
src/model/UpdateStepRequest.cc
|
||||
src/model/UpdateStepResult.cc )
|
||||
|
||||
add_library(aimath ${LIB_TYPE}
|
||||
${aimath_public_header}
|
||||
${aimath_public_header_model}
|
||||
${aimath_src})
|
||||
|
||||
set_target_properties(aimath
|
||||
PROPERTIES
|
||||
LINKER_LANGUAGE CXX
|
||||
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}aimath
|
||||
)
|
||||
|
||||
if(${LIB_TYPE} STREQUAL "SHARED")
|
||||
set_target_properties(aimath
|
||||
PROPERTIES
|
||||
DEFINE_SYMBOL ALIBABACLOUD_AIMATH_LIBRARY)
|
||||
endif()
|
||||
|
||||
target_include_directories(aimath
|
||||
PRIVATE include
|
||||
${CMAKE_SOURCE_DIR}/core/include
|
||||
)
|
||||
target_link_libraries(aimath
|
||||
core)
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
|
||||
set(jsoncpp_install_dir ${INSTALL_DIR})
|
||||
add_dependencies(aimath
|
||||
jsoncpp)
|
||||
target_include_directories(aimath
|
||||
PRIVATE ${jsoncpp_install_dir}/include)
|
||||
target_link_libraries(aimath
|
||||
${jsoncpp_install_dir}/lib/jsoncpp.lib)
|
||||
set_target_properties(aimath
|
||||
PROPERTIES
|
||||
COMPILE_OPTIONS "/bigobj")
|
||||
else()
|
||||
target_include_directories(aimath
|
||||
PRIVATE /usr/include/jsoncpp)
|
||||
target_link_libraries(aimath
|
||||
jsoncpp)
|
||||
endif()
|
||||
|
||||
install(FILES ${aimath_public_header}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/aimath)
|
||||
install(FILES ${aimath_public_header_model}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/aimath/model)
|
||||
install(TARGETS aimath
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
86
aimath/include/alibabacloud/aimath/AIMathClient.h
Normal file
86
aimath/include/alibabacloud/aimath/AIMathClient.h
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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_AIMATH_AIMATHCLIENT_H_
|
||||
#define ALIBABACLOUD_AIMATH_AIMATHCLIENT_H_
|
||||
|
||||
#include <future>
|
||||
#include <alibabacloud/core/AsyncCallerContext.h>
|
||||
#include <alibabacloud/core/EndpointProvider.h>
|
||||
#include <alibabacloud/core/RpcServiceClient.h>
|
||||
#include "AIMathExport.h"
|
||||
#include "model/GenAnalysisRequest.h"
|
||||
#include "model/GenAnalysisResult.h"
|
||||
#include "model/GenStepRequest.h"
|
||||
#include "model/GenStepResult.h"
|
||||
#include "model/GlobalConfirmRequest.h"
|
||||
#include "model/GlobalConfirmResult.h"
|
||||
#include "model/UpdateAnalysisRequest.h"
|
||||
#include "model/UpdateAnalysisResult.h"
|
||||
#include "model/UpdateStepRequest.h"
|
||||
#include "model/UpdateStepResult.h"
|
||||
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AIMath
|
||||
{
|
||||
class ALIBABACLOUD_AIMATH_EXPORT AIMathClient : public RpcServiceClient
|
||||
{
|
||||
public:
|
||||
typedef Outcome<Error, Model::GenAnalysisResult> GenAnalysisOutcome;
|
||||
typedef std::future<GenAnalysisOutcome> GenAnalysisOutcomeCallable;
|
||||
typedef std::function<void(const AIMathClient*, const Model::GenAnalysisRequest&, const GenAnalysisOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GenAnalysisAsyncHandler;
|
||||
typedef Outcome<Error, Model::GenStepResult> GenStepOutcome;
|
||||
typedef std::future<GenStepOutcome> GenStepOutcomeCallable;
|
||||
typedef std::function<void(const AIMathClient*, const Model::GenStepRequest&, const GenStepOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GenStepAsyncHandler;
|
||||
typedef Outcome<Error, Model::GlobalConfirmResult> GlobalConfirmOutcome;
|
||||
typedef std::future<GlobalConfirmOutcome> GlobalConfirmOutcomeCallable;
|
||||
typedef std::function<void(const AIMathClient*, const Model::GlobalConfirmRequest&, const GlobalConfirmOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GlobalConfirmAsyncHandler;
|
||||
typedef Outcome<Error, Model::UpdateAnalysisResult> UpdateAnalysisOutcome;
|
||||
typedef std::future<UpdateAnalysisOutcome> UpdateAnalysisOutcomeCallable;
|
||||
typedef std::function<void(const AIMathClient*, const Model::UpdateAnalysisRequest&, const UpdateAnalysisOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateAnalysisAsyncHandler;
|
||||
typedef Outcome<Error, Model::UpdateStepResult> UpdateStepOutcome;
|
||||
typedef std::future<UpdateStepOutcome> UpdateStepOutcomeCallable;
|
||||
typedef std::function<void(const AIMathClient*, const Model::UpdateStepRequest&, const UpdateStepOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateStepAsyncHandler;
|
||||
|
||||
AIMathClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||
AIMathClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||
AIMathClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||
~AIMathClient();
|
||||
GenAnalysisOutcome genAnalysis(const Model::GenAnalysisRequest &request)const;
|
||||
void genAnalysisAsync(const Model::GenAnalysisRequest& request, const GenAnalysisAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GenAnalysisOutcomeCallable genAnalysisCallable(const Model::GenAnalysisRequest& request) const;
|
||||
GenStepOutcome genStep(const Model::GenStepRequest &request)const;
|
||||
void genStepAsync(const Model::GenStepRequest& request, const GenStepAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GenStepOutcomeCallable genStepCallable(const Model::GenStepRequest& request) const;
|
||||
GlobalConfirmOutcome globalConfirm(const Model::GlobalConfirmRequest &request)const;
|
||||
void globalConfirmAsync(const Model::GlobalConfirmRequest& request, const GlobalConfirmAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GlobalConfirmOutcomeCallable globalConfirmCallable(const Model::GlobalConfirmRequest& request) const;
|
||||
UpdateAnalysisOutcome updateAnalysis(const Model::UpdateAnalysisRequest &request)const;
|
||||
void updateAnalysisAsync(const Model::UpdateAnalysisRequest& request, const UpdateAnalysisAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
UpdateAnalysisOutcomeCallable updateAnalysisCallable(const Model::UpdateAnalysisRequest& request) const;
|
||||
UpdateStepOutcome updateStep(const Model::UpdateStepRequest &request)const;
|
||||
void updateStepAsync(const Model::UpdateStepRequest& request, const UpdateStepAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
UpdateStepOutcomeCallable updateStepCallable(const Model::UpdateStepRequest& request) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // !ALIBABACLOUD_AIMATH_AIMATHCLIENT_H_
|
||||
32
aimath/include/alibabacloud/aimath/AIMathExport.h
Normal file
32
aimath/include/alibabacloud/aimath/AIMathExport.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_AIMATH_AIMATHEXPORT_H_
|
||||
#define ALIBABACLOUD_AIMATH_AIMATHEXPORT_H_
|
||||
|
||||
#include <alibabacloud/core/Global.h>
|
||||
|
||||
#if defined(ALIBABACLOUD_SHARED)
|
||||
# if defined(ALIBABACLOUD_AIMATH_LIBRARY)
|
||||
# define ALIBABACLOUD_AIMATH_EXPORT ALIBABACLOUD_DECL_EXPORT
|
||||
# else
|
||||
# define ALIBABACLOUD_AIMATH_EXPORT ALIBABACLOUD_DECL_IMPORT
|
||||
# endif
|
||||
#else
|
||||
# define ALIBABACLOUD_AIMATH_EXPORT
|
||||
#endif
|
||||
|
||||
#endif // !ALIBABACLOUD_AIMATH_AIMATHEXPORT_H_
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_AIMATH_MODEL_GENANALYSISREQUEST_H_
|
||||
#define ALIBABACLOUD_AIMATH_MODEL_GENANALYSISREQUEST_H_
|
||||
|
||||
#include <alibabacloud/aimath/AIMathExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AIMath {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_AIMATH_EXPORT GenAnalysisRequest : public RpcServiceRequest {
|
||||
public:
|
||||
GenAnalysisRequest();
|
||||
~GenAnalysisRequest();
|
||||
std::string getExerciseContent() const;
|
||||
void setExerciseContent(const std::string &exerciseContent);
|
||||
|
||||
private:
|
||||
std::string exerciseContent_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AIMath
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_AIMATH_MODEL_GENANALYSISREQUEST_H_
|
||||
57
aimath/include/alibabacloud/aimath/model/GenAnalysisResult.h
Normal file
57
aimath/include/alibabacloud/aimath/model/GenAnalysisResult.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_AIMATH_MODEL_GENANALYSISRESULT_H_
|
||||
#define ALIBABACLOUD_AIMATH_MODEL_GENANALYSISRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/aimath/AIMathExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AIMath
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_AIMATH_EXPORT GenAnalysisResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
GenAnalysisResult();
|
||||
explicit GenAnalysisResult(const std::string &payload);
|
||||
~GenAnalysisResult();
|
||||
std::string getEventType()const;
|
||||
std::string getErrMsg()const;
|
||||
std::string getContent()const;
|
||||
std::string getErrCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string eventType_;
|
||||
std::string errMsg_;
|
||||
std::string content_;
|
||||
std::string errCode_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_AIMATH_MODEL_GENANALYSISRESULT_H_
|
||||
42
aimath/include/alibabacloud/aimath/model/GenStepRequest.h
Normal file
42
aimath/include/alibabacloud/aimath/model/GenStepRequest.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_AIMATH_MODEL_GENSTEPREQUEST_H_
|
||||
#define ALIBABACLOUD_AIMATH_MODEL_GENSTEPREQUEST_H_
|
||||
|
||||
#include <alibabacloud/aimath/AIMathExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AIMath {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_AIMATH_EXPORT GenStepRequest : public RpcServiceRequest {
|
||||
public:
|
||||
GenStepRequest();
|
||||
~GenStepRequest();
|
||||
std::string getExerciseCode() const;
|
||||
void setExerciseCode(const std::string &exerciseCode);
|
||||
|
||||
private:
|
||||
std::string exerciseCode_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AIMath
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_AIMATH_MODEL_GENSTEPREQUEST_H_
|
||||
57
aimath/include/alibabacloud/aimath/model/GenStepResult.h
Normal file
57
aimath/include/alibabacloud/aimath/model/GenStepResult.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_AIMATH_MODEL_GENSTEPRESULT_H_
|
||||
#define ALIBABACLOUD_AIMATH_MODEL_GENSTEPRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/aimath/AIMathExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AIMath
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_AIMATH_EXPORT GenStepResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
GenStepResult();
|
||||
explicit GenStepResult(const std::string &payload);
|
||||
~GenStepResult();
|
||||
std::string getEventType()const;
|
||||
std::string getErrMsg()const;
|
||||
std::string getContent()const;
|
||||
std::string getErrCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string eventType_;
|
||||
std::string errMsg_;
|
||||
std::string content_;
|
||||
std::string errCode_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_AIMATH_MODEL_GENSTEPRESULT_H_
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_AIMATH_MODEL_GLOBALCONFIRMREQUEST_H_
|
||||
#define ALIBABACLOUD_AIMATH_MODEL_GLOBALCONFIRMREQUEST_H_
|
||||
|
||||
#include <alibabacloud/aimath/AIMathExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AIMath {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_AIMATH_EXPORT GlobalConfirmRequest : public RpcServiceRequest {
|
||||
public:
|
||||
GlobalConfirmRequest();
|
||||
~GlobalConfirmRequest();
|
||||
std::string getTag() const;
|
||||
void setTag(const std::string &tag);
|
||||
std::string getExerciseCode() const;
|
||||
void setExerciseCode(const std::string &exerciseCode);
|
||||
|
||||
private:
|
||||
std::string tag_;
|
||||
std::string exerciseCode_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AIMath
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_AIMATH_MODEL_GLOBALCONFIRMREQUEST_H_
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_AIMATH_MODEL_GLOBALCONFIRMRESULT_H_
|
||||
#define ALIBABACLOUD_AIMATH_MODEL_GLOBALCONFIRMRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/aimath/AIMathExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AIMath
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_AIMATH_EXPORT GlobalConfirmResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
GlobalConfirmResult();
|
||||
explicit GlobalConfirmResult(const std::string &payload);
|
||||
~GlobalConfirmResult();
|
||||
std::string getErrMsg()const;
|
||||
bool getSuccess()const;
|
||||
std::string getErrCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string errMsg_;
|
||||
bool success_;
|
||||
std::string errCode_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_AIMATH_MODEL_GLOBALCONFIRMRESULT_H_
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_AIMATH_MODEL_UPDATEANALYSISREQUEST_H_
|
||||
#define ALIBABACLOUD_AIMATH_MODEL_UPDATEANALYSISREQUEST_H_
|
||||
|
||||
#include <alibabacloud/aimath/AIMathExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AIMath {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_AIMATH_EXPORT UpdateAnalysisRequest : public RpcServiceRequest {
|
||||
public:
|
||||
UpdateAnalysisRequest();
|
||||
~UpdateAnalysisRequest();
|
||||
std::string getContent() const;
|
||||
void setContent(const std::string &content);
|
||||
std::string getContentCode() const;
|
||||
void setContentCode(const std::string &contentCode);
|
||||
std::string getExerciseCode() const;
|
||||
void setExerciseCode(const std::string &exerciseCode);
|
||||
|
||||
private:
|
||||
std::string content_;
|
||||
std::string contentCode_;
|
||||
std::string exerciseCode_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AIMath
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_AIMATH_MODEL_UPDATEANALYSISREQUEST_H_
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_AIMATH_MODEL_UPDATEANALYSISRESULT_H_
|
||||
#define ALIBABACLOUD_AIMATH_MODEL_UPDATEANALYSISRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/aimath/AIMathExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AIMath
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_AIMATH_EXPORT UpdateAnalysisResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
UpdateAnalysisResult();
|
||||
explicit UpdateAnalysisResult(const std::string &payload);
|
||||
~UpdateAnalysisResult();
|
||||
std::string getErrMsg()const;
|
||||
bool getSuccess()const;
|
||||
std::string getErrCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string errMsg_;
|
||||
bool success_;
|
||||
std::string errCode_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_AIMATH_MODEL_UPDATEANALYSISRESULT_H_
|
||||
48
aimath/include/alibabacloud/aimath/model/UpdateStepRequest.h
Normal file
48
aimath/include/alibabacloud/aimath/model/UpdateStepRequest.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_AIMATH_MODEL_UPDATESTEPREQUEST_H_
|
||||
#define ALIBABACLOUD_AIMATH_MODEL_UPDATESTEPREQUEST_H_
|
||||
|
||||
#include <alibabacloud/aimath/AIMathExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace AIMath {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_AIMATH_EXPORT UpdateStepRequest : public RpcServiceRequest {
|
||||
public:
|
||||
UpdateStepRequest();
|
||||
~UpdateStepRequest();
|
||||
std::string getContent() const;
|
||||
void setContent(const std::string &content);
|
||||
std::string getContentCode() const;
|
||||
void setContentCode(const std::string &contentCode);
|
||||
std::string getExerciseCode() const;
|
||||
void setExerciseCode(const std::string &exerciseCode);
|
||||
|
||||
private:
|
||||
std::string content_;
|
||||
std::string contentCode_;
|
||||
std::string exerciseCode_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace AIMath
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_AIMATH_MODEL_UPDATESTEPREQUEST_H_
|
||||
55
aimath/include/alibabacloud/aimath/model/UpdateStepResult.h
Normal file
55
aimath/include/alibabacloud/aimath/model/UpdateStepResult.h
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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_AIMATH_MODEL_UPDATESTEPRESULT_H_
|
||||
#define ALIBABACLOUD_AIMATH_MODEL_UPDATESTEPRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/aimath/AIMathExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace AIMath
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_AIMATH_EXPORT UpdateStepResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
UpdateStepResult();
|
||||
explicit UpdateStepResult(const std::string &payload);
|
||||
~UpdateStepResult();
|
||||
std::string getErrMsg()const;
|
||||
bool getSuccess()const;
|
||||
std::string getErrCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string errMsg_;
|
||||
bool success_;
|
||||
std::string errCode_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_AIMATH_MODEL_UPDATESTEPRESULT_H_
|
||||
233
aimath/src/AIMathClient.cc
Normal file
233
aimath/src/AIMathClient.cc
Normal file
@@ -0,0 +1,233 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/aimath/AIMathClient.h>
|
||||
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||
|
||||
using namespace AlibabaCloud;
|
||||
using namespace AlibabaCloud::Location;
|
||||
using namespace AlibabaCloud::AIMath;
|
||||
using namespace AlibabaCloud::AIMath::Model;
|
||||
|
||||
namespace
|
||||
{
|
||||
const std::string SERVICE_NAME = "AIMath";
|
||||
}
|
||||
|
||||
AIMathClient::AIMathClient(const Credentials &credentials, const ClientConfiguration &configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
AIMathClient::AIMathClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
AIMathClient::AIMathClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
AIMathClient::~AIMathClient()
|
||||
{}
|
||||
|
||||
AIMathClient::GenAnalysisOutcome AIMathClient::genAnalysis(const GenAnalysisRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GenAnalysisOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GenAnalysisOutcome(GenAnalysisResult(outcome.result()));
|
||||
else
|
||||
return GenAnalysisOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AIMathClient::genAnalysisAsync(const GenAnalysisRequest& request, const GenAnalysisAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, genAnalysis(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AIMathClient::GenAnalysisOutcomeCallable AIMathClient::genAnalysisCallable(const GenAnalysisRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GenAnalysisOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->genAnalysis(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AIMathClient::GenStepOutcome AIMathClient::genStep(const GenStepRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GenStepOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GenStepOutcome(GenStepResult(outcome.result()));
|
||||
else
|
||||
return GenStepOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AIMathClient::genStepAsync(const GenStepRequest& request, const GenStepAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, genStep(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AIMathClient::GenStepOutcomeCallable AIMathClient::genStepCallable(const GenStepRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GenStepOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->genStep(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AIMathClient::GlobalConfirmOutcome AIMathClient::globalConfirm(const GlobalConfirmRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GlobalConfirmOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GlobalConfirmOutcome(GlobalConfirmResult(outcome.result()));
|
||||
else
|
||||
return GlobalConfirmOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AIMathClient::globalConfirmAsync(const GlobalConfirmRequest& request, const GlobalConfirmAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, globalConfirm(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AIMathClient::GlobalConfirmOutcomeCallable AIMathClient::globalConfirmCallable(const GlobalConfirmRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GlobalConfirmOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->globalConfirm(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AIMathClient::UpdateAnalysisOutcome AIMathClient::updateAnalysis(const UpdateAnalysisRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateAnalysisOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateAnalysisOutcome(UpdateAnalysisResult(outcome.result()));
|
||||
else
|
||||
return UpdateAnalysisOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AIMathClient::updateAnalysisAsync(const UpdateAnalysisRequest& request, const UpdateAnalysisAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateAnalysis(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AIMathClient::UpdateAnalysisOutcomeCallable AIMathClient::updateAnalysisCallable(const UpdateAnalysisRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateAnalysisOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateAnalysis(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AIMathClient::UpdateStepOutcome AIMathClient::updateStep(const UpdateStepRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateStepOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateStepOutcome(UpdateStepResult(outcome.result()));
|
||||
else
|
||||
return UpdateStepOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AIMathClient::updateStepAsync(const UpdateStepRequest& request, const UpdateStepAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateStep(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AIMathClient::UpdateStepOutcomeCallable AIMathClient::updateStepCallable(const UpdateStepRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateStepOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateStep(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
36
aimath/src/model/GenAnalysisRequest.cc
Normal file
36
aimath/src/model/GenAnalysisRequest.cc
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/aimath/model/GenAnalysisRequest.h>
|
||||
|
||||
using AlibabaCloud::AIMath::Model::GenAnalysisRequest;
|
||||
|
||||
GenAnalysisRequest::GenAnalysisRequest()
|
||||
: RpcServiceRequest("aimath", "2024-11-14", "GenAnalysis") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GenAnalysisRequest::~GenAnalysisRequest() {}
|
||||
|
||||
std::string GenAnalysisRequest::getExerciseContent() const {
|
||||
return exerciseContent_;
|
||||
}
|
||||
|
||||
void GenAnalysisRequest::setExerciseContent(const std::string &exerciseContent) {
|
||||
exerciseContent_ = exerciseContent;
|
||||
setBodyParameter(std::string("ExerciseContent"), exerciseContent);
|
||||
}
|
||||
|
||||
72
aimath/src/model/GenAnalysisResult.cc
Normal file
72
aimath/src/model/GenAnalysisResult.cc
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/aimath/model/GenAnalysisResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AIMath;
|
||||
using namespace AlibabaCloud::AIMath::Model;
|
||||
|
||||
GenAnalysisResult::GenAnalysisResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GenAnalysisResult::GenAnalysisResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GenAnalysisResult::~GenAnalysisResult()
|
||||
{}
|
||||
|
||||
void GenAnalysisResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["EventType"].isNull())
|
||||
eventType_ = value["EventType"].asString();
|
||||
if(!value["Content"].isNull())
|
||||
content_ = value["Content"].asString();
|
||||
if(!value["ErrCode"].isNull())
|
||||
errCode_ = value["ErrCode"].asString();
|
||||
if(!value["ErrMsg"].isNull())
|
||||
errMsg_ = value["ErrMsg"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GenAnalysisResult::getEventType()const
|
||||
{
|
||||
return eventType_;
|
||||
}
|
||||
|
||||
std::string GenAnalysisResult::getErrMsg()const
|
||||
{
|
||||
return errMsg_;
|
||||
}
|
||||
|
||||
std::string GenAnalysisResult::getContent()const
|
||||
{
|
||||
return content_;
|
||||
}
|
||||
|
||||
std::string GenAnalysisResult::getErrCode()const
|
||||
{
|
||||
return errCode_;
|
||||
}
|
||||
|
||||
36
aimath/src/model/GenStepRequest.cc
Normal file
36
aimath/src/model/GenStepRequest.cc
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/aimath/model/GenStepRequest.h>
|
||||
|
||||
using AlibabaCloud::AIMath::Model::GenStepRequest;
|
||||
|
||||
GenStepRequest::GenStepRequest()
|
||||
: RpcServiceRequest("aimath", "2024-11-14", "GenStep") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GenStepRequest::~GenStepRequest() {}
|
||||
|
||||
std::string GenStepRequest::getExerciseCode() const {
|
||||
return exerciseCode_;
|
||||
}
|
||||
|
||||
void GenStepRequest::setExerciseCode(const std::string &exerciseCode) {
|
||||
exerciseCode_ = exerciseCode;
|
||||
setBodyParameter(std::string("ExerciseCode"), exerciseCode);
|
||||
}
|
||||
|
||||
72
aimath/src/model/GenStepResult.cc
Normal file
72
aimath/src/model/GenStepResult.cc
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/aimath/model/GenStepResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AIMath;
|
||||
using namespace AlibabaCloud::AIMath::Model;
|
||||
|
||||
GenStepResult::GenStepResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GenStepResult::GenStepResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GenStepResult::~GenStepResult()
|
||||
{}
|
||||
|
||||
void GenStepResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["EventType"].isNull())
|
||||
eventType_ = value["EventType"].asString();
|
||||
if(!value["Content"].isNull())
|
||||
content_ = value["Content"].asString();
|
||||
if(!value["ErrCode"].isNull())
|
||||
errCode_ = value["ErrCode"].asString();
|
||||
if(!value["ErrMsg"].isNull())
|
||||
errMsg_ = value["ErrMsg"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GenStepResult::getEventType()const
|
||||
{
|
||||
return eventType_;
|
||||
}
|
||||
|
||||
std::string GenStepResult::getErrMsg()const
|
||||
{
|
||||
return errMsg_;
|
||||
}
|
||||
|
||||
std::string GenStepResult::getContent()const
|
||||
{
|
||||
return content_;
|
||||
}
|
||||
|
||||
std::string GenStepResult::getErrCode()const
|
||||
{
|
||||
return errCode_;
|
||||
}
|
||||
|
||||
45
aimath/src/model/GlobalConfirmRequest.cc
Normal file
45
aimath/src/model/GlobalConfirmRequest.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/aimath/model/GlobalConfirmRequest.h>
|
||||
|
||||
using AlibabaCloud::AIMath::Model::GlobalConfirmRequest;
|
||||
|
||||
GlobalConfirmRequest::GlobalConfirmRequest()
|
||||
: RpcServiceRequest("aimath", "2024-11-14", "GlobalConfirm") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GlobalConfirmRequest::~GlobalConfirmRequest() {}
|
||||
|
||||
std::string GlobalConfirmRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void GlobalConfirmRequest::setTag(const std::string &tag) {
|
||||
tag_ = tag;
|
||||
setBodyParameter(std::string("Tag"), tag);
|
||||
}
|
||||
|
||||
std::string GlobalConfirmRequest::getExerciseCode() const {
|
||||
return exerciseCode_;
|
||||
}
|
||||
|
||||
void GlobalConfirmRequest::setExerciseCode(const std::string &exerciseCode) {
|
||||
exerciseCode_ = exerciseCode;
|
||||
setBodyParameter(std::string("ExerciseCode"), exerciseCode);
|
||||
}
|
||||
|
||||
65
aimath/src/model/GlobalConfirmResult.cc
Normal file
65
aimath/src/model/GlobalConfirmResult.cc
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/aimath/model/GlobalConfirmResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AIMath;
|
||||
using namespace AlibabaCloud::AIMath::Model;
|
||||
|
||||
GlobalConfirmResult::GlobalConfirmResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GlobalConfirmResult::GlobalConfirmResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GlobalConfirmResult::~GlobalConfirmResult()
|
||||
{}
|
||||
|
||||
void GlobalConfirmResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrCode"].isNull())
|
||||
errCode_ = value["ErrCode"].asString();
|
||||
if(!value["ErrMsg"].isNull())
|
||||
errMsg_ = value["ErrMsg"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GlobalConfirmResult::getErrMsg()const
|
||||
{
|
||||
return errMsg_;
|
||||
}
|
||||
|
||||
bool GlobalConfirmResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
std::string GlobalConfirmResult::getErrCode()const
|
||||
{
|
||||
return errCode_;
|
||||
}
|
||||
|
||||
54
aimath/src/model/UpdateAnalysisRequest.cc
Normal file
54
aimath/src/model/UpdateAnalysisRequest.cc
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/aimath/model/UpdateAnalysisRequest.h>
|
||||
|
||||
using AlibabaCloud::AIMath::Model::UpdateAnalysisRequest;
|
||||
|
||||
UpdateAnalysisRequest::UpdateAnalysisRequest()
|
||||
: RpcServiceRequest("aimath", "2024-11-14", "UpdateAnalysis") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
UpdateAnalysisRequest::~UpdateAnalysisRequest() {}
|
||||
|
||||
std::string UpdateAnalysisRequest::getContent() const {
|
||||
return content_;
|
||||
}
|
||||
|
||||
void UpdateAnalysisRequest::setContent(const std::string &content) {
|
||||
content_ = content;
|
||||
setBodyParameter(std::string("Content"), content);
|
||||
}
|
||||
|
||||
std::string UpdateAnalysisRequest::getContentCode() const {
|
||||
return contentCode_;
|
||||
}
|
||||
|
||||
void UpdateAnalysisRequest::setContentCode(const std::string &contentCode) {
|
||||
contentCode_ = contentCode;
|
||||
setBodyParameter(std::string("ContentCode"), contentCode);
|
||||
}
|
||||
|
||||
std::string UpdateAnalysisRequest::getExerciseCode() const {
|
||||
return exerciseCode_;
|
||||
}
|
||||
|
||||
void UpdateAnalysisRequest::setExerciseCode(const std::string &exerciseCode) {
|
||||
exerciseCode_ = exerciseCode;
|
||||
setBodyParameter(std::string("ExerciseCode"), exerciseCode);
|
||||
}
|
||||
|
||||
65
aimath/src/model/UpdateAnalysisResult.cc
Normal file
65
aimath/src/model/UpdateAnalysisResult.cc
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/aimath/model/UpdateAnalysisResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AIMath;
|
||||
using namespace AlibabaCloud::AIMath::Model;
|
||||
|
||||
UpdateAnalysisResult::UpdateAnalysisResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateAnalysisResult::UpdateAnalysisResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateAnalysisResult::~UpdateAnalysisResult()
|
||||
{}
|
||||
|
||||
void UpdateAnalysisResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrCode"].isNull())
|
||||
errCode_ = value["ErrCode"].asString();
|
||||
if(!value["ErrMsg"].isNull())
|
||||
errMsg_ = value["ErrMsg"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string UpdateAnalysisResult::getErrMsg()const
|
||||
{
|
||||
return errMsg_;
|
||||
}
|
||||
|
||||
bool UpdateAnalysisResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
std::string UpdateAnalysisResult::getErrCode()const
|
||||
{
|
||||
return errCode_;
|
||||
}
|
||||
|
||||
54
aimath/src/model/UpdateStepRequest.cc
Normal file
54
aimath/src/model/UpdateStepRequest.cc
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/aimath/model/UpdateStepRequest.h>
|
||||
|
||||
using AlibabaCloud::AIMath::Model::UpdateStepRequest;
|
||||
|
||||
UpdateStepRequest::UpdateStepRequest()
|
||||
: RpcServiceRequest("aimath", "2024-11-14", "UpdateStep") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
UpdateStepRequest::~UpdateStepRequest() {}
|
||||
|
||||
std::string UpdateStepRequest::getContent() const {
|
||||
return content_;
|
||||
}
|
||||
|
||||
void UpdateStepRequest::setContent(const std::string &content) {
|
||||
content_ = content;
|
||||
setBodyParameter(std::string("Content"), content);
|
||||
}
|
||||
|
||||
std::string UpdateStepRequest::getContentCode() const {
|
||||
return contentCode_;
|
||||
}
|
||||
|
||||
void UpdateStepRequest::setContentCode(const std::string &contentCode) {
|
||||
contentCode_ = contentCode;
|
||||
setBodyParameter(std::string("ContentCode"), contentCode);
|
||||
}
|
||||
|
||||
std::string UpdateStepRequest::getExerciseCode() const {
|
||||
return exerciseCode_;
|
||||
}
|
||||
|
||||
void UpdateStepRequest::setExerciseCode(const std::string &exerciseCode) {
|
||||
exerciseCode_ = exerciseCode;
|
||||
setBodyParameter(std::string("ExerciseCode"), exerciseCode);
|
||||
}
|
||||
|
||||
65
aimath/src/model/UpdateStepResult.cc
Normal file
65
aimath/src/model/UpdateStepResult.cc
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/aimath/model/UpdateStepResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::AIMath;
|
||||
using namespace AlibabaCloud::AIMath::Model;
|
||||
|
||||
UpdateStepResult::UpdateStepResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateStepResult::UpdateStepResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateStepResult::~UpdateStepResult()
|
||||
{}
|
||||
|
||||
void UpdateStepResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrCode"].isNull())
|
||||
errCode_ = value["ErrCode"].asString();
|
||||
if(!value["ErrMsg"].isNull())
|
||||
errMsg_ = value["ErrMsg"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string UpdateStepResult::getErrMsg()const
|
||||
{
|
||||
return errMsg_;
|
||||
}
|
||||
|
||||
bool UpdateStepResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
std::string UpdateStepResult::getErrCode()const
|
||||
{
|
||||
return errCode_;
|
||||
}
|
||||
|
||||
90
aipodcast/CMakeLists.txt
Normal file
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_;
|
||||
}
|
||||
|
||||
@@ -33,6 +33,8 @@ set(alb_public_header_model
|
||||
include/alibabacloud/alb/model/AssociateAdditionalCertificatesWithListenerResult.h
|
||||
include/alibabacloud/alb/model/AttachCommonBandwidthPackageToLoadBalancerRequest.h
|
||||
include/alibabacloud/alb/model/AttachCommonBandwidthPackageToLoadBalancerResult.h
|
||||
include/alibabacloud/alb/model/CancelShiftLoadBalancerZonesRequest.h
|
||||
include/alibabacloud/alb/model/CancelShiftLoadBalancerZonesResult.h
|
||||
include/alibabacloud/alb/model/CreateAScriptsRequest.h
|
||||
include/alibabacloud/alb/model/CreateAScriptsResult.h
|
||||
include/alibabacloud/alb/model/CreateAclRequest.h
|
||||
@@ -135,6 +137,10 @@ set(alb_public_header_model
|
||||
include/alibabacloud/alb/model/ListTagResourcesResult.h
|
||||
include/alibabacloud/alb/model/ListTagValuesRequest.h
|
||||
include/alibabacloud/alb/model/ListTagValuesResult.h
|
||||
include/alibabacloud/alb/model/LoadBalancerJoinSecurityGroupRequest.h
|
||||
include/alibabacloud/alb/model/LoadBalancerJoinSecurityGroupResult.h
|
||||
include/alibabacloud/alb/model/LoadBalancerLeaveSecurityGroupRequest.h
|
||||
include/alibabacloud/alb/model/LoadBalancerLeaveSecurityGroupResult.h
|
||||
include/alibabacloud/alb/model/MoveResourceGroupRequest.h
|
||||
include/alibabacloud/alb/model/MoveResourceGroupResult.h
|
||||
include/alibabacloud/alb/model/RemoveEntriesFromAclRequest.h
|
||||
@@ -145,6 +151,8 @@ set(alb_public_header_model
|
||||
include/alibabacloud/alb/model/ReplaceServersInServerGroupResult.h
|
||||
include/alibabacloud/alb/model/StartListenerRequest.h
|
||||
include/alibabacloud/alb/model/StartListenerResult.h
|
||||
include/alibabacloud/alb/model/StartShiftLoadBalancerZonesRequest.h
|
||||
include/alibabacloud/alb/model/StartShiftLoadBalancerZonesResult.h
|
||||
include/alibabacloud/alb/model/StopListenerRequest.h
|
||||
include/alibabacloud/alb/model/StopListenerResult.h
|
||||
include/alibabacloud/alb/model/TagResourcesRequest.h
|
||||
@@ -194,6 +202,8 @@ set(alb_src
|
||||
src/model/AssociateAdditionalCertificatesWithListenerResult.cc
|
||||
src/model/AttachCommonBandwidthPackageToLoadBalancerRequest.cc
|
||||
src/model/AttachCommonBandwidthPackageToLoadBalancerResult.cc
|
||||
src/model/CancelShiftLoadBalancerZonesRequest.cc
|
||||
src/model/CancelShiftLoadBalancerZonesResult.cc
|
||||
src/model/CreateAScriptsRequest.cc
|
||||
src/model/CreateAScriptsResult.cc
|
||||
src/model/CreateAclRequest.cc
|
||||
@@ -296,6 +306,10 @@ set(alb_src
|
||||
src/model/ListTagResourcesResult.cc
|
||||
src/model/ListTagValuesRequest.cc
|
||||
src/model/ListTagValuesResult.cc
|
||||
src/model/LoadBalancerJoinSecurityGroupRequest.cc
|
||||
src/model/LoadBalancerJoinSecurityGroupResult.cc
|
||||
src/model/LoadBalancerLeaveSecurityGroupRequest.cc
|
||||
src/model/LoadBalancerLeaveSecurityGroupResult.cc
|
||||
src/model/MoveResourceGroupRequest.cc
|
||||
src/model/MoveResourceGroupResult.cc
|
||||
src/model/RemoveEntriesFromAclRequest.cc
|
||||
@@ -306,6 +320,8 @@ set(alb_src
|
||||
src/model/ReplaceServersInServerGroupResult.cc
|
||||
src/model/StartListenerRequest.cc
|
||||
src/model/StartListenerResult.cc
|
||||
src/model/StartShiftLoadBalancerZonesRequest.cc
|
||||
src/model/StartShiftLoadBalancerZonesResult.cc
|
||||
src/model/StopListenerRequest.cc
|
||||
src/model/StopListenerResult.cc
|
||||
src/model/TagResourcesRequest.cc
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
#include "model/AssociateAdditionalCertificatesWithListenerResult.h"
|
||||
#include "model/AttachCommonBandwidthPackageToLoadBalancerRequest.h"
|
||||
#include "model/AttachCommonBandwidthPackageToLoadBalancerResult.h"
|
||||
#include "model/CancelShiftLoadBalancerZonesRequest.h"
|
||||
#include "model/CancelShiftLoadBalancerZonesResult.h"
|
||||
#include "model/CreateAScriptsRequest.h"
|
||||
#include "model/CreateAScriptsResult.h"
|
||||
#include "model/CreateAclRequest.h"
|
||||
@@ -136,6 +138,10 @@
|
||||
#include "model/ListTagResourcesResult.h"
|
||||
#include "model/ListTagValuesRequest.h"
|
||||
#include "model/ListTagValuesResult.h"
|
||||
#include "model/LoadBalancerJoinSecurityGroupRequest.h"
|
||||
#include "model/LoadBalancerJoinSecurityGroupResult.h"
|
||||
#include "model/LoadBalancerLeaveSecurityGroupRequest.h"
|
||||
#include "model/LoadBalancerLeaveSecurityGroupResult.h"
|
||||
#include "model/MoveResourceGroupRequest.h"
|
||||
#include "model/MoveResourceGroupResult.h"
|
||||
#include "model/RemoveEntriesFromAclRequest.h"
|
||||
@@ -146,6 +152,8 @@
|
||||
#include "model/ReplaceServersInServerGroupResult.h"
|
||||
#include "model/StartListenerRequest.h"
|
||||
#include "model/StartListenerResult.h"
|
||||
#include "model/StartShiftLoadBalancerZonesRequest.h"
|
||||
#include "model/StartShiftLoadBalancerZonesResult.h"
|
||||
#include "model/StopListenerRequest.h"
|
||||
#include "model/StopListenerResult.h"
|
||||
#include "model/TagResourcesRequest.h"
|
||||
@@ -207,6 +215,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::AttachCommonBandwidthPackageToLoadBalancerResult> AttachCommonBandwidthPackageToLoadBalancerOutcome;
|
||||
typedef std::future<AttachCommonBandwidthPackageToLoadBalancerOutcome> AttachCommonBandwidthPackageToLoadBalancerOutcomeCallable;
|
||||
typedef std::function<void(const AlbClient*, const Model::AttachCommonBandwidthPackageToLoadBalancerRequest&, const AttachCommonBandwidthPackageToLoadBalancerOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AttachCommonBandwidthPackageToLoadBalancerAsyncHandler;
|
||||
typedef Outcome<Error, Model::CancelShiftLoadBalancerZonesResult> CancelShiftLoadBalancerZonesOutcome;
|
||||
typedef std::future<CancelShiftLoadBalancerZonesOutcome> CancelShiftLoadBalancerZonesOutcomeCallable;
|
||||
typedef std::function<void(const AlbClient*, const Model::CancelShiftLoadBalancerZonesRequest&, const CancelShiftLoadBalancerZonesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CancelShiftLoadBalancerZonesAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateAScriptsResult> CreateAScriptsOutcome;
|
||||
typedef std::future<CreateAScriptsOutcome> CreateAScriptsOutcomeCallable;
|
||||
typedef std::function<void(const AlbClient*, const Model::CreateAScriptsRequest&, const CreateAScriptsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateAScriptsAsyncHandler;
|
||||
@@ -360,6 +371,12 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::ListTagValuesResult> ListTagValuesOutcome;
|
||||
typedef std::future<ListTagValuesOutcome> ListTagValuesOutcomeCallable;
|
||||
typedef std::function<void(const AlbClient*, const Model::ListTagValuesRequest&, const ListTagValuesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListTagValuesAsyncHandler;
|
||||
typedef Outcome<Error, Model::LoadBalancerJoinSecurityGroupResult> LoadBalancerJoinSecurityGroupOutcome;
|
||||
typedef std::future<LoadBalancerJoinSecurityGroupOutcome> LoadBalancerJoinSecurityGroupOutcomeCallable;
|
||||
typedef std::function<void(const AlbClient*, const Model::LoadBalancerJoinSecurityGroupRequest&, const LoadBalancerJoinSecurityGroupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> LoadBalancerJoinSecurityGroupAsyncHandler;
|
||||
typedef Outcome<Error, Model::LoadBalancerLeaveSecurityGroupResult> LoadBalancerLeaveSecurityGroupOutcome;
|
||||
typedef std::future<LoadBalancerLeaveSecurityGroupOutcome> LoadBalancerLeaveSecurityGroupOutcomeCallable;
|
||||
typedef std::function<void(const AlbClient*, const Model::LoadBalancerLeaveSecurityGroupRequest&, const LoadBalancerLeaveSecurityGroupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> LoadBalancerLeaveSecurityGroupAsyncHandler;
|
||||
typedef Outcome<Error, Model::MoveResourceGroupResult> MoveResourceGroupOutcome;
|
||||
typedef std::future<MoveResourceGroupOutcome> MoveResourceGroupOutcomeCallable;
|
||||
typedef std::function<void(const AlbClient*, const Model::MoveResourceGroupRequest&, const MoveResourceGroupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MoveResourceGroupAsyncHandler;
|
||||
@@ -375,6 +392,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::StartListenerResult> StartListenerOutcome;
|
||||
typedef std::future<StartListenerOutcome> StartListenerOutcomeCallable;
|
||||
typedef std::function<void(const AlbClient*, const Model::StartListenerRequest&, const StartListenerOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> StartListenerAsyncHandler;
|
||||
typedef Outcome<Error, Model::StartShiftLoadBalancerZonesResult> StartShiftLoadBalancerZonesOutcome;
|
||||
typedef std::future<StartShiftLoadBalancerZonesOutcome> StartShiftLoadBalancerZonesOutcomeCallable;
|
||||
typedef std::function<void(const AlbClient*, const Model::StartShiftLoadBalancerZonesRequest&, const StartShiftLoadBalancerZonesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> StartShiftLoadBalancerZonesAsyncHandler;
|
||||
typedef Outcome<Error, Model::StopListenerResult> StopListenerOutcome;
|
||||
typedef std::future<StopListenerOutcome> StopListenerOutcomeCallable;
|
||||
typedef std::function<void(const AlbClient*, const Model::StopListenerRequest&, const StopListenerOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> StopListenerAsyncHandler;
|
||||
@@ -449,6 +469,9 @@ namespace AlibabaCloud
|
||||
AttachCommonBandwidthPackageToLoadBalancerOutcome attachCommonBandwidthPackageToLoadBalancer(const Model::AttachCommonBandwidthPackageToLoadBalancerRequest &request)const;
|
||||
void attachCommonBandwidthPackageToLoadBalancerAsync(const Model::AttachCommonBandwidthPackageToLoadBalancerRequest& request, const AttachCommonBandwidthPackageToLoadBalancerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
AttachCommonBandwidthPackageToLoadBalancerOutcomeCallable attachCommonBandwidthPackageToLoadBalancerCallable(const Model::AttachCommonBandwidthPackageToLoadBalancerRequest& request) const;
|
||||
CancelShiftLoadBalancerZonesOutcome cancelShiftLoadBalancerZones(const Model::CancelShiftLoadBalancerZonesRequest &request)const;
|
||||
void cancelShiftLoadBalancerZonesAsync(const Model::CancelShiftLoadBalancerZonesRequest& request, const CancelShiftLoadBalancerZonesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CancelShiftLoadBalancerZonesOutcomeCallable cancelShiftLoadBalancerZonesCallable(const Model::CancelShiftLoadBalancerZonesRequest& request) const;
|
||||
CreateAScriptsOutcome createAScripts(const Model::CreateAScriptsRequest &request)const;
|
||||
void createAScriptsAsync(const Model::CreateAScriptsRequest& request, const CreateAScriptsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateAScriptsOutcomeCallable createAScriptsCallable(const Model::CreateAScriptsRequest& request) const;
|
||||
@@ -602,6 +625,12 @@ namespace AlibabaCloud
|
||||
ListTagValuesOutcome listTagValues(const Model::ListTagValuesRequest &request)const;
|
||||
void listTagValuesAsync(const Model::ListTagValuesRequest& request, const ListTagValuesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListTagValuesOutcomeCallable listTagValuesCallable(const Model::ListTagValuesRequest& request) const;
|
||||
LoadBalancerJoinSecurityGroupOutcome loadBalancerJoinSecurityGroup(const Model::LoadBalancerJoinSecurityGroupRequest &request)const;
|
||||
void loadBalancerJoinSecurityGroupAsync(const Model::LoadBalancerJoinSecurityGroupRequest& request, const LoadBalancerJoinSecurityGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
LoadBalancerJoinSecurityGroupOutcomeCallable loadBalancerJoinSecurityGroupCallable(const Model::LoadBalancerJoinSecurityGroupRequest& request) const;
|
||||
LoadBalancerLeaveSecurityGroupOutcome loadBalancerLeaveSecurityGroup(const Model::LoadBalancerLeaveSecurityGroupRequest &request)const;
|
||||
void loadBalancerLeaveSecurityGroupAsync(const Model::LoadBalancerLeaveSecurityGroupRequest& request, const LoadBalancerLeaveSecurityGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
LoadBalancerLeaveSecurityGroupOutcomeCallable loadBalancerLeaveSecurityGroupCallable(const Model::LoadBalancerLeaveSecurityGroupRequest& request) const;
|
||||
MoveResourceGroupOutcome moveResourceGroup(const Model::MoveResourceGroupRequest &request)const;
|
||||
void moveResourceGroupAsync(const Model::MoveResourceGroupRequest& request, const MoveResourceGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
MoveResourceGroupOutcomeCallable moveResourceGroupCallable(const Model::MoveResourceGroupRequest& request) const;
|
||||
@@ -617,6 +646,9 @@ namespace AlibabaCloud
|
||||
StartListenerOutcome startListener(const Model::StartListenerRequest &request)const;
|
||||
void startListenerAsync(const Model::StartListenerRequest& request, const StartListenerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
StartListenerOutcomeCallable startListenerCallable(const Model::StartListenerRequest& request) const;
|
||||
StartShiftLoadBalancerZonesOutcome startShiftLoadBalancerZones(const Model::StartShiftLoadBalancerZonesRequest &request)const;
|
||||
void startShiftLoadBalancerZonesAsync(const Model::StartShiftLoadBalancerZonesRequest& request, const StartShiftLoadBalancerZonesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
StartShiftLoadBalancerZonesOutcomeCallable startShiftLoadBalancerZonesCallable(const Model::StartShiftLoadBalancerZonesRequest& request) const;
|
||||
StopListenerOutcome stopListener(const Model::StopListenerRequest &request)const;
|
||||
void stopListenerAsync(const Model::StopListenerRequest& request, const StopListenerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
StopListenerOutcomeCallable stopListenerCallable(const Model::StopListenerRequest& request) const;
|
||||
|
||||
@@ -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_ALB_MODEL_CANCELSHIFTLOADBALANCERZONESREQUEST_H_
|
||||
#define ALIBABACLOUD_ALB_MODEL_CANCELSHIFTLOADBALANCERZONESREQUEST_H_
|
||||
|
||||
#include <alibabacloud/alb/AlbExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Alb {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ALB_EXPORT CancelShiftLoadBalancerZonesRequest : public RpcServiceRequest {
|
||||
public:
|
||||
struct ZoneMappings {
|
||||
std::string vSwitchId;
|
||||
std::string zoneId;
|
||||
};
|
||||
CancelShiftLoadBalancerZonesRequest();
|
||||
~CancelShiftLoadBalancerZonesRequest();
|
||||
std::string getClientToken() const;
|
||||
void setClientToken(const std::string &clientToken);
|
||||
bool getDryRun() const;
|
||||
void setDryRun(bool dryRun);
|
||||
std::vector<ZoneMappings> getZoneMappings() const;
|
||||
void setZoneMappings(const std::vector<ZoneMappings> &zoneMappings);
|
||||
std::string getLoadBalancerId() const;
|
||||
void setLoadBalancerId(const std::string &loadBalancerId);
|
||||
|
||||
private:
|
||||
std::string clientToken_;
|
||||
bool dryRun_;
|
||||
std::vector<ZoneMappings> zoneMappings_;
|
||||
std::string loadBalancerId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Alb
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ALB_MODEL_CANCELSHIFTLOADBALANCERZONESREQUEST_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_ALB_MODEL_CANCELSHIFTLOADBALANCERZONESRESULT_H_
|
||||
#define ALIBABACLOUD_ALB_MODEL_CANCELSHIFTLOADBALANCERZONESRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/alb/AlbExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Alb
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ALB_EXPORT CancelShiftLoadBalancerZonesResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
CancelShiftLoadBalancerZonesResult();
|
||||
explicit CancelShiftLoadBalancerZonesResult(const std::string &payload);
|
||||
~CancelShiftLoadBalancerZonesResult();
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ALB_MODEL_CANCELSHIFTLOADBALANCERZONESRESULT_H_
|
||||
@@ -28,6 +28,10 @@ namespace Alb {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ALB_EXPORT CreateAclRequest : public RpcServiceRequest {
|
||||
public:
|
||||
struct Tag {
|
||||
std::string value;
|
||||
std::string key;
|
||||
};
|
||||
CreateAclRequest();
|
||||
~CreateAclRequest();
|
||||
std::string getAclName() const;
|
||||
@@ -38,6 +42,8 @@ public:
|
||||
void setAddressIpVersion(const std::string &addressIpVersion);
|
||||
std::string getResourceGroupId() const;
|
||||
void setResourceGroupId(const std::string &resourceGroupId);
|
||||
std::vector<Tag> getTag() const;
|
||||
void setTag(const std::vector<Tag> &tag);
|
||||
bool getDryRun() const;
|
||||
void setDryRun(bool dryRun);
|
||||
|
||||
@@ -46,6 +52,7 @@ private:
|
||||
std::string clientToken_;
|
||||
std::string addressIpVersion_;
|
||||
std::string resourceGroupId_;
|
||||
std::vector<Tag> tag_;
|
||||
bool dryRun_;
|
||||
};
|
||||
} // namespace Model
|
||||
|
||||
@@ -28,6 +28,10 @@ namespace Alb {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ALB_EXPORT CreateHealthCheckTemplateRequest : public RpcServiceRequest {
|
||||
public:
|
||||
struct Tag {
|
||||
std::string value;
|
||||
std::string key;
|
||||
};
|
||||
CreateHealthCheckTemplateRequest();
|
||||
~CreateHealthCheckTemplateRequest();
|
||||
int getHealthCheckTimeout() const;
|
||||
@@ -44,6 +48,8 @@ public:
|
||||
void setHealthCheckTcpFastCloseEnabled(bool healthCheckTcpFastCloseEnabled);
|
||||
std::string getHealthCheckPath() const;
|
||||
void setHealthCheckPath(const std::string &healthCheckPath);
|
||||
std::vector<Tag> getTag() const;
|
||||
void setTag(const std::vector<Tag> &tag);
|
||||
std::vector<std::string> getHealthCheckCodes() const;
|
||||
void setHealthCheckCodes(const std::vector<std::string> &healthCheckCodes);
|
||||
bool getDryRun() const;
|
||||
@@ -71,6 +77,7 @@ private:
|
||||
int healthyThreshold_;
|
||||
bool healthCheckTcpFastCloseEnabled_;
|
||||
std::string healthCheckPath_;
|
||||
std::vector<Tag> tag_;
|
||||
std::vector<std::string> healthCheckCodes_;
|
||||
bool dryRun_;
|
||||
std::string healthCheckMethod_;
|
||||
|
||||
@@ -32,6 +32,10 @@ public:
|
||||
bool quicUpgradeEnabled;
|
||||
std::string quicListenerId;
|
||||
};
|
||||
struct Tag {
|
||||
std::string value;
|
||||
std::string key;
|
||||
};
|
||||
struct DefaultActions {
|
||||
struct ForwardGroupConfig {
|
||||
struct ServerGroupTuplesItem {
|
||||
@@ -51,6 +55,8 @@ public:
|
||||
std::string xForwardedForClientCertSubjectDNAlias;
|
||||
bool xForwardedForClientSourceIpsEnabled;
|
||||
bool xForwardedForClientCertIssuerDNEnabled;
|
||||
bool xForwardedForHostEnabled;
|
||||
std::string xForwardedForProcessingMode;
|
||||
bool xForwardedForClientCertFingerprintEnabled;
|
||||
std::string xForwardedForClientCertIssuerDNAlias;
|
||||
bool xForwardedForProtoEnabled;
|
||||
@@ -76,6 +82,8 @@ public:
|
||||
void setQuicConfig(const QuicConfig &quicConfig);
|
||||
bool getHttp2Enabled() const;
|
||||
void setHttp2Enabled(bool http2Enabled);
|
||||
std::vector<Tag> getTag() const;
|
||||
void setTag(const std::vector<Tag> &tag);
|
||||
std::vector<DefaultActions> getDefaultActions() const;
|
||||
void setDefaultActions(const std::vector<DefaultActions> &defaultActions);
|
||||
int getListenerPort() const;
|
||||
@@ -108,6 +116,7 @@ private:
|
||||
bool gzipEnabled_;
|
||||
QuicConfig quicConfig_;
|
||||
bool http2Enabled_;
|
||||
std::vector<Tag> tag_;
|
||||
std::vector<DefaultActions> defaultActions_;
|
||||
int listenerPort_;
|
||||
bool dryRun_;
|
||||
|
||||
@@ -38,11 +38,16 @@ public:
|
||||
int internetBandwidth;
|
||||
std::string payType;
|
||||
};
|
||||
struct Tag {
|
||||
std::string value;
|
||||
std::string key;
|
||||
};
|
||||
struct ZoneMappings {
|
||||
std::string vSwitchId;
|
||||
std::string eipType;
|
||||
std::string zoneId;
|
||||
std::string allocationId;
|
||||
std::string intranetAddress;
|
||||
};
|
||||
CreateLoadBalancerRequest();
|
||||
~CreateLoadBalancerRequest();
|
||||
@@ -64,6 +69,8 @@ public:
|
||||
void setLoadBalancerName(const std::string &loadBalancerName);
|
||||
std::string getAddressType() const;
|
||||
void setAddressType(const std::string &addressType);
|
||||
std::vector<Tag> getTag() const;
|
||||
void setTag(const std::vector<Tag> &tag);
|
||||
std::string getAddressAllocatedMode() const;
|
||||
void setAddressAllocatedMode(const std::string &addressAllocatedMode);
|
||||
bool getDryRun() const;
|
||||
@@ -83,6 +90,7 @@ private:
|
||||
std::string resourceGroupId_;
|
||||
std::string loadBalancerName_;
|
||||
std::string addressType_;
|
||||
std::vector<Tag> tag_;
|
||||
std::string addressAllocatedMode_;
|
||||
bool dryRun_;
|
||||
std::vector<ZoneMappings> zoneMappings_;
|
||||
|
||||
@@ -28,6 +28,10 @@ namespace Alb {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ALB_EXPORT CreateRuleRequest : public RpcServiceRequest {
|
||||
public:
|
||||
struct Tag {
|
||||
std::string value;
|
||||
std::string key;
|
||||
};
|
||||
struct RuleActions {
|
||||
struct FixedResponseConfig {
|
||||
std::string httpCode;
|
||||
@@ -174,6 +178,8 @@ public:
|
||||
void setRuleName(const std::string &ruleName);
|
||||
std::string getListenerId() const;
|
||||
void setListenerId(const std::string &listenerId);
|
||||
std::vector<Tag> getTag() const;
|
||||
void setTag(const std::vector<Tag> &tag);
|
||||
std::string getDirection() const;
|
||||
void setDirection(const std::string &direction);
|
||||
std::vector<RuleActions> getRuleActions() const;
|
||||
@@ -189,6 +195,7 @@ private:
|
||||
std::string clientToken_;
|
||||
std::string ruleName_;
|
||||
std::string listenerId_;
|
||||
std::vector<Tag> tag_;
|
||||
std::string direction_;
|
||||
std::vector<RuleActions> ruleActions_;
|
||||
std::vector<RuleConditions> ruleConditions_;
|
||||
|
||||
@@ -90,6 +90,12 @@ public:
|
||||
RuleConditionsItem ruleConditionsItem;
|
||||
std::vector<RuleConditionsItem> ruleConditions;
|
||||
std::string ruleName;
|
||||
struct TagItem {
|
||||
std::string value;
|
||||
std::string key;
|
||||
};
|
||||
TagItem tagItem;
|
||||
std::vector<TagItem> tag;
|
||||
int priority;
|
||||
struct RuleActionsItem {
|
||||
struct FixedResponseConfig {
|
||||
|
||||
@@ -28,6 +28,10 @@ namespace Alb {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ALB_EXPORT CreateSecurityPolicyRequest : public RpcServiceRequest {
|
||||
public:
|
||||
struct Tag {
|
||||
std::string value;
|
||||
std::string key;
|
||||
};
|
||||
CreateSecurityPolicyRequest();
|
||||
~CreateSecurityPolicyRequest();
|
||||
std::string getClientToken() const;
|
||||
@@ -36,6 +40,8 @@ public:
|
||||
void setResourceGroupId(const std::string &resourceGroupId);
|
||||
std::vector<std::string> getCiphers() const;
|
||||
void setCiphers(const std::vector<std::string> &ciphers);
|
||||
std::vector<Tag> getTag() const;
|
||||
void setTag(const std::vector<Tag> &tag);
|
||||
std::vector<std::string> getTLSVersions() const;
|
||||
void setTLSVersions(const std::vector<std::string> &tLSVersions);
|
||||
std::string getSecurityPolicyName() const;
|
||||
@@ -47,6 +53,7 @@ private:
|
||||
std::string clientToken_;
|
||||
std::string resourceGroupId_;
|
||||
std::vector<std::string> ciphers_;
|
||||
std::vector<Tag> tag_;
|
||||
std::vector<std::string> tLSVersions_;
|
||||
std::string securityPolicyName_;
|
||||
bool dryRun_;
|
||||
|
||||
@@ -46,24 +46,40 @@ public:
|
||||
std::string healthCheckHttpVersion;
|
||||
int healthCheckConnectPort;
|
||||
};
|
||||
struct SlowStartConfig {
|
||||
int slowStartDuration;
|
||||
bool slowStartEnabled;
|
||||
};
|
||||
struct Tag {
|
||||
std::string value;
|
||||
std::string key;
|
||||
};
|
||||
struct StickySessionConfig {
|
||||
bool stickySessionEnabled;
|
||||
std::string cookie;
|
||||
int cookieTimeout;
|
||||
std::string stickySessionType;
|
||||
};
|
||||
struct ConnectionDrainConfig {
|
||||
bool connectionDrainEnabled;
|
||||
int connectionDrainTimeout;
|
||||
};
|
||||
struct UchConfig {
|
||||
std::string type;
|
||||
std::string value;
|
||||
};
|
||||
CreateServerGroupRequest();
|
||||
~CreateServerGroupRequest();
|
||||
bool getCrossZoneEnabled() const;
|
||||
void setCrossZoneEnabled(bool crossZoneEnabled);
|
||||
std::string getServerGroupName() const;
|
||||
void setServerGroupName(const std::string &serverGroupName);
|
||||
std::string getClientToken() const;
|
||||
void setClientToken(const std::string &clientToken);
|
||||
HealthCheckConfig getHealthCheckConfig() const;
|
||||
void setHealthCheckConfig(const HealthCheckConfig &healthCheckConfig);
|
||||
SlowStartConfig getSlowStartConfig() const;
|
||||
void setSlowStartConfig(const SlowStartConfig &slowStartConfig);
|
||||
std::string getScheduler() const;
|
||||
void setScheduler(const std::string &scheduler);
|
||||
std::string getResourceGroupId() const;
|
||||
@@ -74,12 +90,16 @@ public:
|
||||
void setUpstreamKeepaliveEnabled(bool upstreamKeepaliveEnabled);
|
||||
std::string getServiceName() const;
|
||||
void setServiceName(const std::string &serviceName);
|
||||
std::vector<Tag> getTag() const;
|
||||
void setTag(const std::vector<Tag> &tag);
|
||||
StickySessionConfig getStickySessionConfig() const;
|
||||
void setStickySessionConfig(const StickySessionConfig &stickySessionConfig);
|
||||
bool getDryRun() const;
|
||||
void setDryRun(bool dryRun);
|
||||
bool getIpv6Enabled() const;
|
||||
void setIpv6Enabled(bool ipv6Enabled);
|
||||
ConnectionDrainConfig getConnectionDrainConfig() const;
|
||||
void setConnectionDrainConfig(const ConnectionDrainConfig &connectionDrainConfig);
|
||||
std::string getServerGroupType() const;
|
||||
void setServerGroupType(const std::string &serverGroupType);
|
||||
std::string getVpcId() const;
|
||||
@@ -88,17 +108,21 @@ public:
|
||||
void setUchConfig(const UchConfig &uchConfig);
|
||||
|
||||
private:
|
||||
bool crossZoneEnabled_;
|
||||
std::string serverGroupName_;
|
||||
std::string clientToken_;
|
||||
HealthCheckConfig healthCheckConfig_;
|
||||
SlowStartConfig slowStartConfig_;
|
||||
std::string scheduler_;
|
||||
std::string resourceGroupId_;
|
||||
std::string protocol_;
|
||||
bool upstreamKeepaliveEnabled_;
|
||||
std::string serviceName_;
|
||||
std::vector<Tag> tag_;
|
||||
StickySessionConfig stickySessionConfig_;
|
||||
bool dryRun_;
|
||||
bool ipv6Enabled_;
|
||||
ConnectionDrainConfig connectionDrainConfig_;
|
||||
std::string serverGroupType_;
|
||||
std::string vpcId_;
|
||||
UchConfig uchConfig_;
|
||||
|
||||
@@ -37,10 +37,12 @@ namespace AlibabaCloud
|
||||
EnableLoadBalancerAccessLogResult();
|
||||
explicit EnableLoadBalancerAccessLogResult(const std::string &payload);
|
||||
~EnableLoadBalancerAccessLogResult();
|
||||
std::string getJobId()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string jobId_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -32,6 +32,11 @@ namespace AlibabaCloud
|
||||
class ALIBABACLOUD_ALB_EXPORT GetHealthCheckTemplateAttributeResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Tag
|
||||
{
|
||||
std::string value;
|
||||
std::string key;
|
||||
};
|
||||
|
||||
|
||||
GetHealthCheckTemplateAttributeResult();
|
||||
@@ -54,6 +59,7 @@ namespace AlibabaCloud
|
||||
int getHealthyThreshold()const;
|
||||
std::string getServiceManagedMode()const;
|
||||
std::string getHealthCheckProtocol()const;
|
||||
std::vector<Tag> getTags()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
@@ -75,6 +81,7 @@ namespace AlibabaCloud
|
||||
int healthyThreshold_;
|
||||
std::string serviceManagedMode_;
|
||||
std::string healthCheckProtocol_;
|
||||
std::vector<Tag> tags_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -99,6 +101,19 @@ namespace AlibabaCloud
|
||||
std::string type;
|
||||
ForwardGroupConfig forwardGroupConfig;
|
||||
};
|
||||
struct Tag
|
||||
{
|
||||
std::string value;
|
||||
std::string key;
|
||||
};
|
||||
struct AssociatedResource
|
||||
{
|
||||
std::string status;
|
||||
std::string associatedResourceId;
|
||||
std::string associatedMode;
|
||||
std::string associatedResourceType;
|
||||
std::string policyId;
|
||||
};
|
||||
|
||||
|
||||
GetListenerAttributeResult();
|
||||
@@ -109,6 +124,7 @@ namespace AlibabaCloud
|
||||
int getListenerPort()const;
|
||||
int getRequestTimeout()const;
|
||||
bool getHttp2Enabled()const;
|
||||
std::vector<AssociatedResource> getAssociatedResources()const;
|
||||
std::vector<DefaultAction> getDefaultActions()const;
|
||||
std::vector<Certificate> getCertificates()const;
|
||||
int getIdleTimeout()const;
|
||||
@@ -122,6 +138,7 @@ namespace AlibabaCloud
|
||||
AclConfig getAclConfig()const;
|
||||
std::string getServiceManagedMode()const;
|
||||
XForwardedForConfig getXForwardedForConfig()const;
|
||||
std::vector<Tag> getTags()const;
|
||||
LogConfig getLogConfig()const;
|
||||
std::vector<Certificate1> getCaCertificates()const;
|
||||
std::string getListenerId()const;
|
||||
@@ -134,6 +151,7 @@ namespace AlibabaCloud
|
||||
int listenerPort_;
|
||||
int requestTimeout_;
|
||||
bool http2Enabled_;
|
||||
std::vector<AssociatedResource> associatedResources_;
|
||||
std::vector<DefaultAction> defaultActions_;
|
||||
std::vector<Certificate> certificates_;
|
||||
int idleTimeout_;
|
||||
@@ -147,6 +165,7 @@ namespace AlibabaCloud
|
||||
AclConfig aclConfig_;
|
||||
std::string serviceManagedMode_;
|
||||
XForwardedForConfig xForwardedForConfig_;
|
||||
std::vector<Tag> tags_;
|
||||
LogConfig logConfig_;
|
||||
std::vector<Certificate1> caCertificates_;
|
||||
std::string listenerId_;
|
||||
|
||||
@@ -67,9 +67,11 @@ namespace AlibabaCloud
|
||||
{
|
||||
struct LoadBalancerAddress
|
||||
{
|
||||
std::vector<std::string> ipv6LocalAddresses;
|
||||
std::string intranetAddress;
|
||||
std::string intranetAddressHcStatus;
|
||||
std::string address;
|
||||
std::vector<std::string> ipv4LocalAddresses;
|
||||
std::string allocationId;
|
||||
std::string ipv6AddressHcStatus;
|
||||
std::string eipType;
|
||||
@@ -82,6 +84,14 @@ namespace AlibabaCloud
|
||||
std::string eipType;
|
||||
std::vector<ZoneMapping::LoadBalancerAddress> loadBalancerAddresses;
|
||||
};
|
||||
struct AssociatedResource
|
||||
{
|
||||
std::string status;
|
||||
std::string associatedResourceId;
|
||||
std::string associatedMode;
|
||||
std::string associatedResourceType;
|
||||
std::string policyId;
|
||||
};
|
||||
|
||||
|
||||
GetLoadBalancerAttributeResult();
|
||||
@@ -105,6 +115,7 @@ namespace AlibabaCloud
|
||||
bool getBackToOriginRouteEnabled()const;
|
||||
std::string getLoadBalancerEdition()const;
|
||||
LoadBalancerBillingConfig getLoadBalancerBillingConfig()const;
|
||||
std::vector<AssociatedResource> getAssociatedResources()const;
|
||||
std::string getCreateTime()const;
|
||||
ModificationProtectionConfig getModificationProtectionConfig()const;
|
||||
std::vector<std::string> getSecurityGroupIds()const;
|
||||
@@ -140,6 +151,7 @@ namespace AlibabaCloud
|
||||
bool backToOriginRouteEnabled_;
|
||||
std::string loadBalancerEdition_;
|
||||
LoadBalancerBillingConfig loadBalancerBillingConfig_;
|
||||
std::vector<AssociatedResource> associatedResources_;
|
||||
std::string createTime_;
|
||||
ModificationProtectionConfig modificationProtectionConfig_;
|
||||
std::vector<std::string> securityGroupIds_;
|
||||
|
||||
@@ -28,6 +28,10 @@ namespace Alb {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ALB_EXPORT ListAclsRequest : public RpcServiceRequest {
|
||||
public:
|
||||
struct Tag {
|
||||
std::string value;
|
||||
std::string key;
|
||||
};
|
||||
ListAclsRequest();
|
||||
~ListAclsRequest();
|
||||
std::vector<std::string> getAclIds() const;
|
||||
@@ -38,6 +42,8 @@ public:
|
||||
void setResourceGroupId(const std::string &resourceGroupId);
|
||||
std::string getNextToken() const;
|
||||
void setNextToken(const std::string &nextToken);
|
||||
std::vector<Tag> getTag() const;
|
||||
void setTag(const std::vector<Tag> &tag);
|
||||
std::vector<std::string> getAclNames() const;
|
||||
void setAclNames(const std::vector<std::string> &aclNames);
|
||||
int getMaxResults() const;
|
||||
@@ -48,6 +54,7 @@ private:
|
||||
std::string addressIPVersion_;
|
||||
std::string resourceGroupId_;
|
||||
std::string nextToken_;
|
||||
std::vector<Tag> tag_;
|
||||
std::vector<std::string> aclNames_;
|
||||
int maxResults_;
|
||||
};
|
||||
|
||||
@@ -34,6 +34,11 @@ namespace AlibabaCloud
|
||||
public:
|
||||
struct Acl
|
||||
{
|
||||
struct Tag
|
||||
{
|
||||
std::string value;
|
||||
std::string key;
|
||||
};
|
||||
bool serviceManagedEnabled;
|
||||
bool configManagedEnabled;
|
||||
std::string aclStatus;
|
||||
@@ -42,6 +47,7 @@ namespace AlibabaCloud
|
||||
std::string addressIPVersion;
|
||||
std::string serviceManagedMode;
|
||||
std::string createTime;
|
||||
std::vector<Acl::Tag> tags;
|
||||
std::string aclName;
|
||||
};
|
||||
|
||||
|
||||
@@ -28,10 +28,16 @@ namespace Alb {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ALB_EXPORT ListHealthCheckTemplatesRequest : public RpcServiceRequest {
|
||||
public:
|
||||
struct Tag {
|
||||
std::string value;
|
||||
std::string key;
|
||||
};
|
||||
ListHealthCheckTemplatesRequest();
|
||||
~ListHealthCheckTemplatesRequest();
|
||||
std::string getNextToken() const;
|
||||
void setNextToken(const std::string &nextToken);
|
||||
std::vector<Tag> getTag() const;
|
||||
void setTag(const std::vector<Tag> &tag);
|
||||
std::vector<std::string> getHealthCheckTemplateNames() const;
|
||||
void setHealthCheckTemplateNames(const std::vector<std::string> &healthCheckTemplateNames);
|
||||
int getMaxResults() const;
|
||||
@@ -41,6 +47,7 @@ public:
|
||||
|
||||
private:
|
||||
std::string nextToken_;
|
||||
std::vector<Tag> tag_;
|
||||
std::vector<std::string> healthCheckTemplateNames_;
|
||||
int maxResults_;
|
||||
std::vector<std::string> healthCheckTemplateIds_;
|
||||
|
||||
@@ -34,6 +34,11 @@ namespace AlibabaCloud
|
||||
public:
|
||||
struct HealthCheckTemplate
|
||||
{
|
||||
struct Tag
|
||||
{
|
||||
std::string value;
|
||||
std::string key;
|
||||
};
|
||||
std::string healthCheckTemplateId;
|
||||
bool serviceManagedEnabled;
|
||||
int healthCheckInterval;
|
||||
@@ -51,6 +56,7 @@ namespace AlibabaCloud
|
||||
int healthyThreshold;
|
||||
std::string serviceManagedMode;
|
||||
std::string healthCheckProtocol;
|
||||
std::vector<HealthCheckTemplate::Tag> tags;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -34,6 +34,8 @@ public:
|
||||
void setCertificateType(const std::string &certificateType);
|
||||
std::string getListenerId() const;
|
||||
void setListenerId(const std::string &listenerId);
|
||||
std::vector<std::string> getCertificateIds() const;
|
||||
void setCertificateIds(const std::vector<std::string> &certificateIds);
|
||||
std::string getNextToken() const;
|
||||
void setNextToken(const std::string &nextToken);
|
||||
int getMaxResults() const;
|
||||
@@ -42,6 +44,7 @@ public:
|
||||
private:
|
||||
std::string certificateType_;
|
||||
std::string listenerId_;
|
||||
std::vector<std::string> certificateIds_;
|
||||
std::string nextToken_;
|
||||
int maxResults_;
|
||||
};
|
||||
|
||||
@@ -28,12 +28,18 @@ namespace Alb {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ALB_EXPORT ListListenersRequest : public RpcServiceRequest {
|
||||
public:
|
||||
struct Tag {
|
||||
std::string value;
|
||||
std::string key;
|
||||
};
|
||||
ListListenersRequest();
|
||||
~ListListenersRequest();
|
||||
std::vector<std::string> getLoadBalancerIds() const;
|
||||
void setLoadBalancerIds(const std::vector<std::string> &loadBalancerIds);
|
||||
std::string getNextToken() const;
|
||||
void setNextToken(const std::string &nextToken);
|
||||
std::vector<Tag> getTag() const;
|
||||
void setTag(const std::vector<Tag> &tag);
|
||||
bool getAccessLogRecordCustomizedHeadersEnabled() const;
|
||||
void setAccessLogRecordCustomizedHeadersEnabled(bool accessLogRecordCustomizedHeadersEnabled);
|
||||
std::string getListenerProtocol() const;
|
||||
@@ -42,16 +48,20 @@ public:
|
||||
void setListenerIds(const std::vector<std::string> &listenerIds);
|
||||
int getMaxResults() const;
|
||||
void setMaxResults(int maxResults);
|
||||
bool getIsAssociatedAcl() const;
|
||||
void setIsAssociatedAcl(bool isAssociatedAcl);
|
||||
std::string getStatus() const;
|
||||
void setStatus(const std::string &status);
|
||||
|
||||
private:
|
||||
std::vector<std::string> loadBalancerIds_;
|
||||
std::string nextToken_;
|
||||
std::vector<Tag> tag_;
|
||||
bool accessLogRecordCustomizedHeadersEnabled_;
|
||||
std::string listenerProtocol_;
|
||||
std::vector<std::string> listenerIds_;
|
||||
int maxResults_;
|
||||
bool isAssociatedAcl_;
|
||||
std::string status_;
|
||||
};
|
||||
} // namespace Model
|
||||
|
||||
@@ -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;
|
||||
@@ -81,10 +83,24 @@ namespace AlibabaCloud
|
||||
std::string type;
|
||||
ForwardGroupConfig forwardGroupConfig;
|
||||
};
|
||||
struct Tag
|
||||
{
|
||||
std::string value;
|
||||
std::string key;
|
||||
};
|
||||
struct AssociatedResource
|
||||
{
|
||||
std::string status;
|
||||
std::string associatedResourceId;
|
||||
std::string associatedMode;
|
||||
std::string associatedResourceType;
|
||||
std::string policyId;
|
||||
};
|
||||
int listenerPort;
|
||||
bool serviceManagedEnabled;
|
||||
int requestTimeout;
|
||||
bool http2Enabled;
|
||||
std::vector<Listener::AssociatedResource> associatedResources;
|
||||
std::vector<Listener::DefaultAction> defaultActions;
|
||||
int idleTimeout;
|
||||
std::string loadBalancerId;
|
||||
@@ -96,6 +112,7 @@ namespace AlibabaCloud
|
||||
std::string listenerDescription;
|
||||
std::string serviceManagedMode;
|
||||
XForwardedForConfig xForwardedForConfig;
|
||||
std::vector<Listener::Tag> tags;
|
||||
LogConfig logConfig;
|
||||
std::string listenerId;
|
||||
};
|
||||
|
||||
@@ -48,6 +48,8 @@ public:
|
||||
void setNextToken(const std::string &nextToken);
|
||||
std::string getLoadBalancerBussinessStatus() const;
|
||||
void setLoadBalancerBussinessStatus(const std::string &loadBalancerBussinessStatus);
|
||||
std::string getDNSName() const;
|
||||
void setDNSName(const std::string &dNSName);
|
||||
std::string getAddressType() const;
|
||||
void setAddressType(const std::string &addressType);
|
||||
std::vector<std::string> getVpcIds() const;
|
||||
@@ -77,6 +79,7 @@ private:
|
||||
std::string resourceGroupId_;
|
||||
std::string nextToken_;
|
||||
std::string loadBalancerBussinessStatus_;
|
||||
std::string dNSName_;
|
||||
std::string addressType_;
|
||||
std::vector<std::string> vpcIds_;
|
||||
std::vector<Tag> tag_;
|
||||
|
||||
@@ -65,29 +65,38 @@ namespace AlibabaCloud
|
||||
std::string value;
|
||||
std::string key;
|
||||
};
|
||||
struct AssociatedResource
|
||||
{
|
||||
std::string status;
|
||||
std::string associatedResourceId;
|
||||
std::string associatedMode;
|
||||
std::string associatedResourceType;
|
||||
std::string policyId;
|
||||
};
|
||||
bool serviceManagedEnabled;
|
||||
std::string loadBalancerEdition;
|
||||
std::string addressIpVersion;
|
||||
std::string resourceGroupId;
|
||||
LoadBalancerBillingConfig loadBalancerBillingConfig;
|
||||
std::string createTime;
|
||||
std::string loadBalancerId;
|
||||
std::string dNSName;
|
||||
ModificationProtectionConfig modificationProtectionConfig;
|
||||
std::string ipv6AddressType;
|
||||
std::string loadBalancerName;
|
||||
AccessLogConfig accessLogConfig;
|
||||
int bandwidthCapacity;
|
||||
bool configManagedEnabled;
|
||||
DeletionProtectionConfig deletionProtectionConfig;
|
||||
std::string loadBalancerBussinessStatus;
|
||||
std::string vpcId;
|
||||
std::string serviceManagedMode;
|
||||
std::string bandwidthPackageId;
|
||||
std::vector<LoadBalancer::Tag> tags;
|
||||
std::string loadBalancerEdition;
|
||||
LoadBalancerBillingConfig loadBalancerBillingConfig;
|
||||
std::vector<LoadBalancer::AssociatedResource> associatedResources;
|
||||
std::string createTime;
|
||||
ModificationProtectionConfig modificationProtectionConfig;
|
||||
std::string loadBalancerName;
|
||||
AccessLogConfig accessLogConfig;
|
||||
bool configManagedEnabled;
|
||||
std::string loadBalancerBussinessStatus;
|
||||
std::string vpcId;
|
||||
std::string addressAllocatedMode;
|
||||
std::string addressType;
|
||||
std::string loadBalancerStatus;
|
||||
std::vector<LoadBalancer::Tag> tags;
|
||||
std::vector<LoadBalancer::LoadBalancerOperationLock> loadBalancerOperationLocks;
|
||||
};
|
||||
|
||||
|
||||
@@ -28,6 +28,10 @@ namespace Alb {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ALB_EXPORT ListRulesRequest : public RpcServiceRequest {
|
||||
public:
|
||||
struct Tag {
|
||||
std::string value;
|
||||
std::string key;
|
||||
};
|
||||
ListRulesRequest();
|
||||
~ListRulesRequest();
|
||||
std::vector<std::string> getLoadBalancerIds() const;
|
||||
@@ -36,6 +40,8 @@ public:
|
||||
void setListenerId(const std::string &listenerId);
|
||||
std::string getNextToken() const;
|
||||
void setNextToken(const std::string &nextToken);
|
||||
std::vector<Tag> getTag() const;
|
||||
void setTag(const std::vector<Tag> &tag);
|
||||
std::string getDirection() const;
|
||||
void setDirection(const std::string &direction);
|
||||
std::vector<std::string> getRuleIds() const;
|
||||
@@ -49,6 +55,7 @@ private:
|
||||
std::vector<std::string> loadBalancerIds_;
|
||||
std::string listenerId_;
|
||||
std::string nextToken_;
|
||||
std::vector<Tag> tag_;
|
||||
std::string direction_;
|
||||
std::vector<std::string> ruleIds_;
|
||||
std::vector<std::string> listenerIds_;
|
||||
|
||||
@@ -184,6 +184,11 @@ namespace AlibabaCloud
|
||||
HeaderConfig headerConfig;
|
||||
SourceIpConfig sourceIpConfig;
|
||||
};
|
||||
struct Tag
|
||||
{
|
||||
std::string value;
|
||||
std::string key;
|
||||
};
|
||||
std::vector<Rule::Action> ruleActions;
|
||||
bool serviceManagedEnabled;
|
||||
int priority;
|
||||
@@ -193,6 +198,7 @@ namespace AlibabaCloud
|
||||
std::string loadBalancerId;
|
||||
std::string ruleStatus;
|
||||
std::string direction;
|
||||
std::vector<Rule::Tag> tags;
|
||||
std::string ruleName;
|
||||
std::string listenerId;
|
||||
};
|
||||
|
||||
@@ -28,6 +28,10 @@ namespace Alb {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ALB_EXPORT ListSecurityPoliciesRequest : public RpcServiceRequest {
|
||||
public:
|
||||
struct Tag {
|
||||
std::string value;
|
||||
std::string key;
|
||||
};
|
||||
ListSecurityPoliciesRequest();
|
||||
~ListSecurityPoliciesRequest();
|
||||
std::vector<std::string> getSecurityPolicyNames() const;
|
||||
@@ -36,6 +40,8 @@ public:
|
||||
void setResourceGroupId(const std::string &resourceGroupId);
|
||||
std::string getNextToken() const;
|
||||
void setNextToken(const std::string &nextToken);
|
||||
std::vector<Tag> getTag() const;
|
||||
void setTag(const std::vector<Tag> &tag);
|
||||
std::vector<std::string> getSecurityPolicyIds() const;
|
||||
void setSecurityPolicyIds(const std::vector<std::string> &securityPolicyIds);
|
||||
int getMaxResults() const;
|
||||
@@ -45,6 +51,7 @@ private:
|
||||
std::vector<std::string> securityPolicyNames_;
|
||||
std::string resourceGroupId_;
|
||||
std::string nextToken_;
|
||||
std::vector<Tag> tag_;
|
||||
std::vector<std::string> securityPolicyIds_;
|
||||
int maxResults_;
|
||||
};
|
||||
|
||||
@@ -34,6 +34,11 @@ namespace AlibabaCloud
|
||||
public:
|
||||
struct SecurityPolicy
|
||||
{
|
||||
struct Tag
|
||||
{
|
||||
std::string value;
|
||||
std::string key;
|
||||
};
|
||||
bool serviceManagedEnabled;
|
||||
std::vector<std::string> ciphers;
|
||||
std::string securityPolicyId;
|
||||
@@ -43,6 +48,7 @@ namespace AlibabaCloud
|
||||
std::string createTime;
|
||||
std::vector<std::string> tLSVersions;
|
||||
std::string securityPolicyName;
|
||||
std::vector<SecurityPolicy::Tag> tags;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -63,34 +63,47 @@ namespace AlibabaCloud
|
||||
std::string type;
|
||||
std::string value;
|
||||
};
|
||||
struct ConnectionDrainConfig
|
||||
{
|
||||
bool connectionDrainEnabled;
|
||||
int connectionDrainTimeout;
|
||||
};
|
||||
struct SlowStartConfig
|
||||
{
|
||||
bool slowStartEnabled;
|
||||
int slowStartDuration;
|
||||
};
|
||||
struct Tag
|
||||
{
|
||||
std::string value;
|
||||
std::string key;
|
||||
};
|
||||
bool serviceManagedEnabled;
|
||||
std::vector<std::string> relatedLoadBalancerIds;
|
||||
std::vector<std::string> relatedListenerIds;
|
||||
std::string resourceGroupId;
|
||||
UchConfig uchConfig;
|
||||
std::string scheduler;
|
||||
bool upstreamKeepaliveEnabled;
|
||||
StickySessionConfig stickySessionConfig;
|
||||
std::string createTime;
|
||||
std::vector<std::string> relatedRuleIds;
|
||||
std::string serverGroupId;
|
||||
int serverCount;
|
||||
std::string serverGroupType;
|
||||
std::string serverGroupStatus;
|
||||
bool crossZoneEnabled;
|
||||
bool ipv6Enabled;
|
||||
bool configManagedEnabled;
|
||||
std::string vpcId;
|
||||
std::string serviceName;
|
||||
SlowStartConfig slowStartConfig;
|
||||
std::string serviceManagedMode;
|
||||
HealthCheckConfig healthCheckConfig;
|
||||
std::string protocol;
|
||||
std::vector<ServerGroup::Tag> tags;
|
||||
std::string serverGroupName;
|
||||
ConnectionDrainConfig connectionDrainConfig;
|
||||
std::vector<std::string> relatedLoadBalancerIds;
|
||||
UchConfig uchConfig;
|
||||
bool upstreamKeepaliveEnabled;
|
||||
StickySessionConfig stickySessionConfig;
|
||||
std::string createTime;
|
||||
std::string serverGroupId;
|
||||
std::string serverGroupType;
|
||||
std::string serverGroupStatus;
|
||||
bool configManagedEnabled;
|
||||
std::string vpcId;
|
||||
std::string serviceName;
|
||||
HealthCheckConfig healthCheckConfig;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT 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_ALB_MODEL_LOADBALANCERJOINSECURITYGROUPREQUEST_H_
|
||||
#define ALIBABACLOUD_ALB_MODEL_LOADBALANCERJOINSECURITYGROUPREQUEST_H_
|
||||
|
||||
#include <alibabacloud/alb/AlbExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Alb {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ALB_EXPORT LoadBalancerJoinSecurityGroupRequest : public RpcServiceRequest {
|
||||
public:
|
||||
LoadBalancerJoinSecurityGroupRequest();
|
||||
~LoadBalancerJoinSecurityGroupRequest();
|
||||
std::string getClientToken() const;
|
||||
void setClientToken(const std::string &clientToken);
|
||||
bool getDryRun() const;
|
||||
void setDryRun(bool dryRun);
|
||||
std::vector<std::string> getSecurityGroupIds() const;
|
||||
void setSecurityGroupIds(const std::vector<std::string> &securityGroupIds);
|
||||
std::string getLoadBalancerId() const;
|
||||
void setLoadBalancerId(const std::string &loadBalancerId);
|
||||
|
||||
private:
|
||||
std::string clientToken_;
|
||||
bool dryRun_;
|
||||
std::vector<std::string> securityGroupIds_;
|
||||
std::string loadBalancerId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Alb
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ALB_MODEL_LOADBALANCERJOINSECURITYGROUPREQUEST_H_
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT 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_ALB_MODEL_LOADBALANCERJOINSECURITYGROUPRESULT_H_
|
||||
#define ALIBABACLOUD_ALB_MODEL_LOADBALANCERJOINSECURITYGROUPRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/alb/AlbExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Alb
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ALB_EXPORT LoadBalancerJoinSecurityGroupResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
LoadBalancerJoinSecurityGroupResult();
|
||||
explicit LoadBalancerJoinSecurityGroupResult(const std::string &payload);
|
||||
~LoadBalancerJoinSecurityGroupResult();
|
||||
std::string getJobId()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string jobId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ALB_MODEL_LOADBALANCERJOINSECURITYGROUPRESULT_H_
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT 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_ALB_MODEL_LOADBALANCERLEAVESECURITYGROUPREQUEST_H_
|
||||
#define ALIBABACLOUD_ALB_MODEL_LOADBALANCERLEAVESECURITYGROUPREQUEST_H_
|
||||
|
||||
#include <alibabacloud/alb/AlbExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Alb {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ALB_EXPORT LoadBalancerLeaveSecurityGroupRequest : public RpcServiceRequest {
|
||||
public:
|
||||
LoadBalancerLeaveSecurityGroupRequest();
|
||||
~LoadBalancerLeaveSecurityGroupRequest();
|
||||
std::string getClientToken() const;
|
||||
void setClientToken(const std::string &clientToken);
|
||||
bool getDryRun() const;
|
||||
void setDryRun(bool dryRun);
|
||||
std::vector<std::string> getSecurityGroupIds() const;
|
||||
void setSecurityGroupIds(const std::vector<std::string> &securityGroupIds);
|
||||
std::string getLoadBalancerId() const;
|
||||
void setLoadBalancerId(const std::string &loadBalancerId);
|
||||
|
||||
private:
|
||||
std::string clientToken_;
|
||||
bool dryRun_;
|
||||
std::vector<std::string> securityGroupIds_;
|
||||
std::string loadBalancerId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Alb
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ALB_MODEL_LOADBALANCERLEAVESECURITYGROUPREQUEST_H_
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT 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_ALB_MODEL_LOADBALANCERLEAVESECURITYGROUPRESULT_H_
|
||||
#define ALIBABACLOUD_ALB_MODEL_LOADBALANCERLEAVESECURITYGROUPRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/alb/AlbExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Alb
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ALB_EXPORT LoadBalancerLeaveSecurityGroupResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
LoadBalancerLeaveSecurityGroupResult();
|
||||
explicit LoadBalancerLeaveSecurityGroupResult(const std::string &payload);
|
||||
~LoadBalancerLeaveSecurityGroupResult();
|
||||
std::string getJobId()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string jobId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ALB_MODEL_LOADBALANCERLEAVESECURITYGROUPRESULT_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_ALB_MODEL_STARTSHIFTLOADBALANCERZONESREQUEST_H_
|
||||
#define ALIBABACLOUD_ALB_MODEL_STARTSHIFTLOADBALANCERZONESREQUEST_H_
|
||||
|
||||
#include <alibabacloud/alb/AlbExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Alb {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_ALB_EXPORT StartShiftLoadBalancerZonesRequest : public RpcServiceRequest {
|
||||
public:
|
||||
struct ZoneMappings {
|
||||
std::string vSwitchId;
|
||||
std::string zoneId;
|
||||
};
|
||||
StartShiftLoadBalancerZonesRequest();
|
||||
~StartShiftLoadBalancerZonesRequest();
|
||||
std::string getClientToken() const;
|
||||
void setClientToken(const std::string &clientToken);
|
||||
bool getDryRun() const;
|
||||
void setDryRun(bool dryRun);
|
||||
std::vector<ZoneMappings> getZoneMappings() const;
|
||||
void setZoneMappings(const std::vector<ZoneMappings> &zoneMappings);
|
||||
std::string getLoadBalancerId() const;
|
||||
void setLoadBalancerId(const std::string &loadBalancerId);
|
||||
|
||||
private:
|
||||
std::string clientToken_;
|
||||
bool dryRun_;
|
||||
std::vector<ZoneMappings> zoneMappings_;
|
||||
std::string loadBalancerId_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Alb
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_ALB_MODEL_STARTSHIFTLOADBALANCERZONESREQUEST_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_ALB_MODEL_STARTSHIFTLOADBALANCERZONESRESULT_H_
|
||||
#define ALIBABACLOUD_ALB_MODEL_STARTSHIFTLOADBALANCERZONESRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/alb/AlbExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Alb
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ALB_EXPORT StartShiftLoadBalancerZonesResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
StartShiftLoadBalancerZonesResult();
|
||||
explicit StartShiftLoadBalancerZonesResult(const std::string &payload);
|
||||
~StartShiftLoadBalancerZonesResult();
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ALB_MODEL_STARTSHIFTLOADBALANCERZONESRESULT_H_
|
||||
@@ -51,6 +51,8 @@ public:
|
||||
std::string xForwardedForClientCertSubjectDNAlias;
|
||||
bool xForwardedForClientSourceIpsEnabled;
|
||||
bool xForwardedForClientCertIssuerDNEnabled;
|
||||
bool xForwardedForHostEnabled;
|
||||
std::string xForwardedForProcessingMode;
|
||||
bool xForwardedForClientCertFingerprintEnabled;
|
||||
std::string xForwardedForClientCertIssuerDNAlias;
|
||||
bool xForwardedForProtoEnabled;
|
||||
|
||||
@@ -33,6 +33,7 @@ public:
|
||||
std::string eipType;
|
||||
std::string zoneId;
|
||||
std::string allocationId;
|
||||
std::string intranetAddress;
|
||||
};
|
||||
UpdateLoadBalancerZonesRequest();
|
||||
~UpdateLoadBalancerZonesRequest();
|
||||
|
||||
@@ -46,24 +46,36 @@ public:
|
||||
std::string healthCheckHttpVersion;
|
||||
int healthCheckConnectPort;
|
||||
};
|
||||
struct SlowStartConfig {
|
||||
int slowStartDuration;
|
||||
bool slowStartEnabled;
|
||||
};
|
||||
struct StickySessionConfig {
|
||||
bool stickySessionEnabled;
|
||||
std::string cookie;
|
||||
int cookieTimeout;
|
||||
std::string stickySessionType;
|
||||
};
|
||||
struct ConnectionDrainConfig {
|
||||
bool connectionDrainEnabled;
|
||||
int connectionDrainTimeout;
|
||||
};
|
||||
struct UchConfig {
|
||||
std::string type;
|
||||
std::string value;
|
||||
};
|
||||
UpdateServerGroupAttributeRequest();
|
||||
~UpdateServerGroupAttributeRequest();
|
||||
bool getCrossZoneEnabled() const;
|
||||
void setCrossZoneEnabled(bool crossZoneEnabled);
|
||||
std::string getServerGroupName() const;
|
||||
void setServerGroupName(const std::string &serverGroupName);
|
||||
std::string getClientToken() const;
|
||||
void setClientToken(const std::string &clientToken);
|
||||
HealthCheckConfig getHealthCheckConfig() const;
|
||||
void setHealthCheckConfig(const HealthCheckConfig &healthCheckConfig);
|
||||
SlowStartConfig getSlowStartConfig() const;
|
||||
void setSlowStartConfig(const SlowStartConfig &slowStartConfig);
|
||||
std::string getScheduler() const;
|
||||
void setScheduler(const std::string &scheduler);
|
||||
std::string getServerGroupId() const;
|
||||
@@ -76,19 +88,24 @@ public:
|
||||
void setStickySessionConfig(const StickySessionConfig &stickySessionConfig);
|
||||
bool getDryRun() const;
|
||||
void setDryRun(bool dryRun);
|
||||
ConnectionDrainConfig getConnectionDrainConfig() const;
|
||||
void setConnectionDrainConfig(const ConnectionDrainConfig &connectionDrainConfig);
|
||||
UchConfig getUchConfig() const;
|
||||
void setUchConfig(const UchConfig &uchConfig);
|
||||
|
||||
private:
|
||||
bool crossZoneEnabled_;
|
||||
std::string serverGroupName_;
|
||||
std::string clientToken_;
|
||||
HealthCheckConfig healthCheckConfig_;
|
||||
SlowStartConfig slowStartConfig_;
|
||||
std::string scheduler_;
|
||||
std::string serverGroupId_;
|
||||
bool upstreamKeepaliveEnabled_;
|
||||
std::string serviceName_;
|
||||
StickySessionConfig stickySessionConfig_;
|
||||
bool dryRun_;
|
||||
ConnectionDrainConfig connectionDrainConfig_;
|
||||
UchConfig uchConfig_;
|
||||
};
|
||||
} // namespace Model
|
||||
|
||||
@@ -267,6 +267,42 @@ AlbClient::AttachCommonBandwidthPackageToLoadBalancerOutcomeCallable AlbClient::
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AlbClient::CancelShiftLoadBalancerZonesOutcome AlbClient::cancelShiftLoadBalancerZones(const CancelShiftLoadBalancerZonesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CancelShiftLoadBalancerZonesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CancelShiftLoadBalancerZonesOutcome(CancelShiftLoadBalancerZonesResult(outcome.result()));
|
||||
else
|
||||
return CancelShiftLoadBalancerZonesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AlbClient::cancelShiftLoadBalancerZonesAsync(const CancelShiftLoadBalancerZonesRequest& request, const CancelShiftLoadBalancerZonesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, cancelShiftLoadBalancerZones(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AlbClient::CancelShiftLoadBalancerZonesOutcomeCallable AlbClient::cancelShiftLoadBalancerZonesCallable(const CancelShiftLoadBalancerZonesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CancelShiftLoadBalancerZonesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->cancelShiftLoadBalancerZones(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AlbClient::CreateAScriptsOutcome AlbClient::createAScripts(const CreateAScriptsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -2103,6 +2139,78 @@ AlbClient::ListTagValuesOutcomeCallable AlbClient::listTagValuesCallable(const L
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AlbClient::LoadBalancerJoinSecurityGroupOutcome AlbClient::loadBalancerJoinSecurityGroup(const LoadBalancerJoinSecurityGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return LoadBalancerJoinSecurityGroupOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return LoadBalancerJoinSecurityGroupOutcome(LoadBalancerJoinSecurityGroupResult(outcome.result()));
|
||||
else
|
||||
return LoadBalancerJoinSecurityGroupOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AlbClient::loadBalancerJoinSecurityGroupAsync(const LoadBalancerJoinSecurityGroupRequest& request, const LoadBalancerJoinSecurityGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, loadBalancerJoinSecurityGroup(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AlbClient::LoadBalancerJoinSecurityGroupOutcomeCallable AlbClient::loadBalancerJoinSecurityGroupCallable(const LoadBalancerJoinSecurityGroupRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<LoadBalancerJoinSecurityGroupOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->loadBalancerJoinSecurityGroup(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AlbClient::LoadBalancerLeaveSecurityGroupOutcome AlbClient::loadBalancerLeaveSecurityGroup(const LoadBalancerLeaveSecurityGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return LoadBalancerLeaveSecurityGroupOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return LoadBalancerLeaveSecurityGroupOutcome(LoadBalancerLeaveSecurityGroupResult(outcome.result()));
|
||||
else
|
||||
return LoadBalancerLeaveSecurityGroupOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AlbClient::loadBalancerLeaveSecurityGroupAsync(const LoadBalancerLeaveSecurityGroupRequest& request, const LoadBalancerLeaveSecurityGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, loadBalancerLeaveSecurityGroup(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AlbClient::LoadBalancerLeaveSecurityGroupOutcomeCallable AlbClient::loadBalancerLeaveSecurityGroupCallable(const LoadBalancerLeaveSecurityGroupRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<LoadBalancerLeaveSecurityGroupOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->loadBalancerLeaveSecurityGroup(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AlbClient::MoveResourceGroupOutcome AlbClient::moveResourceGroup(const MoveResourceGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -2283,6 +2391,42 @@ AlbClient::StartListenerOutcomeCallable AlbClient::startListenerCallable(const S
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AlbClient::StartShiftLoadBalancerZonesOutcome AlbClient::startShiftLoadBalancerZones(const StartShiftLoadBalancerZonesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return StartShiftLoadBalancerZonesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return StartShiftLoadBalancerZonesOutcome(StartShiftLoadBalancerZonesResult(outcome.result()));
|
||||
else
|
||||
return StartShiftLoadBalancerZonesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AlbClient::startShiftLoadBalancerZonesAsync(const StartShiftLoadBalancerZonesRequest& request, const StartShiftLoadBalancerZonesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, startShiftLoadBalancerZones(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AlbClient::StartShiftLoadBalancerZonesOutcomeCallable AlbClient::startShiftLoadBalancerZonesCallable(const StartShiftLoadBalancerZonesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<StartShiftLoadBalancerZonesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->startShiftLoadBalancerZones(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AlbClient::StopListenerOutcome AlbClient::stopListener(const StopListenerRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
66
alb/src/model/CancelShiftLoadBalancerZonesRequest.cc
Normal file
66
alb/src/model/CancelShiftLoadBalancerZonesRequest.cc
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/alb/model/CancelShiftLoadBalancerZonesRequest.h>
|
||||
|
||||
using AlibabaCloud::Alb::Model::CancelShiftLoadBalancerZonesRequest;
|
||||
|
||||
CancelShiftLoadBalancerZonesRequest::CancelShiftLoadBalancerZonesRequest()
|
||||
: RpcServiceRequest("alb", "2020-06-16", "CancelShiftLoadBalancerZones") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CancelShiftLoadBalancerZonesRequest::~CancelShiftLoadBalancerZonesRequest() {}
|
||||
|
||||
std::string CancelShiftLoadBalancerZonesRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void CancelShiftLoadBalancerZonesRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
bool CancelShiftLoadBalancerZonesRequest::getDryRun() const {
|
||||
return dryRun_;
|
||||
}
|
||||
|
||||
void CancelShiftLoadBalancerZonesRequest::setDryRun(bool dryRun) {
|
||||
dryRun_ = dryRun;
|
||||
setParameter(std::string("DryRun"), dryRun ? "true" : "false");
|
||||
}
|
||||
|
||||
std::vector<CancelShiftLoadBalancerZonesRequest::ZoneMappings> CancelShiftLoadBalancerZonesRequest::getZoneMappings() const {
|
||||
return zoneMappings_;
|
||||
}
|
||||
|
||||
void CancelShiftLoadBalancerZonesRequest::setZoneMappings(const std::vector<CancelShiftLoadBalancerZonesRequest::ZoneMappings> &zoneMappings) {
|
||||
zoneMappings_ = zoneMappings;
|
||||
for(int dep1 = 0; dep1 != zoneMappings.size(); dep1++) {
|
||||
setParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".VSwitchId", zoneMappings[dep1].vSwitchId);
|
||||
setParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".ZoneId", zoneMappings[dep1].zoneId);
|
||||
}
|
||||
}
|
||||
|
||||
std::string CancelShiftLoadBalancerZonesRequest::getLoadBalancerId() const {
|
||||
return loadBalancerId_;
|
||||
}
|
||||
|
||||
void CancelShiftLoadBalancerZonesRequest::setLoadBalancerId(const std::string &loadBalancerId) {
|
||||
loadBalancerId_ = loadBalancerId;
|
||||
setParameter(std::string("LoadBalancerId"), loadBalancerId);
|
||||
}
|
||||
|
||||
44
alb/src/model/CancelShiftLoadBalancerZonesResult.cc
Normal file
44
alb/src/model/CancelShiftLoadBalancerZonesResult.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/alb/model/CancelShiftLoadBalancerZonesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Alb;
|
||||
using namespace AlibabaCloud::Alb::Model;
|
||||
|
||||
CancelShiftLoadBalancerZonesResult::CancelShiftLoadBalancerZonesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CancelShiftLoadBalancerZonesResult::CancelShiftLoadBalancerZonesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CancelShiftLoadBalancerZonesResult::~CancelShiftLoadBalancerZonesResult()
|
||||
{}
|
||||
|
||||
void CancelShiftLoadBalancerZonesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -61,6 +61,18 @@ void CreateAclRequest::setResourceGroupId(const std::string &resourceGroupId) {
|
||||
setParameter(std::string("ResourceGroupId"), resourceGroupId);
|
||||
}
|
||||
|
||||
std::vector<CreateAclRequest::Tag> CreateAclRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void CreateAclRequest::setTag(const std::vector<CreateAclRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
|
||||
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
|
||||
}
|
||||
}
|
||||
|
||||
bool CreateAclRequest::getDryRun() const {
|
||||
return dryRun_;
|
||||
}
|
||||
|
||||
@@ -88,6 +88,18 @@ void CreateHealthCheckTemplateRequest::setHealthCheckPath(const std::string &hea
|
||||
setParameter(std::string("HealthCheckPath"), healthCheckPath);
|
||||
}
|
||||
|
||||
std::vector<CreateHealthCheckTemplateRequest::Tag> CreateHealthCheckTemplateRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void CreateHealthCheckTemplateRequest::setTag(const std::vector<CreateHealthCheckTemplateRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
|
||||
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<CreateHealthCheckTemplateRequest::std::string> CreateHealthCheckTemplateRequest::getHealthCheckCodes() const {
|
||||
return healthCheckCodes_;
|
||||
}
|
||||
|
||||
@@ -62,6 +62,18 @@ void CreateListenerRequest::setHttp2Enabled(bool http2Enabled) {
|
||||
setParameter(std::string("Http2Enabled"), http2Enabled ? "true" : "false");
|
||||
}
|
||||
|
||||
std::vector<CreateListenerRequest::Tag> CreateListenerRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void CreateListenerRequest::setTag(const std::vector<CreateListenerRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
|
||||
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<CreateListenerRequest::DefaultActions> CreateListenerRequest::getDefaultActions() const {
|
||||
return defaultActions_;
|
||||
}
|
||||
@@ -124,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");
|
||||
|
||||
@@ -110,6 +110,18 @@ void CreateLoadBalancerRequest::setAddressType(const std::string &addressType) {
|
||||
setParameter(std::string("AddressType"), addressType);
|
||||
}
|
||||
|
||||
std::vector<CreateLoadBalancerRequest::Tag> CreateLoadBalancerRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void CreateLoadBalancerRequest::setTag(const std::vector<CreateLoadBalancerRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
|
||||
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
|
||||
}
|
||||
}
|
||||
|
||||
std::string CreateLoadBalancerRequest::getAddressAllocatedMode() const {
|
||||
return addressAllocatedMode_;
|
||||
}
|
||||
@@ -139,6 +151,7 @@ void CreateLoadBalancerRequest::setZoneMappings(const std::vector<CreateLoadBala
|
||||
setParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".EipType", zoneMappings[dep1].eipType);
|
||||
setParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".ZoneId", zoneMappings[dep1].zoneId);
|
||||
setParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".AllocationId", zoneMappings[dep1].allocationId);
|
||||
setParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".IntranetAddress", zoneMappings[dep1].intranetAddress);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,18 @@ void CreateRuleRequest::setListenerId(const std::string &listenerId) {
|
||||
setParameter(std::string("ListenerId"), listenerId);
|
||||
}
|
||||
|
||||
std::vector<CreateRuleRequest::Tag> CreateRuleRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void CreateRuleRequest::setTag(const std::vector<CreateRuleRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
|
||||
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
|
||||
}
|
||||
}
|
||||
|
||||
std::string CreateRuleRequest::getDirection() const {
|
||||
return direction_;
|
||||
}
|
||||
|
||||
@@ -43,88 +43,92 @@ void CreateRulesRequest::setRules(const std::vector<CreateRulesRequest::Rules> &
|
||||
for(int dep1 = 0; dep1 != rules.size(); dep1++) {
|
||||
for(int dep2 = 0; dep2 != rules[dep1].ruleConditions.size(); dep2++) {
|
||||
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].methodConfig.values.size(); dep3++) {
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".MethodConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].methodConfig.values[dep3]);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".MethodConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].methodConfig.values[dep3]);
|
||||
}
|
||||
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].sourceIpConfig.values.size(); dep3++) {
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".SourceIpConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].sourceIpConfig.values[dep3]);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".SourceIpConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].sourceIpConfig.values[dep3]);
|
||||
}
|
||||
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].hostConfig.values.size(); dep3++) {
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".HostConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].hostConfig.values[dep3]);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".HostConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].hostConfig.values[dep3]);
|
||||
}
|
||||
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].queryStringConfig.values.size(); dep3++) {
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".QueryStringConfig.Values." + std::to_string(dep3 + 1) + ".Value", rules[dep1].ruleConditions[dep2].queryStringConfig.values[dep3].value);
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".QueryStringConfig.Values." + std::to_string(dep3 + 1) + ".Key", rules[dep1].ruleConditions[dep2].queryStringConfig.values[dep3].key);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".QueryStringConfig.Values." + std::to_string(dep3 + 1) + ".Value", rules[dep1].ruleConditions[dep2].queryStringConfig.values[dep3].value);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".QueryStringConfig.Values." + std::to_string(dep3 + 1) + ".Key", rules[dep1].ruleConditions[dep2].queryStringConfig.values[dep3].key);
|
||||
}
|
||||
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].responseStatusCodeConfig.values.size(); dep3++) {
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".ResponseStatusCodeConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].responseStatusCodeConfig.values[dep3]);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".ResponseStatusCodeConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].responseStatusCodeConfig.values[dep3]);
|
||||
}
|
||||
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].pathConfig.values.size(); dep3++) {
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".PathConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].pathConfig.values[dep3]);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".PathConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].pathConfig.values[dep3]);
|
||||
}
|
||||
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].cookieConfig.values.size(); dep3++) {
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".CookieConfig.Values." + std::to_string(dep3 + 1) + ".Value", rules[dep1].ruleConditions[dep2].cookieConfig.values[dep3].value);
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".CookieConfig.Values." + std::to_string(dep3 + 1) + ".Key", rules[dep1].ruleConditions[dep2].cookieConfig.values[dep3].key);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".CookieConfig.Values." + std::to_string(dep3 + 1) + ".Value", rules[dep1].ruleConditions[dep2].cookieConfig.values[dep3].value);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".CookieConfig.Values." + std::to_string(dep3 + 1) + ".Key", rules[dep1].ruleConditions[dep2].cookieConfig.values[dep3].key);
|
||||
}
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".Type", rules[dep1].ruleConditions[dep2].type);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".Type", rules[dep1].ruleConditions[dep2].type);
|
||||
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].headerConfig.values.size(); dep3++) {
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".HeaderConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].headerConfig.values[dep3]);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".HeaderConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].headerConfig.values[dep3]);
|
||||
}
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".HeaderConfig.Key", rules[dep1].ruleConditions[dep2].headerConfig.key);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".HeaderConfig.Key", rules[dep1].ruleConditions[dep2].headerConfig.key);
|
||||
for(int dep3 = 0; dep3 != rules[dep1].ruleConditions[dep2].responseHeaderConfig.values.size(); dep3++) {
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".ResponseHeaderConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].responseHeaderConfig.values[dep3]);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".ResponseHeaderConfig.Values." + std::to_string(dep3 + 1), rules[dep1].ruleConditions[dep2].responseHeaderConfig.values[dep3]);
|
||||
}
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".ResponseHeaderConfig.Key", rules[dep1].ruleConditions[dep2].responseHeaderConfig.key);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleConditions." + std::to_string(dep2 + 1) + ".ResponseHeaderConfig.Key", rules[dep1].ruleConditions[dep2].responseHeaderConfig.key);
|
||||
}
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleName", rules[dep1].ruleName);
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".Priority", std::to_string(rules[dep1].priority));
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleName", rules[dep1].ruleName);
|
||||
for(int dep2 = 0; dep2 != rules[dep1].tag.size(); dep2++) {
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".Tag." + std::to_string(dep2 + 1) + ".Value", rules[dep1].tag[dep2].value);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".Tag." + std::to_string(dep2 + 1) + ".Key", rules[dep1].tag[dep2].key);
|
||||
}
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".Priority", std::to_string(rules[dep1].priority));
|
||||
for(int dep2 = 0; dep2 != rules[dep1].ruleActions.size(); dep2++) {
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".FixedResponseConfig.HttpCode", rules[dep1].ruleActions[dep2].fixedResponseConfig.httpCode);
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".FixedResponseConfig.Content", rules[dep1].ruleActions[dep2].fixedResponseConfig.content);
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".FixedResponseConfig.ContentType", rules[dep1].ruleActions[dep2].fixedResponseConfig.contentType);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".FixedResponseConfig.HttpCode", rules[dep1].ruleActions[dep2].fixedResponseConfig.httpCode);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".FixedResponseConfig.Content", rules[dep1].ruleActions[dep2].fixedResponseConfig.content);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".FixedResponseConfig.ContentType", rules[dep1].ruleActions[dep2].fixedResponseConfig.contentType);
|
||||
for(int dep3 = 0; dep3 != rules[dep1].ruleActions[dep2].trafficMirrorConfig.mirrorGroupConfig.serverGroupTuples.size(); dep3++) {
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficMirrorConfig.MirrorGroupConfig.ServerGroupTuples." + std::to_string(dep3 + 1) + ".ServerGroupId", rules[dep1].ruleActions[dep2].trafficMirrorConfig.mirrorGroupConfig.serverGroupTuples[dep3].serverGroupId);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficMirrorConfig.MirrorGroupConfig.ServerGroupTuples." + std::to_string(dep3 + 1) + ".ServerGroupId", rules[dep1].ruleActions[dep2].trafficMirrorConfig.mirrorGroupConfig.serverGroupTuples[dep3].serverGroupId);
|
||||
}
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficMirrorConfig.TargetType", rules[dep1].ruleActions[dep2].trafficMirrorConfig.targetType);
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupStickySession.Enabled", rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupStickySession.enabled ? "true" : "false");
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupStickySession.Timeout", std::to_string(rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupStickySession.timeout));
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficMirrorConfig.TargetType", rules[dep1].ruleActions[dep2].trafficMirrorConfig.targetType);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupStickySession.Enabled", rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupStickySession.enabled ? "true" : "false");
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupStickySession.Timeout", std::to_string(rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupStickySession.timeout));
|
||||
for(int dep3 = 0; dep3 != rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupTuples.size(); dep3++) {
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupTuples." + std::to_string(dep3 + 1) + ".ServerGroupId", rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupTuples[dep3].serverGroupId);
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupTuples." + std::to_string(dep3 + 1) + ".Weight", std::to_string(rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupTuples[dep3].weight));
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupTuples." + std::to_string(dep3 + 1) + ".ServerGroupId", rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupTuples[dep3].serverGroupId);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".ForwardGroupConfig.ServerGroupTuples." + std::to_string(dep3 + 1) + ".Weight", std::to_string(rules[dep1].ruleActions[dep2].forwardGroupConfig.serverGroupTuples[dep3].weight));
|
||||
}
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RemoveHeaderConfig.Key", rules[dep1].ruleActions[dep2].removeHeaderConfig.key);
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.ValueType", rules[dep1].ruleActions[dep2].insertHeaderConfig.valueType);
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.CoverEnabled", rules[dep1].ruleActions[dep2].insertHeaderConfig.coverEnabled ? "true" : "false");
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.Value", rules[dep1].ruleActions[dep2].insertHeaderConfig.value);
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.Key", rules[dep1].ruleActions[dep2].insertHeaderConfig.key);
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficLimitConfig.QPS", std::to_string(rules[dep1].ruleActions[dep2].trafficLimitConfig.qPS));
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficLimitConfig.PerIpQps", std::to_string(rules[dep1].ruleActions[dep2].trafficLimitConfig.perIpQps));
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowCredentials", rules[dep1].ruleActions[dep2].corsConfig.allowCredentials);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RemoveHeaderConfig.Key", rules[dep1].ruleActions[dep2].removeHeaderConfig.key);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.ValueType", rules[dep1].ruleActions[dep2].insertHeaderConfig.valueType);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.CoverEnabled", rules[dep1].ruleActions[dep2].insertHeaderConfig.coverEnabled ? "true" : "false");
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.Value", rules[dep1].ruleActions[dep2].insertHeaderConfig.value);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".InsertHeaderConfig.Key", rules[dep1].ruleActions[dep2].insertHeaderConfig.key);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficLimitConfig.QPS", std::to_string(rules[dep1].ruleActions[dep2].trafficLimitConfig.qPS));
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".TrafficLimitConfig.PerIpQps", std::to_string(rules[dep1].ruleActions[dep2].trafficLimitConfig.perIpQps));
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowCredentials", rules[dep1].ruleActions[dep2].corsConfig.allowCredentials);
|
||||
for(int dep3 = 0; dep3 != rules[dep1].ruleActions[dep2].corsConfig.allowOrigin.size(); dep3++) {
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowOrigin." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.allowOrigin[dep3]);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowOrigin." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.allowOrigin[dep3]);
|
||||
}
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.MaxAge", std::to_string(rules[dep1].ruleActions[dep2].corsConfig.maxAge));
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.MaxAge", std::to_string(rules[dep1].ruleActions[dep2].corsConfig.maxAge));
|
||||
for(int dep3 = 0; dep3 != rules[dep1].ruleActions[dep2].corsConfig.allowMethods.size(); dep3++) {
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowMethods." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.allowMethods[dep3]);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowMethods." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.allowMethods[dep3]);
|
||||
}
|
||||
for(int dep3 = 0; dep3 != rules[dep1].ruleActions[dep2].corsConfig.allowHeaders.size(); dep3++) {
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowHeaders." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.allowHeaders[dep3]);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.AllowHeaders." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.allowHeaders[dep3]);
|
||||
}
|
||||
for(int dep3 = 0; dep3 != rules[dep1].ruleActions[dep2].corsConfig.exposeHeaders.size(); dep3++) {
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.ExposeHeaders." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.exposeHeaders[dep3]);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".CorsConfig.ExposeHeaders." + std::to_string(dep3 + 1), rules[dep1].ruleActions[dep2].corsConfig.exposeHeaders[dep3]);
|
||||
}
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Path", rules[dep1].ruleActions[dep2].redirectConfig.path);
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Protocol", rules[dep1].ruleActions[dep2].redirectConfig.protocol);
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Port", rules[dep1].ruleActions[dep2].redirectConfig.port);
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Query", rules[dep1].ruleActions[dep2].redirectConfig.query);
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Host", rules[dep1].ruleActions[dep2].redirectConfig.host);
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.HttpCode", rules[dep1].ruleActions[dep2].redirectConfig.httpCode);
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".Type", rules[dep1].ruleActions[dep2].type);
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".Order", std::to_string(rules[dep1].ruleActions[dep2].order));
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RewriteConfig.Path", rules[dep1].ruleActions[dep2].rewriteConfig.path);
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RewriteConfig.Query", rules[dep1].ruleActions[dep2].rewriteConfig.query);
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RewriteConfig.Host", rules[dep1].ruleActions[dep2].rewriteConfig.host);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Path", rules[dep1].ruleActions[dep2].redirectConfig.path);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Protocol", rules[dep1].ruleActions[dep2].redirectConfig.protocol);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Port", rules[dep1].ruleActions[dep2].redirectConfig.port);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Query", rules[dep1].ruleActions[dep2].redirectConfig.query);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.Host", rules[dep1].ruleActions[dep2].redirectConfig.host);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RedirectConfig.HttpCode", rules[dep1].ruleActions[dep2].redirectConfig.httpCode);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".Type", rules[dep1].ruleActions[dep2].type);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".Order", std::to_string(rules[dep1].ruleActions[dep2].order));
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RewriteConfig.Path", rules[dep1].ruleActions[dep2].rewriteConfig.path);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RewriteConfig.Query", rules[dep1].ruleActions[dep2].rewriteConfig.query);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".RuleActions." + std::to_string(dep2 + 1) + ".RewriteConfig.Host", rules[dep1].ruleActions[dep2].rewriteConfig.host);
|
||||
}
|
||||
setParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".Direction", rules[dep1].direction);
|
||||
setBodyParameter(std::string("Rules") + "." + std::to_string(dep1 + 1) + ".Direction", rules[dep1].direction);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,18 @@ void CreateSecurityPolicyRequest::setCiphers(const std::vector<CreateSecurityPol
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<CreateSecurityPolicyRequest::Tag> CreateSecurityPolicyRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void CreateSecurityPolicyRequest::setTag(const std::vector<CreateSecurityPolicyRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
|
||||
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<CreateSecurityPolicyRequest::std::string> CreateSecurityPolicyRequest::getTLSVersions() const {
|
||||
return tLSVersions_;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,15 @@ CreateServerGroupRequest::CreateServerGroupRequest()
|
||||
|
||||
CreateServerGroupRequest::~CreateServerGroupRequest() {}
|
||||
|
||||
bool CreateServerGroupRequest::getCrossZoneEnabled() const {
|
||||
return crossZoneEnabled_;
|
||||
}
|
||||
|
||||
void CreateServerGroupRequest::setCrossZoneEnabled(bool crossZoneEnabled) {
|
||||
crossZoneEnabled_ = crossZoneEnabled;
|
||||
setParameter(std::string("CrossZoneEnabled"), crossZoneEnabled ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CreateServerGroupRequest::getServerGroupName() const {
|
||||
return serverGroupName_;
|
||||
}
|
||||
@@ -69,6 +78,16 @@ void CreateServerGroupRequest::setHealthCheckConfig(const CreateServerGroupReque
|
||||
setParameter(std::string("HealthCheckConfig") + ".HealthCheckConnectPort", std::to_string(healthCheckConfig.healthCheckConnectPort));
|
||||
}
|
||||
|
||||
CreateServerGroupRequest::SlowStartConfig CreateServerGroupRequest::getSlowStartConfig() const {
|
||||
return slowStartConfig_;
|
||||
}
|
||||
|
||||
void CreateServerGroupRequest::setSlowStartConfig(const CreateServerGroupRequest::SlowStartConfig &slowStartConfig) {
|
||||
slowStartConfig_ = slowStartConfig;
|
||||
setParameter(std::string("SlowStartConfig") + ".SlowStartDuration", std::to_string(slowStartConfig.slowStartDuration));
|
||||
setParameter(std::string("SlowStartConfig") + ".SlowStartEnabled", slowStartConfig.slowStartEnabled ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CreateServerGroupRequest::getScheduler() const {
|
||||
return scheduler_;
|
||||
}
|
||||
@@ -114,6 +133,18 @@ void CreateServerGroupRequest::setServiceName(const std::string &serviceName) {
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
std::vector<CreateServerGroupRequest::Tag> CreateServerGroupRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void CreateServerGroupRequest::setTag(const std::vector<CreateServerGroupRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
|
||||
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
|
||||
}
|
||||
}
|
||||
|
||||
CreateServerGroupRequest::StickySessionConfig CreateServerGroupRequest::getStickySessionConfig() const {
|
||||
return stickySessionConfig_;
|
||||
}
|
||||
@@ -144,6 +175,16 @@ void CreateServerGroupRequest::setIpv6Enabled(bool ipv6Enabled) {
|
||||
setParameter(std::string("Ipv6Enabled"), ipv6Enabled ? "true" : "false");
|
||||
}
|
||||
|
||||
CreateServerGroupRequest::ConnectionDrainConfig CreateServerGroupRequest::getConnectionDrainConfig() const {
|
||||
return connectionDrainConfig_;
|
||||
}
|
||||
|
||||
void CreateServerGroupRequest::setConnectionDrainConfig(const CreateServerGroupRequest::ConnectionDrainConfig &connectionDrainConfig) {
|
||||
connectionDrainConfig_ = connectionDrainConfig;
|
||||
setParameter(std::string("ConnectionDrainConfig") + ".ConnectionDrainEnabled", connectionDrainConfig.connectionDrainEnabled ? "true" : "false");
|
||||
setParameter(std::string("ConnectionDrainConfig") + ".ConnectionDrainTimeout", std::to_string(connectionDrainConfig.connectionDrainTimeout));
|
||||
}
|
||||
|
||||
std::string CreateServerGroupRequest::getServerGroupType() const {
|
||||
return serverGroupType_;
|
||||
}
|
||||
|
||||
@@ -39,6 +39,13 @@ void EnableLoadBalancerAccessLogResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["JobId"].isNull())
|
||||
jobId_ = value["JobId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string EnableLoadBalancerAccessLogResult::getJobId()const
|
||||
{
|
||||
return jobId_;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,16 @@ void GetHealthCheckTemplateAttributeResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allTagsNode = value["Tags"]["Tag"];
|
||||
for (auto valueTagsTag : allTagsNode)
|
||||
{
|
||||
Tag tagsObject;
|
||||
if(!valueTagsTag["Key"].isNull())
|
||||
tagsObject.key = valueTagsTag["Key"].asString();
|
||||
if(!valueTagsTag["Value"].isNull())
|
||||
tagsObject.value = valueTagsTag["Value"].asString();
|
||||
tags_.push_back(tagsObject);
|
||||
}
|
||||
auto allHealthCheckHttpCodes = value["HealthCheckHttpCodes"]["httpCode"];
|
||||
for (const auto &item : allHealthCheckHttpCodes)
|
||||
healthCheckHttpCodes_.push_back(item.asString());
|
||||
@@ -163,3 +173,8 @@ std::string GetHealthCheckTemplateAttributeResult::getHealthCheckProtocol()const
|
||||
return healthCheckProtocol_;
|
||||
}
|
||||
|
||||
std::vector<GetHealthCheckTemplateAttributeResult::Tag> GetHealthCheckTemplateAttributeResult::getTags()const
|
||||
{
|
||||
return tags_;
|
||||
}
|
||||
|
||||
|
||||
@@ -76,6 +76,32 @@ void GetListenerAttributeResult::parse(const std::string &payload)
|
||||
}
|
||||
defaultActions_.push_back(defaultActionsObject);
|
||||
}
|
||||
auto allTagsNode = value["Tags"]["Tag"];
|
||||
for (auto valueTagsTag : allTagsNode)
|
||||
{
|
||||
Tag tagsObject;
|
||||
if(!valueTagsTag["Key"].isNull())
|
||||
tagsObject.key = valueTagsTag["Key"].asString();
|
||||
if(!valueTagsTag["Value"].isNull())
|
||||
tagsObject.value = valueTagsTag["Value"].asString();
|
||||
tags_.push_back(tagsObject);
|
||||
}
|
||||
auto allAssociatedResourcesNode = value["AssociatedResources"]["AssociatedResource"];
|
||||
for (auto valueAssociatedResourcesAssociatedResource : allAssociatedResourcesNode)
|
||||
{
|
||||
AssociatedResource associatedResourcesObject;
|
||||
if(!valueAssociatedResourcesAssociatedResource["AssociatedResourceType"].isNull())
|
||||
associatedResourcesObject.associatedResourceType = valueAssociatedResourcesAssociatedResource["AssociatedResourceType"].asString();
|
||||
if(!valueAssociatedResourcesAssociatedResource["AssociatedResourceId"].isNull())
|
||||
associatedResourcesObject.associatedResourceId = valueAssociatedResourcesAssociatedResource["AssociatedResourceId"].asString();
|
||||
if(!valueAssociatedResourcesAssociatedResource["PolicyId"].isNull())
|
||||
associatedResourcesObject.policyId = valueAssociatedResourcesAssociatedResource["PolicyId"].asString();
|
||||
if(!valueAssociatedResourcesAssociatedResource["Status"].isNull())
|
||||
associatedResourcesObject.status = valueAssociatedResourcesAssociatedResource["Status"].asString();
|
||||
if(!valueAssociatedResourcesAssociatedResource["AssociatedMode"].isNull())
|
||||
associatedResourcesObject.associatedMode = valueAssociatedResourcesAssociatedResource["AssociatedMode"].asString();
|
||||
associatedResources_.push_back(associatedResourcesObject);
|
||||
}
|
||||
auto aclConfigNode = value["AclConfig"];
|
||||
if(!aclConfigNode["AclType"].isNull())
|
||||
aclConfig_.aclType = aclConfigNode["AclType"].asString();
|
||||
@@ -125,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())
|
||||
@@ -135,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())
|
||||
@@ -191,6 +221,11 @@ bool GetListenerAttributeResult::getHttp2Enabled()const
|
||||
return http2Enabled_;
|
||||
}
|
||||
|
||||
std::vector<GetListenerAttributeResult::AssociatedResource> GetListenerAttributeResult::getAssociatedResources()const
|
||||
{
|
||||
return associatedResources_;
|
||||
}
|
||||
|
||||
std::vector<GetListenerAttributeResult::DefaultAction> GetListenerAttributeResult::getDefaultActions()const
|
||||
{
|
||||
return defaultActions_;
|
||||
@@ -256,6 +291,11 @@ GetListenerAttributeResult::XForwardedForConfig GetListenerAttributeResult::getX
|
||||
return xForwardedForConfig_;
|
||||
}
|
||||
|
||||
std::vector<GetListenerAttributeResult::Tag> GetListenerAttributeResult::getTags()const
|
||||
{
|
||||
return tags_;
|
||||
}
|
||||
|
||||
std::vector<GetListenerAttributeResult::Certificate1> GetListenerAttributeResult::getCaCertificates()const
|
||||
{
|
||||
return caCertificates_;
|
||||
|
||||
@@ -67,12 +67,12 @@ void GetLoadBalancerAttributeResult::parse(const std::string &payload)
|
||||
zoneMappingsObject.vSwitchId = valueZoneMappingsZoneMapping["VSwitchId"].asString();
|
||||
if(!valueZoneMappingsZoneMapping["ZoneId"].isNull())
|
||||
zoneMappingsObject.zoneId = valueZoneMappingsZoneMapping["ZoneId"].asString();
|
||||
if(!valueZoneMappingsZoneMapping["Status"].isNull())
|
||||
zoneMappingsObject.status = valueZoneMappingsZoneMapping["Status"].asString();
|
||||
if(!valueZoneMappingsZoneMapping["AllocationId"].isNull())
|
||||
zoneMappingsObject.allocationId = valueZoneMappingsZoneMapping["AllocationId"].asString();
|
||||
if(!valueZoneMappingsZoneMapping["EipType"].isNull())
|
||||
zoneMappingsObject.eipType = valueZoneMappingsZoneMapping["EipType"].asString();
|
||||
if(!valueZoneMappingsZoneMapping["Status"].isNull())
|
||||
zoneMappingsObject.status = valueZoneMappingsZoneMapping["Status"].asString();
|
||||
auto allLoadBalancerAddressesNode = valueZoneMappingsZoneMapping["LoadBalancerAddresses"]["LoadBalancerAddress"];
|
||||
for (auto valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress : allLoadBalancerAddressesNode)
|
||||
{
|
||||
@@ -81,20 +81,42 @@ void GetLoadBalancerAttributeResult::parse(const std::string &payload)
|
||||
loadBalancerAddressesObject.address = valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["Address"].asString();
|
||||
if(!valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["Ipv6Address"].isNull())
|
||||
loadBalancerAddressesObject.ipv6Address = valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["Ipv6Address"].asString();
|
||||
if(!valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["Ipv6AddressHcStatus"].isNull())
|
||||
loadBalancerAddressesObject.ipv6AddressHcStatus = valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["Ipv6AddressHcStatus"].asString();
|
||||
if(!valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["IntranetAddress"].isNull())
|
||||
loadBalancerAddressesObject.intranetAddress = valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["IntranetAddress"].asString();
|
||||
if(!valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["IntranetAddressHcStatus"].isNull())
|
||||
loadBalancerAddressesObject.intranetAddressHcStatus = valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["IntranetAddressHcStatus"].asString();
|
||||
if(!valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["AllocationId"].isNull())
|
||||
loadBalancerAddressesObject.allocationId = valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["AllocationId"].asString();
|
||||
if(!valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["EipType"].isNull())
|
||||
loadBalancerAddressesObject.eipType = valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["EipType"].asString();
|
||||
if(!valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["IntranetAddressHcStatus"].isNull())
|
||||
loadBalancerAddressesObject.intranetAddressHcStatus = valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["IntranetAddressHcStatus"].asString();
|
||||
if(!valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["Ipv6AddressHcStatus"].isNull())
|
||||
loadBalancerAddressesObject.ipv6AddressHcStatus = valueZoneMappingsZoneMappingLoadBalancerAddressesLoadBalancerAddress["Ipv6AddressHcStatus"].asString();
|
||||
auto allIpv4LocalAddresses = value["Ipv4LocalAddresses"]["Ipv4LocalAddress"];
|
||||
for (auto value : allIpv4LocalAddresses)
|
||||
loadBalancerAddressesObject.ipv4LocalAddresses.push_back(value.asString());
|
||||
auto allIpv6LocalAddresses = value["Ipv6LocalAddresses"]["ipv6LocalAddress"];
|
||||
for (auto value : allIpv6LocalAddresses)
|
||||
loadBalancerAddressesObject.ipv6LocalAddresses.push_back(value.asString());
|
||||
zoneMappingsObject.loadBalancerAddresses.push_back(loadBalancerAddressesObject);
|
||||
}
|
||||
zoneMappings_.push_back(zoneMappingsObject);
|
||||
}
|
||||
auto allAssociatedResourcesNode = value["AssociatedResources"]["AssociatedResource"];
|
||||
for (auto valueAssociatedResourcesAssociatedResource : allAssociatedResourcesNode)
|
||||
{
|
||||
AssociatedResource associatedResourcesObject;
|
||||
if(!valueAssociatedResourcesAssociatedResource["AssociatedResourceType"].isNull())
|
||||
associatedResourcesObject.associatedResourceType = valueAssociatedResourcesAssociatedResource["AssociatedResourceType"].asString();
|
||||
if(!valueAssociatedResourcesAssociatedResource["AssociatedResourceId"].isNull())
|
||||
associatedResourcesObject.associatedResourceId = valueAssociatedResourcesAssociatedResource["AssociatedResourceId"].asString();
|
||||
if(!valueAssociatedResourcesAssociatedResource["PolicyId"].isNull())
|
||||
associatedResourcesObject.policyId = valueAssociatedResourcesAssociatedResource["PolicyId"].asString();
|
||||
if(!valueAssociatedResourcesAssociatedResource["Status"].isNull())
|
||||
associatedResourcesObject.status = valueAssociatedResourcesAssociatedResource["Status"].asString();
|
||||
if(!valueAssociatedResourcesAssociatedResource["AssociatedMode"].isNull())
|
||||
associatedResourcesObject.associatedMode = valueAssociatedResourcesAssociatedResource["AssociatedMode"].asString();
|
||||
associatedResources_.push_back(associatedResourcesObject);
|
||||
}
|
||||
auto accessLogConfigNode = value["AccessLogConfig"];
|
||||
if(!accessLogConfigNode["LogProject"].isNull())
|
||||
accessLogConfig_.logProject = accessLogConfigNode["LogProject"].asString();
|
||||
@@ -260,6 +282,11 @@ GetLoadBalancerAttributeResult::LoadBalancerBillingConfig GetLoadBalancerAttribu
|
||||
return loadBalancerBillingConfig_;
|
||||
}
|
||||
|
||||
std::vector<GetLoadBalancerAttributeResult::AssociatedResource> GetLoadBalancerAttributeResult::getAssociatedResources()const
|
||||
{
|
||||
return associatedResources_;
|
||||
}
|
||||
|
||||
std::string GetLoadBalancerAttributeResult::getCreateTime()const
|
||||
{
|
||||
return createTime_;
|
||||
|
||||
@@ -63,6 +63,18 @@ void ListAclsRequest::setNextToken(const std::string &nextToken) {
|
||||
setParameter(std::string("NextToken"), nextToken);
|
||||
}
|
||||
|
||||
std::vector<ListAclsRequest::Tag> ListAclsRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void ListAclsRequest::setTag(const std::vector<ListAclsRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
|
||||
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<ListAclsRequest::std::string> ListAclsRequest::getAclNames() const {
|
||||
return aclNames_;
|
||||
}
|
||||
|
||||
@@ -61,6 +61,16 @@ void ListAclsResult::parse(const std::string &payload)
|
||||
aclsObject.configManagedEnabled = valueAclsAcl["ConfigManagedEnabled"].asString() == "true";
|
||||
if(!valueAclsAcl["CreateTime"].isNull())
|
||||
aclsObject.createTime = valueAclsAcl["CreateTime"].asString();
|
||||
auto allTagsNode = valueAclsAcl["Tags"]["Tag"];
|
||||
for (auto valueAclsAclTagsTag : allTagsNode)
|
||||
{
|
||||
Acl::Tag tagsObject;
|
||||
if(!valueAclsAclTagsTag["Key"].isNull())
|
||||
tagsObject.key = valueAclsAclTagsTag["Key"].asString();
|
||||
if(!valueAclsAclTagsTag["Value"].isNull())
|
||||
tagsObject.value = valueAclsAclTagsTag["Value"].asString();
|
||||
aclsObject.tags.push_back(tagsObject);
|
||||
}
|
||||
acls_.push_back(aclsObject);
|
||||
}
|
||||
if(!value["MaxResults"].isNull())
|
||||
|
||||
@@ -34,6 +34,18 @@ void ListHealthCheckTemplatesRequest::setNextToken(const std::string &nextToken)
|
||||
setParameter(std::string("NextToken"), nextToken);
|
||||
}
|
||||
|
||||
std::vector<ListHealthCheckTemplatesRequest::Tag> ListHealthCheckTemplatesRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void ListHealthCheckTemplatesRequest::setTag(const std::vector<ListHealthCheckTemplatesRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
|
||||
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<ListHealthCheckTemplatesRequest::std::string> ListHealthCheckTemplatesRequest::getHealthCheckTemplateNames() const {
|
||||
return healthCheckTemplateNames_;
|
||||
}
|
||||
|
||||
@@ -73,6 +73,16 @@ void ListHealthCheckTemplatesResult::parse(const std::string &payload)
|
||||
healthCheckTemplatesObject.serviceManagedEnabled = valueHealthCheckTemplatesHealthCheckTemplate["ServiceManagedEnabled"].asString() == "true";
|
||||
if(!valueHealthCheckTemplatesHealthCheckTemplate["ServiceManagedMode"].isNull())
|
||||
healthCheckTemplatesObject.serviceManagedMode = valueHealthCheckTemplatesHealthCheckTemplate["ServiceManagedMode"].asString();
|
||||
auto allTagsNode = valueHealthCheckTemplatesHealthCheckTemplate["Tags"]["Tag"];
|
||||
for (auto valueHealthCheckTemplatesHealthCheckTemplateTagsTag : allTagsNode)
|
||||
{
|
||||
HealthCheckTemplate::Tag tagsObject;
|
||||
if(!valueHealthCheckTemplatesHealthCheckTemplateTagsTag["Key"].isNull())
|
||||
tagsObject.key = valueHealthCheckTemplatesHealthCheckTemplateTagsTag["Key"].asString();
|
||||
if(!valueHealthCheckTemplatesHealthCheckTemplateTagsTag["Value"].isNull())
|
||||
tagsObject.value = valueHealthCheckTemplatesHealthCheckTemplateTagsTag["Value"].asString();
|
||||
healthCheckTemplatesObject.tags.push_back(tagsObject);
|
||||
}
|
||||
auto allHealthCheckHttpCodes = value["HealthCheckHttpCodes"]["httpCode"];
|
||||
for (auto value : allHealthCheckHttpCodes)
|
||||
healthCheckTemplatesObject.healthCheckHttpCodes.push_back(value.asString());
|
||||
|
||||
@@ -43,6 +43,17 @@ void ListListenerCertificatesRequest::setListenerId(const std::string &listenerI
|
||||
setParameter(std::string("ListenerId"), listenerId);
|
||||
}
|
||||
|
||||
std::vector<ListListenerCertificatesRequest::std::string> ListListenerCertificatesRequest::getCertificateIds() const {
|
||||
return certificateIds_;
|
||||
}
|
||||
|
||||
void ListListenerCertificatesRequest::setCertificateIds(const std::vector<ListListenerCertificatesRequest::std::string> &certificateIds) {
|
||||
certificateIds_ = certificateIds;
|
||||
for(int dep1 = 0; dep1 != certificateIds.size(); dep1++) {
|
||||
setParameter(std::string("CertificateIds") + "." + std::to_string(dep1 + 1), certificateIds[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
std::string ListListenerCertificatesRequest::getNextToken() const {
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
@@ -45,6 +45,18 @@ void ListListenersRequest::setNextToken(const std::string &nextToken) {
|
||||
setParameter(std::string("NextToken"), nextToken);
|
||||
}
|
||||
|
||||
std::vector<ListListenersRequest::Tag> ListListenersRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void ListListenersRequest::setTag(const std::vector<ListListenersRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
|
||||
setParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
|
||||
}
|
||||
}
|
||||
|
||||
bool ListListenersRequest::getAccessLogRecordCustomizedHeadersEnabled() const {
|
||||
return accessLogRecordCustomizedHeadersEnabled_;
|
||||
}
|
||||
@@ -83,6 +95,15 @@ void ListListenersRequest::setMaxResults(int maxResults) {
|
||||
setParameter(std::string("MaxResults"), std::to_string(maxResults));
|
||||
}
|
||||
|
||||
bool ListListenersRequest::getIsAssociatedAcl() const {
|
||||
return isAssociatedAcl_;
|
||||
}
|
||||
|
||||
void ListListenersRequest::setIsAssociatedAcl(bool isAssociatedAcl) {
|
||||
isAssociatedAcl_ = isAssociatedAcl;
|
||||
setParameter(std::string("IsAssociatedAcl"), isAssociatedAcl ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string ListListenersRequest::getStatus() const {
|
||||
return status_;
|
||||
}
|
||||
|
||||
@@ -86,6 +86,32 @@ void ListListenersResult::parse(const std::string &payload)
|
||||
}
|
||||
listenersObject.defaultActions.push_back(defaultActionsObject);
|
||||
}
|
||||
auto allTagsNode = valueListenerslistener["Tags"]["Tag"];
|
||||
for (auto valueListenerslistenerTagsTag : allTagsNode)
|
||||
{
|
||||
Listener::Tag tagsObject;
|
||||
if(!valueListenerslistenerTagsTag["Key"].isNull())
|
||||
tagsObject.key = valueListenerslistenerTagsTag["Key"].asString();
|
||||
if(!valueListenerslistenerTagsTag["Value"].isNull())
|
||||
tagsObject.value = valueListenerslistenerTagsTag["Value"].asString();
|
||||
listenersObject.tags.push_back(tagsObject);
|
||||
}
|
||||
auto allAssociatedResourcesNode = valueListenerslistener["AssociatedResources"]["AssociatedResource"];
|
||||
for (auto valueListenerslistenerAssociatedResourcesAssociatedResource : allAssociatedResourcesNode)
|
||||
{
|
||||
Listener::AssociatedResource associatedResourcesObject;
|
||||
if(!valueListenerslistenerAssociatedResourcesAssociatedResource["AssociatedResourceType"].isNull())
|
||||
associatedResourcesObject.associatedResourceType = valueListenerslistenerAssociatedResourcesAssociatedResource["AssociatedResourceType"].asString();
|
||||
if(!valueListenerslistenerAssociatedResourcesAssociatedResource["AssociatedResourceId"].isNull())
|
||||
associatedResourcesObject.associatedResourceId = valueListenerslistenerAssociatedResourcesAssociatedResource["AssociatedResourceId"].asString();
|
||||
if(!valueListenerslistenerAssociatedResourcesAssociatedResource["PolicyId"].isNull())
|
||||
associatedResourcesObject.policyId = valueListenerslistenerAssociatedResourcesAssociatedResource["PolicyId"].asString();
|
||||
if(!valueListenerslistenerAssociatedResourcesAssociatedResource["Status"].isNull())
|
||||
associatedResourcesObject.status = valueListenerslistenerAssociatedResourcesAssociatedResource["Status"].asString();
|
||||
if(!valueListenerslistenerAssociatedResourcesAssociatedResource["AssociatedMode"].isNull())
|
||||
associatedResourcesObject.associatedMode = valueListenerslistenerAssociatedResourcesAssociatedResource["AssociatedMode"].asString();
|
||||
listenersObject.associatedResources.push_back(associatedResourcesObject);
|
||||
}
|
||||
auto logConfigNode = value["LogConfig"];
|
||||
if(!logConfigNode["AccessLogRecordCustomizedHeadersEnabled"].isNull())
|
||||
listenersObject.logConfig.accessLogRecordCustomizedHeadersEnabled = logConfigNode["AccessLogRecordCustomizedHeadersEnabled"].asString() == "true";
|
||||
@@ -122,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())
|
||||
@@ -132,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())
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user