From 4c13bbea821d409b5572dcd2cd271a86df52b58b Mon Sep 17 00:00:00 2001 From: sdk-team Date: Fri, 8 Jul 2022 04:34:00 +0000 Subject: [PATCH] Automatically generate sdk tasks. --- CHANGELOG | 3 + VERSION | 2 +- wfts/CMakeLists.txt | 86 ++++++++++++++++++ wfts/include/alibabacloud/wfts/WftsClient.h | 54 +++++++++++ wfts/include/alibabacloud/wfts/WftsExport.h | 32 +++++++ .../wfts/model/GetLjxAccountInfoRequest.h | 42 +++++++++ .../wfts/model/GetLjxAccountInfoResult.h | 53 +++++++++++ wfts/src/WftsClient.cc | 89 +++++++++++++++++++ wfts/src/model/GetLjxAccountInfoRequest.cc | 37 ++++++++ wfts/src/model/GetLjxAccountInfoResult.cc | 58 ++++++++++++ 10 files changed, 455 insertions(+), 1 deletion(-) create mode 100644 wfts/CMakeLists.txt create mode 100644 wfts/include/alibabacloud/wfts/WftsClient.h create mode 100644 wfts/include/alibabacloud/wfts/WftsExport.h create mode 100644 wfts/include/alibabacloud/wfts/model/GetLjxAccountInfoRequest.h create mode 100644 wfts/include/alibabacloud/wfts/model/GetLjxAccountInfoResult.h create mode 100644 wfts/src/WftsClient.cc create mode 100644 wfts/src/model/GetLjxAccountInfoRequest.cc create mode 100644 wfts/src/model/GetLjxAccountInfoResult.cc diff --git a/CHANGELOG b/CHANGELOG index 9d19d3919..92288195f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2022-07-08 Version: 1.36.1170 +- Automatically generate sdk tasks. + 2022-07-08 Version: 1.36.1169 - Support AK Audit API. diff --git a/VERSION b/VERSION index 1007e0b28..ce6955f12 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1169 \ No newline at end of file +1.36.1170 \ No newline at end of file diff --git a/wfts/CMakeLists.txt b/wfts/CMakeLists.txt new file mode 100644 index 000000000..1924ef926 --- /dev/null +++ b/wfts/CMakeLists.txt @@ -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. +# + +set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include) + +set(wfts_public_header + include/alibabacloud/wfts/WftsClient.h + include/alibabacloud/wfts/WftsExport.h ) + +set(wfts_public_header_model + include/alibabacloud/wfts/model/GetLjxAccountInfoRequest.h + include/alibabacloud/wfts/model/GetLjxAccountInfoResult.h ) + +set(wfts_src + src/WftsClient.cc + src/model/GetLjxAccountInfoRequest.cc + src/model/GetLjxAccountInfoResult.cc ) + +add_library(wfts ${LIB_TYPE} + ${wfts_public_header} + ${wfts_public_header_model} + ${wfts_src}) + +set_target_properties(wfts + 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}wfts + ) + +if(${LIB_TYPE} STREQUAL "SHARED") + set_target_properties(wfts + PROPERTIES + DEFINE_SYMBOL ALIBABACLOUD_WFTS_LIBRARY) +endif() + +target_include_directories(wfts + PRIVATE include + ${CMAKE_SOURCE_DIR}/core/include + ) +target_link_libraries(wfts + core) + +if(CMAKE_HOST_WIN32) + ExternalProject_Get_Property(jsoncpp INSTALL_DIR) + set(jsoncpp_install_dir ${INSTALL_DIR}) + add_dependencies(wfts + jsoncpp) + target_include_directories(wfts + PRIVATE ${jsoncpp_install_dir}/include) + target_link_libraries(wfts + ${jsoncpp_install_dir}/lib/jsoncpp.lib) + set_target_properties(wfts + PROPERTIES + COMPILE_OPTIONS "/bigobj") +else() + target_include_directories(wfts + PRIVATE /usr/include/jsoncpp) + target_link_libraries(wfts + jsoncpp) +endif() + +install(FILES ${wfts_public_header} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/wfts) +install(FILES ${wfts_public_header_model} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/wfts/model) +install(TARGETS wfts + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) \ No newline at end of file diff --git a/wfts/include/alibabacloud/wfts/WftsClient.h b/wfts/include/alibabacloud/wfts/WftsClient.h new file mode 100644 index 000000000..e0eb39b32 --- /dev/null +++ b/wfts/include/alibabacloud/wfts/WftsClient.h @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_WFTS_WFTSCLIENT_H_ +#define ALIBABACLOUD_WFTS_WFTSCLIENT_H_ + +#include +#include +#include +#include +#include "WftsExport.h" +#include "model/GetLjxAccountInfoRequest.h" +#include "model/GetLjxAccountInfoResult.h" + + +namespace AlibabaCloud +{ + namespace Wfts + { + class ALIBABACLOUD_WFTS_EXPORT WftsClient : public RoaServiceClient + { + public: + typedef Outcome GetLjxAccountInfoOutcome; + typedef std::future GetLjxAccountInfoOutcomeCallable; + typedef std::function&)> GetLjxAccountInfoAsyncHandler; + + WftsClient(const Credentials &credentials, const ClientConfiguration &configuration); + WftsClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); + WftsClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); + ~WftsClient(); + GetLjxAccountInfoOutcome getLjxAccountInfo(const Model::GetLjxAccountInfoRequest &request)const; + void getLjxAccountInfoAsync(const Model::GetLjxAccountInfoRequest& request, const GetLjxAccountInfoAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetLjxAccountInfoOutcomeCallable getLjxAccountInfoCallable(const Model::GetLjxAccountInfoRequest& request) const; + + private: + std::shared_ptr endpointProvider_; + }; + } +} + +#endif // !ALIBABACLOUD_WFTS_WFTSCLIENT_H_ diff --git a/wfts/include/alibabacloud/wfts/WftsExport.h b/wfts/include/alibabacloud/wfts/WftsExport.h new file mode 100644 index 000000000..19f30f1ee --- /dev/null +++ b/wfts/include/alibabacloud/wfts/WftsExport.h @@ -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_WFTS_WFTSEXPORT_H_ +#define ALIBABACLOUD_WFTS_WFTSEXPORT_H_ + +#include + +#if defined(ALIBABACLOUD_SHARED) +# if defined(ALIBABACLOUD_WFTS_LIBRARY) +# define ALIBABACLOUD_WFTS_EXPORT ALIBABACLOUD_DECL_EXPORT +# else +# define ALIBABACLOUD_WFTS_EXPORT ALIBABACLOUD_DECL_IMPORT +# endif +#else +# define ALIBABACLOUD_WFTS_EXPORT +#endif + +#endif // !ALIBABACLOUD_WFTS_WFTSEXPORT_H_ \ No newline at end of file diff --git a/wfts/include/alibabacloud/wfts/model/GetLjxAccountInfoRequest.h b/wfts/include/alibabacloud/wfts/model/GetLjxAccountInfoRequest.h new file mode 100644 index 000000000..44bf6f651 --- /dev/null +++ b/wfts/include/alibabacloud/wfts/model/GetLjxAccountInfoRequest.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_WFTS_MODEL_GETLJXACCOUNTINFOREQUEST_H_ +#define ALIBABACLOUD_WFTS_MODEL_GETLJXACCOUNTINFOREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Wfts { +namespace Model { +class ALIBABACLOUD_WFTS_EXPORT GetLjxAccountInfoRequest : public RoaServiceRequest { +public: + GetLjxAccountInfoRequest(); + ~GetLjxAccountInfoRequest(); + string getLjxAccountInfoId() const; + void setLjxAccountInfoId(string ljxAccountInfoId); + +private: + string ljxAccountInfoId_; +}; +} // namespace Model +} // namespace Wfts +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_WFTS_MODEL_GETLJXACCOUNTINFOREQUEST_H_ diff --git a/wfts/include/alibabacloud/wfts/model/GetLjxAccountInfoResult.h b/wfts/include/alibabacloud/wfts/model/GetLjxAccountInfoResult.h new file mode 100644 index 000000000..afcba65d8 --- /dev/null +++ b/wfts/include/alibabacloud/wfts/model/GetLjxAccountInfoResult.h @@ -0,0 +1,53 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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_WFTS_MODEL_GETLJXACCOUNTINFORESULT_H_ +#define ALIBABACLOUD_WFTS_MODEL_GETLJXACCOUNTINFORESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Wfts + { + namespace Model + { + class ALIBABACLOUD_WFTS_EXPORT GetLjxAccountInfoResult : public ServiceResult + { + public: + + + GetLjxAccountInfoResult(); + explicit GetLjxAccountInfoResult(const std::string &payload); + ~GetLjxAccountInfoResult(); + std::string getRequestId()const; + std::string getLjxAccountInfoId()const; + + protected: + void parse(const std::string &payload); + private: + std::string requestId_; + std::string ljxAccountInfoId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_WFTS_MODEL_GETLJXACCOUNTINFORESULT_H_ \ No newline at end of file diff --git a/wfts/src/WftsClient.cc b/wfts/src/WftsClient.cc new file mode 100644 index 000000000..ff6ff086b --- /dev/null +++ b/wfts/src/WftsClient.cc @@ -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 +#include + +using namespace AlibabaCloud; +using namespace AlibabaCloud::Location; +using namespace AlibabaCloud::Wfts; +using namespace AlibabaCloud::Wfts::Model; + +namespace +{ + const std::string SERVICE_NAME = "Wfts"; +} + +WftsClient::WftsClient(const Credentials &credentials, const ClientConfiguration &configuration) : + RoaServiceClient(SERVICE_NAME, std::make_shared(credentials), configuration) +{ + auto locationClient = std::make_shared(credentials, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); +} + +WftsClient::WftsClient(const std::shared_ptr& credentialsProvider, const ClientConfiguration & configuration) : + RoaServiceClient(SERVICE_NAME, credentialsProvider, configuration) +{ + auto locationClient = std::make_shared(credentialsProvider, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); +} + +WftsClient::WftsClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) : + RoaServiceClient(SERVICE_NAME, std::make_shared(accessKeyId, accessKeySecret), configuration) +{ + auto locationClient = std::make_shared(accessKeyId, accessKeySecret, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); +} + +WftsClient::~WftsClient() +{} + +WftsClient::GetLjxAccountInfoOutcome WftsClient::getLjxAccountInfo(const GetLjxAccountInfoRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetLjxAccountInfoOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetLjxAccountInfoOutcome(GetLjxAccountInfoResult(outcome.result())); + else + return GetLjxAccountInfoOutcome(outcome.error()); +} + +void WftsClient::getLjxAccountInfoAsync(const GetLjxAccountInfoRequest& request, const GetLjxAccountInfoAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getLjxAccountInfo(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +WftsClient::GetLjxAccountInfoOutcomeCallable WftsClient::getLjxAccountInfoCallable(const GetLjxAccountInfoRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getLjxAccountInfo(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + diff --git a/wfts/src/model/GetLjxAccountInfoRequest.cc b/wfts/src/model/GetLjxAccountInfoRequest.cc new file mode 100644 index 000000000..f4cf37730 --- /dev/null +++ b/wfts/src/model/GetLjxAccountInfoRequest.cc @@ -0,0 +1,37 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 + +using AlibabaCloud::Wfts::Model::GetLjxAccountInfoRequest; + +GetLjxAccountInfoRequest::GetLjxAccountInfoRequest() + : RoaServiceRequest("wfts", "2022-02-12") { + setResourcePath("/get/ljx/acc"}; + setMethod(HttpRequest::Method::Get); +} + +GetLjxAccountInfoRequest::~GetLjxAccountInfoRequest() {} + +string GetLjxAccountInfoRequest::getLjxAccountInfoId() const { + return ljxAccountInfoId_; +} + +void GetLjxAccountInfoRequest::setLjxAccountInfoId(string ljxAccountInfoId) { + ljxAccountInfoId_ = ljxAccountInfoId; + setParameter(std::string("LjxAccountInfoId"), std::to_string(ljxAccountInfoId)); +} + diff --git a/wfts/src/model/GetLjxAccountInfoResult.cc b/wfts/src/model/GetLjxAccountInfoResult.cc new file mode 100644 index 000000000..cabf1e09e --- /dev/null +++ b/wfts/src/model/GetLjxAccountInfoResult.cc @@ -0,0 +1,58 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 +#include + +using namespace AlibabaCloud::Wfts; +using namespace AlibabaCloud::Wfts::Model; + +GetLjxAccountInfoResult::GetLjxAccountInfoResult() : + ServiceResult() +{} + +GetLjxAccountInfoResult::GetLjxAccountInfoResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetLjxAccountInfoResult::~GetLjxAccountInfoResult() +{} + +void GetLjxAccountInfoResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["LjxAccountInfoId"].isNull()) + ljxAccountInfoId_ = value["LjxAccountInfoId"].asString(); + if(!value["requestId"].isNull()) + requestId_ = value["requestId"].asString(); + +} + +std::string GetLjxAccountInfoResult::getRequestId()const +{ + return requestId_; +} + +std::string GetLjxAccountInfoResult::getLjxAccountInfoId()const +{ + return ljxAccountInfoId_; +} +