From da8c6b2c70749c7bc12c547e00a1f5e0c2fddf94 Mon Sep 17 00:00:00 2001 From: "haowei.yao" Date: Mon, 18 Mar 2019 14:13:09 +0800 Subject: [PATCH] =?UTF-8?q?ARMS4FINANCE=20SDK=20Auto=20Released=20By=20she?= =?UTF-8?q?nshi,Version=EF=BC=9A1.34.39?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: haowei.yao --- CHANGELOG | 3 + CMakeLists.txt | 3 +- VERSION | 2 +- arms4finance/CMakeLists.txt | 90 +++++++++++ .../arms4finance/ARMS4FINANCEClient.h | 62 ++++++++ .../arms4finance/ARMS4FINANCEExport.h | 32 ++++ .../model/ARMSQueryDataSetRequest.h | 74 +++++++++ .../model/ARMSQueryDataSetResult.h | 51 ++++++ .../model/WhereInDimQueryRequest.h | 80 ++++++++++ .../model/WhereInDimQueryResult.h | 51 ++++++ arms4finance/src/ARMS4FINANCEClient.cc | 125 +++++++++++++++ .../src/model/ARMSQueryDataSetRequest.cc | 122 +++++++++++++++ .../src/model/ARMSQueryDataSetResult.cc | 52 +++++++ .../src/model/WhereInDimQueryRequest.cc | 145 ++++++++++++++++++ .../src/model/WhereInDimQueryResult.cc | 52 +++++++ 15 files changed, 942 insertions(+), 2 deletions(-) create mode 100644 arms4finance/CMakeLists.txt create mode 100644 arms4finance/include/alibabacloud/arms4finance/ARMS4FINANCEClient.h create mode 100644 arms4finance/include/alibabacloud/arms4finance/ARMS4FINANCEExport.h create mode 100644 arms4finance/include/alibabacloud/arms4finance/model/ARMSQueryDataSetRequest.h create mode 100644 arms4finance/include/alibabacloud/arms4finance/model/ARMSQueryDataSetResult.h create mode 100644 arms4finance/include/alibabacloud/arms4finance/model/WhereInDimQueryRequest.h create mode 100644 arms4finance/include/alibabacloud/arms4finance/model/WhereInDimQueryResult.h create mode 100644 arms4finance/src/ARMS4FINANCEClient.cc create mode 100644 arms4finance/src/model/ARMSQueryDataSetRequest.cc create mode 100644 arms4finance/src/model/ARMSQueryDataSetResult.cc create mode 100644 arms4finance/src/model/WhereInDimQueryRequest.cc create mode 100644 arms4finance/src/model/WhereInDimQueryResult.cc diff --git a/CHANGELOG b/CHANGELOG index 6f1b06a51..698010061 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2019-03-18 Version: 1.34.39 +1, Update Dependency + 2019-03-18 Version: 1.34.38 1, Update Dependency diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d5ff0e91..740a8113e 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -106,4 +106,5 @@ add_subdirectory(snsuapi) add_subdirectory(ubsms) -add_subdirectory(yundun) \ No newline at end of file +add_subdirectory(yundun) +add_subdirectory(arms4finance) \ No newline at end of file diff --git a/VERSION b/VERSION index 749e932f8..edf8e23ac 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.34.38 \ No newline at end of file +1.34.39 \ No newline at end of file diff --git a/arms4finance/CMakeLists.txt b/arms4finance/CMakeLists.txt new file mode 100644 index 000000000..42043d9b9 --- /dev/null +++ b/arms4finance/CMakeLists.txt @@ -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(arms4finance_public_header + include/alibabacloud/arms4finance/ARMS4FINANCEClient.h + include/alibabacloud/arms4finance/ARMS4FINANCEExport.h ) + +set(arms4finance_public_header_model + include/alibabacloud/arms4finance/model/WhereInDimQueryRequest.h + include/alibabacloud/arms4finance/model/WhereInDimQueryResult.h + include/alibabacloud/arms4finance/model/ARMSQueryDataSetRequest.h + include/alibabacloud/arms4finance/model/ARMSQueryDataSetResult.h ) + +set(arms4finance_src + src/ARMS4FINANCEClient.cc + src/model/WhereInDimQueryRequest.cc + src/model/WhereInDimQueryResult.cc + src/model/ARMSQueryDataSetRequest.cc + src/model/ARMSQueryDataSetResult.cc ) + +add_library(arms4finance ${LIB_TYPE} + ${arms4finance_public_header} + ${arms4finance_public_header_model} + ${arms4finance_src}) + +set_target_properties(arms4finance + 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}arms4finance + ) + +if(${LIB_TYPE} STREQUAL "SHARED") + set_target_properties(arms4finance + PROPERTIES + DEFINE_SYMBOL ALIBABACLOUD_ARMS4FINANCE_LIBRARY) +endif() + +target_include_directories(arms4finance + PRIVATE include + ${CMAKE_SOURCE_DIR}/core/include + ) +target_link_libraries(arms4finance + core) + +if(CMAKE_HOST_WIN32) + ExternalProject_Get_Property(jsoncpp INSTALL_DIR) + set(jsoncpp_install_dir ${INSTALL_DIR}) + add_dependencies(arms4finance + jsoncpp) + target_include_directories(arms4finance + PRIVATE ${jsoncpp_install_dir}/include) + target_link_libraries(arms4finance + ${jsoncpp_install_dir}/lib/jsoncpp.lib) + set_target_properties(arms4finance + PROPERTIES + COMPILE_OPTIONS "/bigobj") +else() + target_include_directories(arms4finance + PRIVATE /usr/include/jsoncpp) + target_link_libraries(arms4finance + jsoncpp) +endif() + +install(FILES ${arms4finance_public_header} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/arms4finance) +install(FILES ${arms4finance_public_header_model} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/arms4finance/model) +install(TARGETS arms4finance + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) \ No newline at end of file diff --git a/arms4finance/include/alibabacloud/arms4finance/ARMS4FINANCEClient.h b/arms4finance/include/alibabacloud/arms4finance/ARMS4FINANCEClient.h new file mode 100644 index 000000000..d4caae947 --- /dev/null +++ b/arms4finance/include/alibabacloud/arms4finance/ARMS4FINANCEClient.h @@ -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_ARMS4FINANCE_ARMS4FINANCECLIENT_H_ +#define ALIBABACLOUD_ARMS4FINANCE_ARMS4FINANCECLIENT_H_ + +#include +#include +#include +#include +#include "ARMS4FINANCEExport.h" +#include "model/WhereInDimQueryRequest.h" +#include "model/WhereInDimQueryResult.h" +#include "model/ARMSQueryDataSetRequest.h" +#include "model/ARMSQueryDataSetResult.h" + + +namespace AlibabaCloud +{ + namespace ARMS4FINANCE + { + class ALIBABACLOUD_ARMS4FINANCE_EXPORT ARMS4FINANCEClient : public RpcServiceClient + { + public: + typedef Outcome WhereInDimQueryOutcome; + typedef std::future WhereInDimQueryOutcomeCallable; + typedef std::function&)> WhereInDimQueryAsyncHandler; + typedef Outcome ARMSQueryDataSetOutcome; + typedef std::future ARMSQueryDataSetOutcomeCallable; + typedef std::function&)> ARMSQueryDataSetAsyncHandler; + + ARMS4FINANCEClient(const Credentials &credentials, const ClientConfiguration &configuration); + ARMS4FINANCEClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); + ARMS4FINANCEClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); + ~ARMS4FINANCEClient(); + WhereInDimQueryOutcome whereInDimQuery(const Model::WhereInDimQueryRequest &request)const; + void whereInDimQueryAsync(const Model::WhereInDimQueryRequest& request, const WhereInDimQueryAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + WhereInDimQueryOutcomeCallable whereInDimQueryCallable(const Model::WhereInDimQueryRequest& request) const; + ARMSQueryDataSetOutcome aRMSQueryDataSet(const Model::ARMSQueryDataSetRequest &request)const; + void aRMSQueryDataSetAsync(const Model::ARMSQueryDataSetRequest& request, const ARMSQueryDataSetAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ARMSQueryDataSetOutcomeCallable aRMSQueryDataSetCallable(const Model::ARMSQueryDataSetRequest& request) const; + + private: + std::shared_ptr endpointProvider_; + }; + } +} + +#endif // !ALIBABACLOUD_ARMS4FINANCE_ARMS4FINANCECLIENT_H_ diff --git a/arms4finance/include/alibabacloud/arms4finance/ARMS4FINANCEExport.h b/arms4finance/include/alibabacloud/arms4finance/ARMS4FINANCEExport.h new file mode 100644 index 000000000..1632b7b39 --- /dev/null +++ b/arms4finance/include/alibabacloud/arms4finance/ARMS4FINANCEExport.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_ARMS4FINANCE_ARMS4FINANCEEXPORT_H_ +#define ALIBABACLOUD_ARMS4FINANCE_ARMS4FINANCEEXPORT_H_ + +#include + +#if defined(ALIBABACLOUD_SHARED) +# if defined(ALIBABACLOUD_ARMS4FINANCE_LIBRARY) +# define ALIBABACLOUD_ARMS4FINANCE_EXPORT ALIBABACLOUD_DECL_EXPORT +# else +# define ALIBABACLOUD_ARMS4FINANCE_EXPORT ALIBABACLOUD_DECL_IMPORT +# endif +#else +# define ALIBABACLOUD_ARMS4FINANCE_EXPORT +#endif + +#endif // !ALIBABACLOUD_ARMS4FINANCE_ARMS4FINANCEEXPORT_H_ \ No newline at end of file diff --git a/arms4finance/include/alibabacloud/arms4finance/model/ARMSQueryDataSetRequest.h b/arms4finance/include/alibabacloud/arms4finance/model/ARMSQueryDataSetRequest.h new file mode 100644 index 000000000..ef39124dd --- /dev/null +++ b/arms4finance/include/alibabacloud/arms4finance/model/ARMSQueryDataSetRequest.h @@ -0,0 +1,74 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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_ARMS4FINANCE_MODEL_ARMSQUERYDATASETREQUEST_H_ +#define ALIBABACLOUD_ARMS4FINANCE_MODEL_ARMSQUERYDATASETREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ARMS4FINANCE + { + namespace Model + { + class ALIBABACLOUD_ARMS4FINANCE_EXPORT ARMSQueryDataSetRequest : public RpcServiceRequest + { + struct Dimensions + { + std::string value; + std::string key; + }; + + public: + ARMSQueryDataSetRequest(); + ~ARMSQueryDataSetRequest(); + + std::vector getMeasures()const; + void setMeasures(const std::vector& measures); + int getIntervalInSec()const; + void setIntervalInSec(int intervalInSec); + std::string getDateStr()const; + void setDateStr(const std::string& dateStr); + bool getIsDrillDown()const; + void setIsDrillDown(bool isDrillDown); + long getMinTime()const; + void setMinTime(long minTime); + long getDatasetId()const; + void setDatasetId(long datasetId); + long getMaxTime()const; + void setMaxTime(long maxTime); + std::vector getDimensions()const; + void setDimensions(const std::vector& dimensions); + + private: + std::vector measures_; + int intervalInSec_; + std::string dateStr_; + bool isDrillDown_; + long minTime_; + long datasetId_; + long maxTime_; + std::vector dimensions_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ARMS4FINANCE_MODEL_ARMSQUERYDATASETREQUEST_H_ \ No newline at end of file diff --git a/arms4finance/include/alibabacloud/arms4finance/model/ARMSQueryDataSetResult.h b/arms4finance/include/alibabacloud/arms4finance/model/ARMSQueryDataSetResult.h new file mode 100644 index 000000000..b0f5a7ba8 --- /dev/null +++ b/arms4finance/include/alibabacloud/arms4finance/model/ARMSQueryDataSetResult.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_ARMS4FINANCE_MODEL_ARMSQUERYDATASETRESULT_H_ +#define ALIBABACLOUD_ARMS4FINANCE_MODEL_ARMSQUERYDATASETRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ARMS4FINANCE + { + namespace Model + { + class ALIBABACLOUD_ARMS4FINANCE_EXPORT ARMSQueryDataSetResult : public ServiceResult + { + public: + + + ARMSQueryDataSetResult(); + explicit ARMSQueryDataSetResult(const std::string &payload); + ~ARMSQueryDataSetResult(); + std::string getData()const; + + protected: + void parse(const std::string &payload); + private: + std::string data_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ARMS4FINANCE_MODEL_ARMSQUERYDATASETRESULT_H_ \ No newline at end of file diff --git a/arms4finance/include/alibabacloud/arms4finance/model/WhereInDimQueryRequest.h b/arms4finance/include/alibabacloud/arms4finance/model/WhereInDimQueryRequest.h new file mode 100644 index 000000000..4d84b959b --- /dev/null +++ b/arms4finance/include/alibabacloud/arms4finance/model/WhereInDimQueryRequest.h @@ -0,0 +1,80 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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_ARMS4FINANCE_MODEL_WHEREINDIMQUERYREQUEST_H_ +#define ALIBABACLOUD_ARMS4FINANCE_MODEL_WHEREINDIMQUERYREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ARMS4FINANCE + { + namespace Model + { + class ALIBABACLOUD_ARMS4FINANCE_EXPORT WhereInDimQueryRequest : public RpcServiceRequest + { + struct Dimensions + { + std::string value; + std::string key; + }; + + public: + WhereInDimQueryRequest(); + ~WhereInDimQueryRequest(); + + std::string getWhereInKey()const; + void setWhereInKey(const std::string& whereInKey); + std::vector getMeasures()const; + void setMeasures(const std::vector& measures); + int getIntervalInSec()const; + void setIntervalInSec(int intervalInSec); + std::string getDateStr()const; + void setDateStr(const std::string& dateStr); + bool getIsDrillDown()const; + void setIsDrillDown(bool isDrillDown); + long getMinTime()const; + void setMinTime(long minTime); + long getDatasetId()const; + void setDatasetId(long datasetId); + std::vector getWhereInValues()const; + void setWhereInValues(const std::vector& whereInValues); + long getMaxTime()const; + void setMaxTime(long maxTime); + std::vector getDimensions()const; + void setDimensions(const std::vector& dimensions); + + private: + std::string whereInKey_; + std::vector measures_; + int intervalInSec_; + std::string dateStr_; + bool isDrillDown_; + long minTime_; + long datasetId_; + std::vector whereInValues_; + long maxTime_; + std::vector dimensions_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ARMS4FINANCE_MODEL_WHEREINDIMQUERYREQUEST_H_ \ No newline at end of file diff --git a/arms4finance/include/alibabacloud/arms4finance/model/WhereInDimQueryResult.h b/arms4finance/include/alibabacloud/arms4finance/model/WhereInDimQueryResult.h new file mode 100644 index 000000000..86eead714 --- /dev/null +++ b/arms4finance/include/alibabacloud/arms4finance/model/WhereInDimQueryResult.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_ARMS4FINANCE_MODEL_WHEREINDIMQUERYRESULT_H_ +#define ALIBABACLOUD_ARMS4FINANCE_MODEL_WHEREINDIMQUERYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace ARMS4FINANCE + { + namespace Model + { + class ALIBABACLOUD_ARMS4FINANCE_EXPORT WhereInDimQueryResult : public ServiceResult + { + public: + + + WhereInDimQueryResult(); + explicit WhereInDimQueryResult(const std::string &payload); + ~WhereInDimQueryResult(); + std::string getData()const; + + protected: + void parse(const std::string &payload); + private: + std::string data_; + + }; + } + } +} +#endif // !ALIBABACLOUD_ARMS4FINANCE_MODEL_WHEREINDIMQUERYRESULT_H_ \ No newline at end of file diff --git a/arms4finance/src/ARMS4FINANCEClient.cc b/arms4finance/src/ARMS4FINANCEClient.cc new file mode 100644 index 000000000..e42a62fec --- /dev/null +++ b/arms4finance/src/ARMS4FINANCEClient.cc @@ -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 +#include + +using namespace AlibabaCloud; +using namespace AlibabaCloud::Location; +using namespace AlibabaCloud::ARMS4FINANCE; +using namespace AlibabaCloud::ARMS4FINANCE::Model; + +namespace +{ + const std::string SERVICE_NAME = "ARMS4FINANCE"; +} + +ARMS4FINANCEClient::ARMS4FINANCEClient(const Credentials &credentials, const ClientConfiguration &configuration) : + RpcServiceClient(SERVICE_NAME, std::make_shared(credentials), configuration) +{ + auto locationClient = std::make_shared(credentials, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "arms4finance"); +} + +ARMS4FINANCEClient::ARMS4FINANCEClient(const std::shared_ptr& credentialsProvider, const ClientConfiguration & configuration) : + RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) +{ + auto locationClient = std::make_shared(credentialsProvider, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "arms4finance"); +} + +ARMS4FINANCEClient::ARMS4FINANCEClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) : + RpcServiceClient(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, "arms4finance"); +} + +ARMS4FINANCEClient::~ARMS4FINANCEClient() +{} + +ARMS4FINANCEClient::WhereInDimQueryOutcome ARMS4FINANCEClient::whereInDimQuery(const WhereInDimQueryRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return WhereInDimQueryOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return WhereInDimQueryOutcome(WhereInDimQueryResult(outcome.result())); + else + return WhereInDimQueryOutcome(outcome.error()); +} + +void ARMS4FINANCEClient::whereInDimQueryAsync(const WhereInDimQueryRequest& request, const WhereInDimQueryAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, whereInDimQuery(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ARMS4FINANCEClient::WhereInDimQueryOutcomeCallable ARMS4FINANCEClient::whereInDimQueryCallable(const WhereInDimQueryRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->whereInDimQuery(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +ARMS4FINANCEClient::ARMSQueryDataSetOutcome ARMS4FINANCEClient::aRMSQueryDataSet(const ARMSQueryDataSetRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ARMSQueryDataSetOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ARMSQueryDataSetOutcome(ARMSQueryDataSetResult(outcome.result())); + else + return ARMSQueryDataSetOutcome(outcome.error()); +} + +void ARMS4FINANCEClient::aRMSQueryDataSetAsync(const ARMSQueryDataSetRequest& request, const ARMSQueryDataSetAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, aRMSQueryDataSet(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +ARMS4FINANCEClient::ARMSQueryDataSetOutcomeCallable ARMS4FINANCEClient::aRMSQueryDataSetCallable(const ARMSQueryDataSetRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->aRMSQueryDataSet(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + diff --git a/arms4finance/src/model/ARMSQueryDataSetRequest.cc b/arms4finance/src/model/ARMSQueryDataSetRequest.cc new file mode 100644 index 000000000..048aa4ecb --- /dev/null +++ b/arms4finance/src/model/ARMSQueryDataSetRequest.cc @@ -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 + +using AlibabaCloud::ARMS4FINANCE::Model::ARMSQueryDataSetRequest; + +ARMSQueryDataSetRequest::ARMSQueryDataSetRequest() : + RpcServiceRequest("arms4finance", "2017-11-30", "ARMSQueryDataSet") +{} + +ARMSQueryDataSetRequest::~ARMSQueryDataSetRequest() +{} + +std::vector ARMSQueryDataSetRequest::getMeasures()const +{ + return measures_; +} + +void ARMSQueryDataSetRequest::setMeasures(const std::vector& measures) +{ + measures_ = measures; + for(int i = 0; i!= measures.size(); i++) + setParameter("Measures."+ std::to_string(i), measures.at(i)); +} + +int ARMSQueryDataSetRequest::getIntervalInSec()const +{ + return intervalInSec_; +} + +void ARMSQueryDataSetRequest::setIntervalInSec(int intervalInSec) +{ + intervalInSec_ = intervalInSec; + setParameter("IntervalInSec", std::to_string(intervalInSec)); +} + +std::string ARMSQueryDataSetRequest::getDateStr()const +{ + return dateStr_; +} + +void ARMSQueryDataSetRequest::setDateStr(const std::string& dateStr) +{ + dateStr_ = dateStr; + setParameter("DateStr", dateStr); +} + +bool ARMSQueryDataSetRequest::getIsDrillDown()const +{ + return isDrillDown_; +} + +void ARMSQueryDataSetRequest::setIsDrillDown(bool isDrillDown) +{ + isDrillDown_ = isDrillDown; + setParameter("IsDrillDown", std::to_string(isDrillDown)); +} + +long ARMSQueryDataSetRequest::getMinTime()const +{ + return minTime_; +} + +void ARMSQueryDataSetRequest::setMinTime(long minTime) +{ + minTime_ = minTime; + setParameter("MinTime", std::to_string(minTime)); +} + +long ARMSQueryDataSetRequest::getDatasetId()const +{ + return datasetId_; +} + +void ARMSQueryDataSetRequest::setDatasetId(long datasetId) +{ + datasetId_ = datasetId; + setParameter("DatasetId", std::to_string(datasetId)); +} + +long ARMSQueryDataSetRequest::getMaxTime()const +{ + return maxTime_; +} + +void ARMSQueryDataSetRequest::setMaxTime(long maxTime) +{ + maxTime_ = maxTime; + setParameter("MaxTime", std::to_string(maxTime)); +} + +std::vector ARMSQueryDataSetRequest::getDimensions()const +{ + return dimensions_; +} + +void ARMSQueryDataSetRequest::setDimensions(const std::vector& dimensions) +{ + dimensions_ = dimensions; + int i = 0; + for(int i = 0; i!= dimensions.size(); i++) { + auto obj = dimensions.at(i); + std::string str ="Dimensions."+ std::to_string(i); + setParameter(str + ".Value", obj.value); + setParameter(str + ".Key", obj.key); + } +} + diff --git a/arms4finance/src/model/ARMSQueryDataSetResult.cc b/arms4finance/src/model/ARMSQueryDataSetResult.cc new file mode 100644 index 000000000..e256ab853 --- /dev/null +++ b/arms4finance/src/model/ARMSQueryDataSetResult.cc @@ -0,0 +1,52 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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::ARMS4FINANCE; +using namespace AlibabaCloud::ARMS4FINANCE::Model; + +ARMSQueryDataSetResult::ARMSQueryDataSetResult() : + ServiceResult() +{} + +ARMSQueryDataSetResult::ARMSQueryDataSetResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ARMSQueryDataSetResult::~ARMSQueryDataSetResult() +{} + +void ARMSQueryDataSetResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + if(!value["Data"].isNull()) + data_ = value["Data"].asString(); + +} + +std::string ARMSQueryDataSetResult::getData()const +{ + return data_; +} + diff --git a/arms4finance/src/model/WhereInDimQueryRequest.cc b/arms4finance/src/model/WhereInDimQueryRequest.cc new file mode 100644 index 000000000..1b8b18c07 --- /dev/null +++ b/arms4finance/src/model/WhereInDimQueryRequest.cc @@ -0,0 +1,145 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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::ARMS4FINANCE::Model::WhereInDimQueryRequest; + +WhereInDimQueryRequest::WhereInDimQueryRequest() : + RpcServiceRequest("arms4finance", "2017-11-30", "WhereInDimQuery") +{} + +WhereInDimQueryRequest::~WhereInDimQueryRequest() +{} + +std::string WhereInDimQueryRequest::getWhereInKey()const +{ + return whereInKey_; +} + +void WhereInDimQueryRequest::setWhereInKey(const std::string& whereInKey) +{ + whereInKey_ = whereInKey; + setParameter("WhereInKey", whereInKey); +} + +std::vector WhereInDimQueryRequest::getMeasures()const +{ + return measures_; +} + +void WhereInDimQueryRequest::setMeasures(const std::vector& measures) +{ + measures_ = measures; + for(int i = 0; i!= measures.size(); i++) + setParameter("Measures."+ std::to_string(i), measures.at(i)); +} + +int WhereInDimQueryRequest::getIntervalInSec()const +{ + return intervalInSec_; +} + +void WhereInDimQueryRequest::setIntervalInSec(int intervalInSec) +{ + intervalInSec_ = intervalInSec; + setParameter("IntervalInSec", std::to_string(intervalInSec)); +} + +std::string WhereInDimQueryRequest::getDateStr()const +{ + return dateStr_; +} + +void WhereInDimQueryRequest::setDateStr(const std::string& dateStr) +{ + dateStr_ = dateStr; + setParameter("DateStr", dateStr); +} + +bool WhereInDimQueryRequest::getIsDrillDown()const +{ + return isDrillDown_; +} + +void WhereInDimQueryRequest::setIsDrillDown(bool isDrillDown) +{ + isDrillDown_ = isDrillDown; + setParameter("IsDrillDown", std::to_string(isDrillDown)); +} + +long WhereInDimQueryRequest::getMinTime()const +{ + return minTime_; +} + +void WhereInDimQueryRequest::setMinTime(long minTime) +{ + minTime_ = minTime; + setParameter("MinTime", std::to_string(minTime)); +} + +long WhereInDimQueryRequest::getDatasetId()const +{ + return datasetId_; +} + +void WhereInDimQueryRequest::setDatasetId(long datasetId) +{ + datasetId_ = datasetId; + setParameter("DatasetId", std::to_string(datasetId)); +} + +std::vector WhereInDimQueryRequest::getWhereInValues()const +{ + return whereInValues_; +} + +void WhereInDimQueryRequest::setWhereInValues(const std::vector& whereInValues) +{ + whereInValues_ = whereInValues; + for(int i = 0; i!= whereInValues.size(); i++) + setParameter("WhereInValues."+ std::to_string(i), whereInValues.at(i)); +} + +long WhereInDimQueryRequest::getMaxTime()const +{ + return maxTime_; +} + +void WhereInDimQueryRequest::setMaxTime(long maxTime) +{ + maxTime_ = maxTime; + setParameter("MaxTime", std::to_string(maxTime)); +} + +std::vector WhereInDimQueryRequest::getDimensions()const +{ + return dimensions_; +} + +void WhereInDimQueryRequest::setDimensions(const std::vector& dimensions) +{ + dimensions_ = dimensions; + int i = 0; + for(int i = 0; i!= dimensions.size(); i++) { + auto obj = dimensions.at(i); + std::string str ="Dimensions."+ std::to_string(i); + setParameter(str + ".Value", obj.value); + setParameter(str + ".Key", obj.key); + } +} + diff --git a/arms4finance/src/model/WhereInDimQueryResult.cc b/arms4finance/src/model/WhereInDimQueryResult.cc new file mode 100644 index 000000000..e6e8ae33f --- /dev/null +++ b/arms4finance/src/model/WhereInDimQueryResult.cc @@ -0,0 +1,52 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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::ARMS4FINANCE; +using namespace AlibabaCloud::ARMS4FINANCE::Model; + +WhereInDimQueryResult::WhereInDimQueryResult() : + ServiceResult() +{} + +WhereInDimQueryResult::WhereInDimQueryResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +WhereInDimQueryResult::~WhereInDimQueryResult() +{} + +void WhereInDimQueryResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + if(!value["Data"].isNull()) + data_ = value["Data"].asString(); + +} + +std::string WhereInDimQueryResult::getData()const +{ + return data_; +} +