diff --git a/CHANGELOG b/CHANGELOG index 6585c69db..fd3e73623 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2019-09-05 Version 1.36.108 +- Generated 2015-11-01 for `Market`. + 2019-09-05 Version 1.36.107 - Generated 2016-07-14 for `CloudAPI`. diff --git a/VERSION b/VERSION index 9ee5e4416..1744fe419 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.107 \ No newline at end of file +1.36.108 \ No newline at end of file diff --git a/market/CMakeLists.txt b/market/CMakeLists.txt new file mode 100644 index 000000000..54c25859a --- /dev/null +++ b/market/CMakeLists.txt @@ -0,0 +1,170 @@ +# +# 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(market_public_header + include/alibabacloud/market/MarketClient.h + include/alibabacloud/market/MarketExport.h ) + +set(market_public_header_model + include/alibabacloud/market/model/NotifyContractEventRequest.h + include/alibabacloud/market/model/NotifyContractEventResult.h + include/alibabacloud/market/model/PushMeteringDataRequest.h + include/alibabacloud/market/model/PushMeteringDataResult.h + include/alibabacloud/market/model/DescribeOrderRequest.h + include/alibabacloud/market/model/DescribeOrderResult.h + include/alibabacloud/market/model/BindImagePackageRequest.h + include/alibabacloud/market/model/BindImagePackageResult.h + include/alibabacloud/market/model/QueryMarketImagesRequest.h + include/alibabacloud/market/model/QueryMarketImagesResult.h + include/alibabacloud/market/model/DescribeProductsRequest.h + include/alibabacloud/market/model/DescribeProductsResult.h + include/alibabacloud/market/model/CreateOrderRequest.h + include/alibabacloud/market/model/CreateOrderResult.h + include/alibabacloud/market/model/DescribePriceRequest.h + include/alibabacloud/market/model/DescribePriceResult.h + include/alibabacloud/market/model/DescribeRateRequest.h + include/alibabacloud/market/model/DescribeRateResult.h + include/alibabacloud/market/model/QueryMarketCategoriesRequest.h + include/alibabacloud/market/model/QueryMarketCategoriesResult.h + include/alibabacloud/market/model/CreateRateRequest.h + include/alibabacloud/market/model/CreateRateResult.h + include/alibabacloud/market/model/DescribeInstanceRequest.h + include/alibabacloud/market/model/DescribeInstanceResult.h + include/alibabacloud/market/model/DescribeLicenseRequest.h + include/alibabacloud/market/model/DescribeLicenseResult.h + include/alibabacloud/market/model/DescribeInstancesRequest.h + include/alibabacloud/market/model/DescribeInstancesResult.h + include/alibabacloud/market/model/ActivateLicenseRequest.h + include/alibabacloud/market/model/ActivateLicenseResult.h + include/alibabacloud/market/model/DescribeCommodityRequest.h + include/alibabacloud/market/model/DescribeCommodityResult.h + include/alibabacloud/market/model/DescribeProductRequest.h + include/alibabacloud/market/model/DescribeProductResult.h + include/alibabacloud/market/model/CreateCommodityRequest.h + include/alibabacloud/market/model/CreateCommodityResult.h + include/alibabacloud/market/model/DeleteCommodityRequest.h + include/alibabacloud/market/model/DeleteCommodityResult.h + include/alibabacloud/market/model/UpdateCommodityRequest.h + include/alibabacloud/market/model/UpdateCommodityResult.h + include/alibabacloud/market/model/DescribeCommoditiesRequest.h + include/alibabacloud/market/model/DescribeCommoditiesResult.h + include/alibabacloud/market/model/UploadCommodityFileRequest.h + include/alibabacloud/market/model/UploadCommodityFileResult.h ) + +set(market_src + src/com.aliyun.pop.sdk.domain.Product@6f1c29b7Client.cc + src/model/NotifyContractEventRequest.cc + src/model/NotifyContractEventResult.cc + src/model/PushMeteringDataRequest.cc + src/model/PushMeteringDataResult.cc + src/model/DescribeOrderRequest.cc + src/model/DescribeOrderResult.cc + src/model/BindImagePackageRequest.cc + src/model/BindImagePackageResult.cc + src/model/QueryMarketImagesRequest.cc + src/model/QueryMarketImagesResult.cc + src/model/DescribeProductsRequest.cc + src/model/DescribeProductsResult.cc + src/model/CreateOrderRequest.cc + src/model/CreateOrderResult.cc + src/model/DescribePriceRequest.cc + src/model/DescribePriceResult.cc + src/model/DescribeRateRequest.cc + src/model/DescribeRateResult.cc + src/model/QueryMarketCategoriesRequest.cc + src/model/QueryMarketCategoriesResult.cc + src/model/CreateRateRequest.cc + src/model/CreateRateResult.cc + src/model/DescribeInstanceRequest.cc + src/model/DescribeInstanceResult.cc + src/model/DescribeLicenseRequest.cc + src/model/DescribeLicenseResult.cc + src/model/DescribeInstancesRequest.cc + src/model/DescribeInstancesResult.cc + src/model/ActivateLicenseRequest.cc + src/model/ActivateLicenseResult.cc + src/model/DescribeCommodityRequest.cc + src/model/DescribeCommodityResult.cc + src/model/DescribeProductRequest.cc + src/model/DescribeProductResult.cc + src/model/CreateCommodityRequest.cc + src/model/CreateCommodityResult.cc + src/model/DeleteCommodityRequest.cc + src/model/DeleteCommodityResult.cc + src/model/UpdateCommodityRequest.cc + src/model/UpdateCommodityResult.cc + src/model/DescribeCommoditiesRequest.cc + src/model/DescribeCommoditiesResult.cc + src/model/UploadCommodityFileRequest.cc + src/model/UploadCommodityFileResult.cc ) + +add_library(market ${LIB_TYPE} + ${market_public_header} + ${market_public_header_model} + ${market_src}) + +set_target_properties(market + 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}market + ) + +if(${LIB_TYPE} STREQUAL "SHARED") + set_target_properties(market + PROPERTIES + DEFINE_SYMBOL ALIBABACLOUD_MARKET_LIBRARY) +endif() + +target_include_directories(market + PRIVATE include + ${CMAKE_SOURCE_DIR}/core/include + ) +target_link_libraries(market + core) + +if(CMAKE_HOST_WIN32) + ExternalProject_Get_Property(jsoncpp INSTALL_DIR) + set(jsoncpp_install_dir ${INSTALL_DIR}) + add_dependencies(market + jsoncpp) + target_include_directories(market + PRIVATE ${jsoncpp_install_dir}/include) + target_link_libraries(market + ${jsoncpp_install_dir}/lib/jsoncpp.lib) + set_target_properties(market + PROPERTIES + COMPILE_OPTIONS "/bigobj") +else() + target_include_directories(market + PRIVATE /usr/include/jsoncpp) + target_link_libraries(market + jsoncpp) +endif() + +install(FILES ${market_public_header} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/market) +install(FILES ${market_public_header_model} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/market/model) +install(TARGETS market + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) \ No newline at end of file diff --git a/market/include/alibabacloud/market/MarketClient.h b/market/include/alibabacloud/market/MarketClient.h new file mode 100644 index 000000000..7f6fe3103 --- /dev/null +++ b/market/include/alibabacloud/market/MarketClient.h @@ -0,0 +1,222 @@ +/* + * 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_MARKET_MARKETCLIENT_H_ +#define ALIBABACLOUD_MARKET_MARKETCLIENT_H_ + +#include +#include +#include +#include +#include "MarketExport.h" +#include "model/NotifyContractEventRequest.h" +#include "model/NotifyContractEventResult.h" +#include "model/PushMeteringDataRequest.h" +#include "model/PushMeteringDataResult.h" +#include "model/DescribeOrderRequest.h" +#include "model/DescribeOrderResult.h" +#include "model/BindImagePackageRequest.h" +#include "model/BindImagePackageResult.h" +#include "model/QueryMarketImagesRequest.h" +#include "model/QueryMarketImagesResult.h" +#include "model/DescribeProductsRequest.h" +#include "model/DescribeProductsResult.h" +#include "model/CreateOrderRequest.h" +#include "model/CreateOrderResult.h" +#include "model/DescribePriceRequest.h" +#include "model/DescribePriceResult.h" +#include "model/DescribeRateRequest.h" +#include "model/DescribeRateResult.h" +#include "model/QueryMarketCategoriesRequest.h" +#include "model/QueryMarketCategoriesResult.h" +#include "model/CreateRateRequest.h" +#include "model/CreateRateResult.h" +#include "model/DescribeInstanceRequest.h" +#include "model/DescribeInstanceResult.h" +#include "model/DescribeLicenseRequest.h" +#include "model/DescribeLicenseResult.h" +#include "model/DescribeInstancesRequest.h" +#include "model/DescribeInstancesResult.h" +#include "model/ActivateLicenseRequest.h" +#include "model/ActivateLicenseResult.h" +#include "model/DescribeCommodityRequest.h" +#include "model/DescribeCommodityResult.h" +#include "model/DescribeProductRequest.h" +#include "model/DescribeProductResult.h" +#include "model/CreateCommodityRequest.h" +#include "model/CreateCommodityResult.h" +#include "model/DeleteCommodityRequest.h" +#include "model/DeleteCommodityResult.h" +#include "model/UpdateCommodityRequest.h" +#include "model/UpdateCommodityResult.h" +#include "model/DescribeCommoditiesRequest.h" +#include "model/DescribeCommoditiesResult.h" +#include "model/UploadCommodityFileRequest.h" +#include "model/UploadCommodityFileResult.h" + + +namespace AlibabaCloud +{ + namespace Market + { + class ALIBABACLOUD_MARKET_EXPORT MarketClient : public RpcServiceClient + { + public: + typedef Outcome NotifyContractEventOutcome; + typedef std::future NotifyContractEventOutcomeCallable; + typedef std::function&)> NotifyContractEventAsyncHandler; + typedef Outcome PushMeteringDataOutcome; + typedef std::future PushMeteringDataOutcomeCallable; + typedef std::function&)> PushMeteringDataAsyncHandler; + typedef Outcome DescribeOrderOutcome; + typedef std::future DescribeOrderOutcomeCallable; + typedef std::function&)> DescribeOrderAsyncHandler; + typedef Outcome BindImagePackageOutcome; + typedef std::future BindImagePackageOutcomeCallable; + typedef std::function&)> BindImagePackageAsyncHandler; + typedef Outcome QueryMarketImagesOutcome; + typedef std::future QueryMarketImagesOutcomeCallable; + typedef std::function&)> QueryMarketImagesAsyncHandler; + typedef Outcome DescribeProductsOutcome; + typedef std::future DescribeProductsOutcomeCallable; + typedef std::function&)> DescribeProductsAsyncHandler; + typedef Outcome CreateOrderOutcome; + typedef std::future CreateOrderOutcomeCallable; + typedef std::function&)> CreateOrderAsyncHandler; + typedef Outcome DescribePriceOutcome; + typedef std::future DescribePriceOutcomeCallable; + typedef std::function&)> DescribePriceAsyncHandler; + typedef Outcome DescribeRateOutcome; + typedef std::future DescribeRateOutcomeCallable; + typedef std::function&)> DescribeRateAsyncHandler; + typedef Outcome QueryMarketCategoriesOutcome; + typedef std::future QueryMarketCategoriesOutcomeCallable; + typedef std::function&)> QueryMarketCategoriesAsyncHandler; + typedef Outcome CreateRateOutcome; + typedef std::future CreateRateOutcomeCallable; + typedef std::function&)> CreateRateAsyncHandler; + typedef Outcome DescribeInstanceOutcome; + typedef std::future DescribeInstanceOutcomeCallable; + typedef std::function&)> DescribeInstanceAsyncHandler; + typedef Outcome DescribeLicenseOutcome; + typedef std::future DescribeLicenseOutcomeCallable; + typedef std::function&)> DescribeLicenseAsyncHandler; + typedef Outcome DescribeInstancesOutcome; + typedef std::future DescribeInstancesOutcomeCallable; + typedef std::function&)> DescribeInstancesAsyncHandler; + typedef Outcome ActivateLicenseOutcome; + typedef std::future ActivateLicenseOutcomeCallable; + typedef std::function&)> ActivateLicenseAsyncHandler; + typedef Outcome DescribeCommodityOutcome; + typedef std::future DescribeCommodityOutcomeCallable; + typedef std::function&)> DescribeCommodityAsyncHandler; + typedef Outcome DescribeProductOutcome; + typedef std::future DescribeProductOutcomeCallable; + typedef std::function&)> DescribeProductAsyncHandler; + typedef Outcome CreateCommodityOutcome; + typedef std::future CreateCommodityOutcomeCallable; + typedef std::function&)> CreateCommodityAsyncHandler; + typedef Outcome DeleteCommodityOutcome; + typedef std::future DeleteCommodityOutcomeCallable; + typedef std::function&)> DeleteCommodityAsyncHandler; + typedef Outcome UpdateCommodityOutcome; + typedef std::future UpdateCommodityOutcomeCallable; + typedef std::function&)> UpdateCommodityAsyncHandler; + typedef Outcome DescribeCommoditiesOutcome; + typedef std::future DescribeCommoditiesOutcomeCallable; + typedef std::function&)> DescribeCommoditiesAsyncHandler; + typedef Outcome UploadCommodityFileOutcome; + typedef std::future UploadCommodityFileOutcomeCallable; + typedef std::function&)> UploadCommodityFileAsyncHandler; + + MarketClient(const Credentials &credentials, const ClientConfiguration &configuration); + MarketClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); + MarketClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); + ~MarketClient(); + NotifyContractEventOutcome notifyContractEvent(const Model::NotifyContractEventRequest &request)const; + void notifyContractEventAsync(const Model::NotifyContractEventRequest& request, const NotifyContractEventAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + NotifyContractEventOutcomeCallable notifyContractEventCallable(const Model::NotifyContractEventRequest& request) const; + PushMeteringDataOutcome pushMeteringData(const Model::PushMeteringDataRequest &request)const; + void pushMeteringDataAsync(const Model::PushMeteringDataRequest& request, const PushMeteringDataAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + PushMeteringDataOutcomeCallable pushMeteringDataCallable(const Model::PushMeteringDataRequest& request) const; + DescribeOrderOutcome describeOrder(const Model::DescribeOrderRequest &request)const; + void describeOrderAsync(const Model::DescribeOrderRequest& request, const DescribeOrderAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeOrderOutcomeCallable describeOrderCallable(const Model::DescribeOrderRequest& request) const; + BindImagePackageOutcome bindImagePackage(const Model::BindImagePackageRequest &request)const; + void bindImagePackageAsync(const Model::BindImagePackageRequest& request, const BindImagePackageAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + BindImagePackageOutcomeCallable bindImagePackageCallable(const Model::BindImagePackageRequest& request) const; + QueryMarketImagesOutcome queryMarketImages(const Model::QueryMarketImagesRequest &request)const; + void queryMarketImagesAsync(const Model::QueryMarketImagesRequest& request, const QueryMarketImagesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + QueryMarketImagesOutcomeCallable queryMarketImagesCallable(const Model::QueryMarketImagesRequest& request) const; + DescribeProductsOutcome describeProducts(const Model::DescribeProductsRequest &request)const; + void describeProductsAsync(const Model::DescribeProductsRequest& request, const DescribeProductsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeProductsOutcomeCallable describeProductsCallable(const Model::DescribeProductsRequest& request) const; + CreateOrderOutcome createOrder(const Model::CreateOrderRequest &request)const; + void createOrderAsync(const Model::CreateOrderRequest& request, const CreateOrderAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateOrderOutcomeCallable createOrderCallable(const Model::CreateOrderRequest& request) const; + DescribePriceOutcome describePrice(const Model::DescribePriceRequest &request)const; + void describePriceAsync(const Model::DescribePriceRequest& request, const DescribePriceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribePriceOutcomeCallable describePriceCallable(const Model::DescribePriceRequest& request) const; + DescribeRateOutcome describeRate(const Model::DescribeRateRequest &request)const; + void describeRateAsync(const Model::DescribeRateRequest& request, const DescribeRateAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeRateOutcomeCallable describeRateCallable(const Model::DescribeRateRequest& request) const; + QueryMarketCategoriesOutcome queryMarketCategories(const Model::QueryMarketCategoriesRequest &request)const; + void queryMarketCategoriesAsync(const Model::QueryMarketCategoriesRequest& request, const QueryMarketCategoriesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + QueryMarketCategoriesOutcomeCallable queryMarketCategoriesCallable(const Model::QueryMarketCategoriesRequest& request) const; + CreateRateOutcome createRate(const Model::CreateRateRequest &request)const; + void createRateAsync(const Model::CreateRateRequest& request, const CreateRateAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateRateOutcomeCallable createRateCallable(const Model::CreateRateRequest& request) const; + DescribeInstanceOutcome describeInstance(const Model::DescribeInstanceRequest &request)const; + void describeInstanceAsync(const Model::DescribeInstanceRequest& request, const DescribeInstanceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeInstanceOutcomeCallable describeInstanceCallable(const Model::DescribeInstanceRequest& request) const; + DescribeLicenseOutcome describeLicense(const Model::DescribeLicenseRequest &request)const; + void describeLicenseAsync(const Model::DescribeLicenseRequest& request, const DescribeLicenseAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeLicenseOutcomeCallable describeLicenseCallable(const Model::DescribeLicenseRequest& request) const; + DescribeInstancesOutcome describeInstances(const Model::DescribeInstancesRequest &request)const; + void describeInstancesAsync(const Model::DescribeInstancesRequest& request, const DescribeInstancesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeInstancesOutcomeCallable describeInstancesCallable(const Model::DescribeInstancesRequest& request) const; + ActivateLicenseOutcome activateLicense(const Model::ActivateLicenseRequest &request)const; + void activateLicenseAsync(const Model::ActivateLicenseRequest& request, const ActivateLicenseAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ActivateLicenseOutcomeCallable activateLicenseCallable(const Model::ActivateLicenseRequest& request) const; + DescribeCommodityOutcome describeCommodity(const Model::DescribeCommodityRequest &request)const; + void describeCommodityAsync(const Model::DescribeCommodityRequest& request, const DescribeCommodityAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeCommodityOutcomeCallable describeCommodityCallable(const Model::DescribeCommodityRequest& request) const; + DescribeProductOutcome describeProduct(const Model::DescribeProductRequest &request)const; + void describeProductAsync(const Model::DescribeProductRequest& request, const DescribeProductAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeProductOutcomeCallable describeProductCallable(const Model::DescribeProductRequest& request) const; + CreateCommodityOutcome createCommodity(const Model::CreateCommodityRequest &request)const; + void createCommodityAsync(const Model::CreateCommodityRequest& request, const CreateCommodityAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateCommodityOutcomeCallable createCommodityCallable(const Model::CreateCommodityRequest& request) const; + DeleteCommodityOutcome deleteCommodity(const Model::DeleteCommodityRequest &request)const; + void deleteCommodityAsync(const Model::DeleteCommodityRequest& request, const DeleteCommodityAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DeleteCommodityOutcomeCallable deleteCommodityCallable(const Model::DeleteCommodityRequest& request) const; + UpdateCommodityOutcome updateCommodity(const Model::UpdateCommodityRequest &request)const; + void updateCommodityAsync(const Model::UpdateCommodityRequest& request, const UpdateCommodityAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UpdateCommodityOutcomeCallable updateCommodityCallable(const Model::UpdateCommodityRequest& request) const; + DescribeCommoditiesOutcome describeCommodities(const Model::DescribeCommoditiesRequest &request)const; + void describeCommoditiesAsync(const Model::DescribeCommoditiesRequest& request, const DescribeCommoditiesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeCommoditiesOutcomeCallable describeCommoditiesCallable(const Model::DescribeCommoditiesRequest& request) const; + UploadCommodityFileOutcome uploadCommodityFile(const Model::UploadCommodityFileRequest &request)const; + void uploadCommodityFileAsync(const Model::UploadCommodityFileRequest& request, const UploadCommodityFileAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + UploadCommodityFileOutcomeCallable uploadCommodityFileCallable(const Model::UploadCommodityFileRequest& request) const; + + private: + std::shared_ptr endpointProvider_; + }; + } +} + +#endif // !ALIBABACLOUD_MARKET_MARKETCLIENT_H_ diff --git a/market/include/alibabacloud/market/MarketExport.h b/market/include/alibabacloud/market/MarketExport.h new file mode 100644 index 000000000..e34cbc315 --- /dev/null +++ b/market/include/alibabacloud/market/MarketExport.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_MARKET_MARKETEXPORT_H_ +#define ALIBABACLOUD_MARKET_MARKETEXPORT_H_ + +#include + +#if defined(ALIBABACLOUD_SHARED) +# if defined(ALIBABACLOUD_MARKET_LIBRARY) +# define ALIBABACLOUD_MARKET_EXPORT ALIBABACLOUD_DECL_EXPORT +# else +# define ALIBABACLOUD_MARKET_EXPORT ALIBABACLOUD_DECL_IMPORT +# endif +#else +# define ALIBABACLOUD_MARKET_EXPORT +#endif + +#endif // !ALIBABACLOUD_MARKET_MARKETEXPORT_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/ActivateLicenseRequest.h b/market/include/alibabacloud/market/model/ActivateLicenseRequest.h new file mode 100644 index 000000000..39413834a --- /dev/null +++ b/market/include/alibabacloud/market/model/ActivateLicenseRequest.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_MARKET_MODEL_ACTIVATELICENSEREQUEST_H_ +#define ALIBABACLOUD_MARKET_MODEL_ACTIVATELICENSEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT ActivateLicenseRequest : public RpcServiceRequest + { + + public: + ActivateLicenseRequest(); + ~ActivateLicenseRequest(); + + std::string getIdentification()const; + void setIdentification(const std::string& identification); + std::string getLicenseCode()const; + void setLicenseCode(const std::string& licenseCode); + + private: + std::string identification_; + std::string licenseCode_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_ACTIVATELICENSEREQUEST_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/ActivateLicenseResult.h b/market/include/alibabacloud/market/model/ActivateLicenseResult.h new file mode 100644 index 000000000..5b6b6f4d4 --- /dev/null +++ b/market/include/alibabacloud/market/model/ActivateLicenseResult.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_MARKET_MODEL_ACTIVATELICENSERESULT_H_ +#define ALIBABACLOUD_MARKET_MODEL_ACTIVATELICENSERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT ActivateLicenseResult : public ServiceResult + { + public: + + + ActivateLicenseResult(); + explicit ActivateLicenseResult(const std::string &payload); + ~ActivateLicenseResult(); + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_ACTIVATELICENSERESULT_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/BindImagePackageRequest.h b/market/include/alibabacloud/market/model/BindImagePackageRequest.h new file mode 100644 index 000000000..18654fe63 --- /dev/null +++ b/market/include/alibabacloud/market/model/BindImagePackageRequest.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_MARKET_MODEL_BINDIMAGEPACKAGEREQUEST_H_ +#define ALIBABACLOUD_MARKET_MODEL_BINDIMAGEPACKAGEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT BindImagePackageRequest : public RpcServiceRequest + { + + public: + BindImagePackageRequest(); + ~BindImagePackageRequest(); + + std::string getEcsInstanceId()const; + void setEcsInstanceId(const std::string& ecsInstanceId); + std::string getImagePackageInstanceId()const; + void setImagePackageInstanceId(const std::string& imagePackageInstanceId); + + private: + std::string ecsInstanceId_; + std::string imagePackageInstanceId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_BINDIMAGEPACKAGEREQUEST_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/BindImagePackageResult.h b/market/include/alibabacloud/market/model/BindImagePackageResult.h new file mode 100644 index 000000000..39bc2aa3c --- /dev/null +++ b/market/include/alibabacloud/market/model/BindImagePackageResult.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_MARKET_MODEL_BINDIMAGEPACKAGERESULT_H_ +#define ALIBABACLOUD_MARKET_MODEL_BINDIMAGEPACKAGERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT BindImagePackageResult : public ServiceResult + { + public: + + + BindImagePackageResult(); + explicit BindImagePackageResult(const std::string &payload); + ~BindImagePackageResult(); + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_BINDIMAGEPACKAGERESULT_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/CreateCommodityRequest.h b/market/include/alibabacloud/market/model/CreateCommodityRequest.h new file mode 100644 index 000000000..f5fc21762 --- /dev/null +++ b/market/include/alibabacloud/market/model/CreateCommodityRequest.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_MARKET_MODEL_CREATECOMMODITYREQUEST_H_ +#define ALIBABACLOUD_MARKET_MODEL_CREATECOMMODITYREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT CreateCommodityRequest : public RpcServiceRequest + { + + public: + CreateCommodityRequest(); + ~CreateCommodityRequest(); + + std::string getApplicationId()const; + void setApplicationId(const std::string& applicationId); + std::string getContent()const; + void setContent(const std::string& content); + + private: + std::string applicationId_; + std::string content_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_CREATECOMMODITYREQUEST_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/CreateCommodityResult.h b/market/include/alibabacloud/market/model/CreateCommodityResult.h new file mode 100644 index 000000000..2939898b7 --- /dev/null +++ b/market/include/alibabacloud/market/model/CreateCommodityResult.h @@ -0,0 +1,57 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_MARKET_MODEL_CREATECOMMODITYRESULT_H_ +#define ALIBABACLOUD_MARKET_MODEL_CREATECOMMODITYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT CreateCommodityResult : public ServiceResult + { + public: + struct Commodity + { + std::string commodityId; + }; + + + CreateCommodityResult(); + explicit CreateCommodityResult(const std::string &payload); + ~CreateCommodityResult(); + Commodity getCommodity()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + Commodity commodity_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_CREATECOMMODITYRESULT_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/CreateOrderRequest.h b/market/include/alibabacloud/market/model/CreateOrderRequest.h new file mode 100644 index 000000000..705927049 --- /dev/null +++ b/market/include/alibabacloud/market/model/CreateOrderRequest.h @@ -0,0 +1,63 @@ +/* + * 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_MARKET_MODEL_CREATEORDERREQUEST_H_ +#define ALIBABACLOUD_MARKET_MODEL_CREATEORDERREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT CreateOrderRequest : public RpcServiceRequest + { + + public: + CreateOrderRequest(); + ~CreateOrderRequest(); + + std::string getOrderSouce()const; + void setOrderSouce(const std::string& orderSouce); + std::string getCommodity()const; + void setCommodity(const std::string& commodity); + std::string getClientToken()const; + void setClientToken(const std::string& clientToken); + std::string getOwnerId()const; + void setOwnerId(const std::string& ownerId); + std::string getPaymentType()const; + void setPaymentType(const std::string& paymentType); + std::string getOrderType()const; + void setOrderType(const std::string& orderType); + + private: + std::string orderSouce_; + std::string commodity_; + std::string clientToken_; + std::string ownerId_; + std::string paymentType_; + std::string orderType_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_CREATEORDERREQUEST_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/CreateOrderResult.h b/market/include/alibabacloud/market/model/CreateOrderResult.h new file mode 100644 index 000000000..b1a0e80a7 --- /dev/null +++ b/market/include/alibabacloud/market/model/CreateOrderResult.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_MARKET_MODEL_CREATEORDERRESULT_H_ +#define ALIBABACLOUD_MARKET_MODEL_CREATEORDERRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT CreateOrderResult : public ServiceResult + { + public: + + + CreateOrderResult(); + explicit CreateOrderResult(const std::string &payload); + ~CreateOrderResult(); + std::vector getInstanceIds()const; + std::string getOrderId()const; + + protected: + void parse(const std::string &payload); + private: + std::vector instanceIds_; + std::string orderId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_CREATEORDERRESULT_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/CreateRateRequest.h b/market/include/alibabacloud/market/model/CreateRateRequest.h new file mode 100644 index 000000000..2f8713763 --- /dev/null +++ b/market/include/alibabacloud/market/model/CreateRateRequest.h @@ -0,0 +1,57 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_MARKET_MODEL_CREATERATEREQUEST_H_ +#define ALIBABACLOUD_MARKET_MODEL_CREATERATEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT CreateRateRequest : public RpcServiceRequest + { + + public: + CreateRateRequest(); + ~CreateRateRequest(); + + std::string getScore()const; + void setScore(const std::string& score); + std::string getOrderId()const; + void setOrderId(const std::string& orderId); + std::string getRequestId()const; + void setRequestId(const std::string& requestId); + std::string getContent()const; + void setContent(const std::string& content); + + private: + std::string score_; + std::string orderId_; + std::string requestId_; + std::string content_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_CREATERATEREQUEST_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/CreateRateResult.h b/market/include/alibabacloud/market/model/CreateRateResult.h new file mode 100644 index 000000000..c5824dee0 --- /dev/null +++ b/market/include/alibabacloud/market/model/CreateRateResult.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_MARKET_MODEL_CREATERATERESULT_H_ +#define ALIBABACLOUD_MARKET_MODEL_CREATERATERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT CreateRateResult : public ServiceResult + { + public: + + + CreateRateResult(); + explicit CreateRateResult(const std::string &payload); + ~CreateRateResult(); + long getId()const; + + protected: + void parse(const std::string &payload); + private: + long id_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_CREATERATERESULT_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/DeleteCommodityRequest.h b/market/include/alibabacloud/market/model/DeleteCommodityRequest.h new file mode 100644 index 000000000..b162eb9e7 --- /dev/null +++ b/market/include/alibabacloud/market/model/DeleteCommodityRequest.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_MARKET_MODEL_DELETECOMMODITYREQUEST_H_ +#define ALIBABACLOUD_MARKET_MODEL_DELETECOMMODITYREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT DeleteCommodityRequest : public RpcServiceRequest + { + + public: + DeleteCommodityRequest(); + ~DeleteCommodityRequest(); + + std::string getCommodityId()const; + void setCommodityId(const std::string& commodityId); + + private: + std::string commodityId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_DELETECOMMODITYREQUEST_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/DeleteCommodityResult.h b/market/include/alibabacloud/market/model/DeleteCommodityResult.h new file mode 100644 index 000000000..0e22f92e2 --- /dev/null +++ b/market/include/alibabacloud/market/model/DeleteCommodityResult.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_MARKET_MODEL_DELETECOMMODITYRESULT_H_ +#define ALIBABACLOUD_MARKET_MODEL_DELETECOMMODITYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT DeleteCommodityResult : public ServiceResult + { + public: + + + DeleteCommodityResult(); + explicit DeleteCommodityResult(const std::string &payload); + ~DeleteCommodityResult(); + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_DELETECOMMODITYRESULT_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/DescribeCommoditiesRequest.h b/market/include/alibabacloud/market/model/DescribeCommoditiesRequest.h new file mode 100644 index 000000000..45729961b --- /dev/null +++ b/market/include/alibabacloud/market/model/DescribeCommoditiesRequest.h @@ -0,0 +1,87 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_MARKET_MODEL_DESCRIBECOMMODITIESREQUEST_H_ +#define ALIBABACLOUD_MARKET_MODEL_DESCRIBECOMMODITIESREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT DescribeCommoditiesRequest : public RpcServiceRequest + { + + public: + DescribeCommoditiesRequest(); + ~DescribeCommoditiesRequest(); + + std::string getCommodityGmtModifiedTo()const; + void setCommodityGmtModifiedTo(const std::string& commodityGmtModifiedTo); + std::string getCommodityGmtModifiedFrom()const; + void setCommodityGmtModifiedFrom(const std::string& commodityGmtModifiedFrom); + std::string getCommodityId()const; + void setCommodityId(const std::string& commodityId); + std::string getCommodityGmtPublishFrom()const; + void setCommodityGmtPublishFrom(const std::string& commodityGmtPublishFrom); + std::string getCommodityStatuses()const; + void setCommodityStatuses(const std::string& commodityStatuses); + int getPageNumber()const; + void setPageNumber(int pageNumber); + std::string getCommodityGmtCreatedFrom()const; + void setCommodityGmtCreatedFrom(const std::string& commodityGmtCreatedFrom); + std::string getCommodityIds()const; + void setCommodityIds(const std::string& commodityIds); + std::string getCommodityGmtCreatedTo()const; + void setCommodityGmtCreatedTo(const std::string& commodityGmtCreatedTo); + int getPageSize()const; + void setPageSize(int pageSize); + std::string getCommodityGmtPublishTo()const; + void setCommodityGmtPublishTo(const std::string& commodityGmtPublishTo); + std::string getCommodityAuditStatuses()const; + void setCommodityAuditStatuses(const std::string& commodityAuditStatuses); + std::string getProperties()const; + void setProperties(const std::string& properties); + std::string getCommodityCategoryIds()const; + void setCommodityCategoryIds(const std::string& commodityCategoryIds); + + private: + std::string commodityGmtModifiedTo_; + std::string commodityGmtModifiedFrom_; + std::string commodityId_; + std::string commodityGmtPublishFrom_; + std::string commodityStatuses_; + int pageNumber_; + std::string commodityGmtCreatedFrom_; + std::string commodityIds_; + std::string commodityGmtCreatedTo_; + int pageSize_; + std::string commodityGmtPublishTo_; + std::string commodityAuditStatuses_; + std::string properties_; + std::string commodityCategoryIds_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_DESCRIBECOMMODITIESREQUEST_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/DescribeCommoditiesResult.h b/market/include/alibabacloud/market/model/DescribeCommoditiesResult.h new file mode 100644 index 000000000..58a893975 --- /dev/null +++ b/market/include/alibabacloud/market/model/DescribeCommoditiesResult.h @@ -0,0 +1,70 @@ +/* + * 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_MARKET_MODEL_DESCRIBECOMMODITIESRESULT_H_ +#define ALIBABACLOUD_MARKET_MODEL_DESCRIBECOMMODITIESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT DescribeCommoditiesResult : public ServiceResult + { + public: + struct Data + { + struct Pageable + { + int pageSize; + int pageNumber; + }; + struct Commodity + { + std::string commodityId; + std::string properties; + std::string applicationId; + }; + long totalCount; + Pageable pageable; + std::vector commodities; + }; + + + DescribeCommoditiesResult(); + explicit DescribeCommoditiesResult(const std::string &payload); + ~DescribeCommoditiesResult(); + Data getData()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + Data data_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_DESCRIBECOMMODITIESRESULT_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/DescribeCommodityRequest.h b/market/include/alibabacloud/market/model/DescribeCommodityRequest.h new file mode 100644 index 000000000..3de0d860a --- /dev/null +++ b/market/include/alibabacloud/market/model/DescribeCommodityRequest.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_MARKET_MODEL_DESCRIBECOMMODITYREQUEST_H_ +#define ALIBABACLOUD_MARKET_MODEL_DESCRIBECOMMODITYREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT DescribeCommodityRequest : public RpcServiceRequest + { + + public: + DescribeCommodityRequest(); + ~DescribeCommodityRequest(); + + std::string getCommodityId()const; + void setCommodityId(const std::string& commodityId); + + private: + std::string commodityId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_DESCRIBECOMMODITYREQUEST_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/DescribeCommodityResult.h b/market/include/alibabacloud/market/model/DescribeCommodityResult.h new file mode 100644 index 000000000..a9af92068 --- /dev/null +++ b/market/include/alibabacloud/market/model/DescribeCommodityResult.h @@ -0,0 +1,60 @@ +/* + * 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_MARKET_MODEL_DESCRIBECOMMODITYRESULT_H_ +#define ALIBABACLOUD_MARKET_MODEL_DESCRIBECOMMODITYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT DescribeCommodityResult : public ServiceResult + { + public: + struct Commodity + { + std::string commodityId; + std::string commoditySpecs; + std::string properties; + std::string applicationId; + }; + + + DescribeCommodityResult(); + explicit DescribeCommodityResult(const std::string &payload); + ~DescribeCommodityResult(); + Commodity getCommodity()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + Commodity commodity_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_DESCRIBECOMMODITYRESULT_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/DescribeInstanceRequest.h b/market/include/alibabacloud/market/model/DescribeInstanceRequest.h new file mode 100644 index 000000000..e0d3b8569 --- /dev/null +++ b/market/include/alibabacloud/market/model/DescribeInstanceRequest.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_MARKET_MODEL_DESCRIBEINSTANCEREQUEST_H_ +#define ALIBABACLOUD_MARKET_MODEL_DESCRIBEINSTANCEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT DescribeInstanceRequest : public RpcServiceRequest + { + + public: + DescribeInstanceRequest(); + ~DescribeInstanceRequest(); + + long getOwnerId()const; + void setOwnerId(long ownerId); + std::string getInstanceId()const; + void setInstanceId(const std::string& instanceId); + std::string getOrderType()const; + void setOrderType(const std::string& orderType); + + private: + long ownerId_; + std::string instanceId_; + std::string orderType_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_DESCRIBEINSTANCEREQUEST_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/DescribeInstanceResult.h b/market/include/alibabacloud/market/model/DescribeInstanceResult.h new file mode 100644 index 000000000..eab47e5ca --- /dev/null +++ b/market/include/alibabacloud/market/model/DescribeInstanceResult.h @@ -0,0 +1,114 @@ +/* + * 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_MARKET_MODEL_DESCRIBEINSTANCERESULT_H_ +#define ALIBABACLOUD_MARKET_MODEL_DESCRIBEINSTANCERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT DescribeInstanceResult : public ServiceResult + { + public: + struct RelationalData + { + std::string serviceStatus; + }; + struct Module + { + struct Property + { + struct PropertyValue + { + std::string type; + std::string min; + std::string max; + std::string value; + std::string displayName; + std::string step; + std::string remark; + }; + std::vector propertyValues; + std::string key; + std::string displayUnit; + std::string name; + std::string showType; + }; + std::string id; + std::vector properties; + std::string code; + std::string name; + }; + + + DescribeInstanceResult(); + explicit DescribeInstanceResult(const std::string &payload); + ~DescribeInstanceResult(); + std::string getStatus()const; + std::string getProductName()const; + long getInstanceId()const; + std::string getProductCode()const; + long getEndOn()const; + std::vector getModules()const; + RelationalData getRelationalData()const; + std::string getProductType()const; + std::string getAppJson()const; + long getOrderId()const; + std::string getConstraints()const; + std::string getExtendJson()const; + std::string getSupplierName()const; + std::string getComponentJson()const; + std::string getProductSkuCode()const; + long getCreatedOn()const; + std::string getHostJson()const; + long getBeganOn()const; + + protected: + void parse(const std::string &payload); + private: + std::string status_; + std::string productName_; + long instanceId_; + std::string productCode_; + long endOn_; + std::vector modules_; + RelationalData relationalData_; + std::string productType_; + std::string appJson_; + long orderId_; + std::string constraints_; + std::string extendJson_; + std::string supplierName_; + std::string componentJson_; + std::string productSkuCode_; + long createdOn_; + std::string hostJson_; + long beganOn_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_DESCRIBEINSTANCERESULT_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/DescribeInstancesRequest.h b/market/include/alibabacloud/market/model/DescribeInstancesRequest.h new file mode 100644 index 000000000..05df779c1 --- /dev/null +++ b/market/include/alibabacloud/market/model/DescribeInstancesRequest.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_MARKET_MODEL_DESCRIBEINSTANCESREQUEST_H_ +#define ALIBABACLOUD_MARKET_MODEL_DESCRIBEINSTANCESREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT DescribeInstancesRequest : public RpcServiceRequest + { + + public: + DescribeInstancesRequest(); + ~DescribeInstancesRequest(); + + int getPageSize()const; + void setPageSize(int pageSize); + int getPageNumber()const; + void setPageNumber(int pageNumber); + std::string getProductType()const; + void setProductType(const std::string& productType); + + private: + int pageSize_; + int pageNumber_; + std::string productType_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_DESCRIBEINSTANCESREQUEST_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/DescribeInstancesResult.h b/market/include/alibabacloud/market/model/DescribeInstancesResult.h new file mode 100644 index 000000000..9ee8cb5ee --- /dev/null +++ b/market/include/alibabacloud/market/model/DescribeInstancesResult.h @@ -0,0 +1,77 @@ +/* + * 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_MARKET_MODEL_DESCRIBEINSTANCESRESULT_H_ +#define ALIBABACLOUD_MARKET_MODEL_DESCRIBEINSTANCESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT DescribeInstancesResult : public ServiceResult + { + public: + struct InstanceItem + { + std::string status; + std::string productName; + long instanceId; + std::string productCode; + long endOn; + std::string productType; + std::string appJson; + long orderId; + std::string idaasJson; + std::string extendJson; + std::string supplierName; + std::string imageJson; + std::string productSkuCode; + long createdOn; + std::string hostJson; + std::string apiJson; + long beganOn; + }; + + + DescribeInstancesResult(); + explicit DescribeInstancesResult(const std::string &payload); + ~DescribeInstancesResult(); + int getTotalCount()const; + int getPageSize()const; + int getPageNumber()const; + std::vector getInstanceItems()const; + + protected: + void parse(const std::string &payload); + private: + int totalCount_; + int pageSize_; + int pageNumber_; + std::vector instanceItems_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_DESCRIBEINSTANCESRESULT_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/DescribeLicenseRequest.h b/market/include/alibabacloud/market/model/DescribeLicenseRequest.h new file mode 100644 index 000000000..c1858ff37 --- /dev/null +++ b/market/include/alibabacloud/market/model/DescribeLicenseRequest.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_MARKET_MODEL_DESCRIBELICENSEREQUEST_H_ +#define ALIBABACLOUD_MARKET_MODEL_DESCRIBELICENSEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT DescribeLicenseRequest : public RpcServiceRequest + { + + public: + DescribeLicenseRequest(); + ~DescribeLicenseRequest(); + + std::string getLicenseCode()const; + void setLicenseCode(const std::string& licenseCode); + + private: + std::string licenseCode_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_DESCRIBELICENSEREQUEST_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/DescribeLicenseResult.h b/market/include/alibabacloud/market/model/DescribeLicenseResult.h new file mode 100644 index 000000000..5ad01a8b1 --- /dev/null +++ b/market/include/alibabacloud/market/model/DescribeLicenseResult.h @@ -0,0 +1,78 @@ +/* + * 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_MARKET_MODEL_DESCRIBELICENSERESULT_H_ +#define ALIBABACLOUD_MARKET_MODEL_DESCRIBELICENSERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT DescribeLicenseResult : public ServiceResult + { + public: + struct License + { + struct ExtendInfo + { + std::string email; + std::string mobile; + long accountQuantity; + long aliUid; + }; + struct LicenseAttribute + { + std::string value; + std::string code; + }; + std::string licenseCode; + std::string productName; + std::string instanceId; + std::string activateTime; + std::string productCode; + std::string supplierName; + std::string licenseStatus; + std::string createTime; + std::string expiredTime; + std::vector extendArray; + ExtendInfo extendInfo; + std::string productSkuId; + }; + + + DescribeLicenseResult(); + explicit DescribeLicenseResult(const std::string &payload); + ~DescribeLicenseResult(); + License getLicense()const; + + protected: + void parse(const std::string &payload); + private: + License license_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_DESCRIBELICENSERESULT_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/DescribeOrderRequest.h b/market/include/alibabacloud/market/model/DescribeOrderRequest.h new file mode 100644 index 000000000..d9a2f3164 --- /dev/null +++ b/market/include/alibabacloud/market/model/DescribeOrderRequest.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_MARKET_MODEL_DESCRIBEORDERREQUEST_H_ +#define ALIBABACLOUD_MARKET_MODEL_DESCRIBEORDERREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT DescribeOrderRequest : public RpcServiceRequest + { + + public: + DescribeOrderRequest(); + ~DescribeOrderRequest(); + + std::string getOrderId()const; + void setOrderId(const std::string& orderId); + + private: + std::string orderId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_DESCRIBEORDERREQUEST_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/DescribeOrderResult.h b/market/include/alibabacloud/market/model/DescribeOrderResult.h new file mode 100644 index 000000000..273a7aa69 --- /dev/null +++ b/market/include/alibabacloud/market/model/DescribeOrderResult.h @@ -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. + */ + +#ifndef ALIBABACLOUD_MARKET_MODEL_DESCRIBEORDERRESULT_H_ +#define ALIBABACLOUD_MARKET_MODEL_DESCRIBEORDERRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT DescribeOrderResult : public ServiceResult + { + public: + + + DescribeOrderResult(); + explicit DescribeOrderResult(const std::string &payload); + ~DescribeOrderResult(); + long getPaidOn()const; + std::string getPeriodType()const; + float getCouponPrice()const; + std::string getPayStatus()const; + float getOriginalPrice()const; + std::string getProductName()const; + std::string getProductCode()const; + std::string getSupplierCompanyName()const; + int getQuantity()const; + long getOrderId()const; + std::vector getSupplierTelephones()const; + std::string getOrderStatus()const; + std::string getOrderType()const; + float getTotalPrice()const; + std::string getProductSkuCode()const; + long getCreatedOn()const; + float getPaymentPrice()const; + std::vector getInstanceIds()const; + long getAccountQuantity()const; + long getAliUid()const; + + protected: + void parse(const std::string &payload); + private: + long paidOn_; + std::string periodType_; + float couponPrice_; + std::string payStatus_; + float originalPrice_; + std::string productName_; + std::string productCode_; + std::string supplierCompanyName_; + int quantity_; + long orderId_; + std::vector supplierTelephones_; + std::string orderStatus_; + std::string orderType_; + float totalPrice_; + std::string productSkuCode_; + long createdOn_; + float paymentPrice_; + std::vector instanceIds_; + long accountQuantity_; + long aliUid_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_DESCRIBEORDERRESULT_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/DescribePriceRequest.h b/market/include/alibabacloud/market/model/DescribePriceRequest.h new file mode 100644 index 000000000..209713a1c --- /dev/null +++ b/market/include/alibabacloud/market/model/DescribePriceRequest.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_MARKET_MODEL_DESCRIBEPRICEREQUEST_H_ +#define ALIBABACLOUD_MARKET_MODEL_DESCRIBEPRICEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT DescribePriceRequest : public RpcServiceRequest + { + + public: + DescribePriceRequest(); + ~DescribePriceRequest(); + + std::string getCommodity()const; + void setCommodity(const std::string& commodity); + std::string getOrderType()const; + void setOrderType(const std::string& orderType); + + private: + std::string commodity_; + std::string orderType_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_DESCRIBEPRICEREQUEST_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/DescribePriceResult.h b/market/include/alibabacloud/market/model/DescribePriceResult.h new file mode 100644 index 000000000..13c88e9c9 --- /dev/null +++ b/market/include/alibabacloud/market/model/DescribePriceResult.h @@ -0,0 +1,65 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_MARKET_MODEL_DESCRIBEPRICERESULT_H_ +#define ALIBABACLOUD_MARKET_MODEL_DESCRIBEPRICERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT DescribePriceResult : public ServiceResult + { + public: + struct PromotionRule + { + std::string ruleId; + std::string title; + std::string name; + }; + + + DescribePriceResult(); + explicit DescribePriceResult(const std::string &payload); + ~DescribePriceResult(); + std::vector getPromotionRules()const; + float getOriginalPrice()const; + std::string getProductCode()const; + float getDiscountPrice()const; + float getTradePrice()const; + + protected: + void parse(const std::string &payload); + private: + std::vector promotionRules_; + float originalPrice_; + std::string productCode_; + float discountPrice_; + float tradePrice_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_DESCRIBEPRICERESULT_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/DescribeProductRequest.h b/market/include/alibabacloud/market/model/DescribeProductRequest.h new file mode 100644 index 000000000..5f8a0c869 --- /dev/null +++ b/market/include/alibabacloud/market/model/DescribeProductRequest.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_MARKET_MODEL_DESCRIBEPRODUCTREQUEST_H_ +#define ALIBABACLOUD_MARKET_MODEL_DESCRIBEPRODUCTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT DescribeProductRequest : public RpcServiceRequest + { + + public: + DescribeProductRequest(); + ~DescribeProductRequest(); + + std::string getCode()const; + void setCode(const std::string& code); + bool getQueryDraft()const; + void setQueryDraft(bool queryDraft); + std::string getAliUid()const; + void setAliUid(const std::string& aliUid); + + private: + std::string code_; + bool queryDraft_; + std::string aliUid_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_DESCRIBEPRODUCTREQUEST_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/DescribeProductResult.h b/market/include/alibabacloud/market/model/DescribeProductResult.h new file mode 100644 index 000000000..f25b0219c --- /dev/null +++ b/market/include/alibabacloud/market/model/DescribeProductResult.h @@ -0,0 +1,144 @@ +/* + * 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_MARKET_MODEL_DESCRIBEPRODUCTRESULT_H_ +#define ALIBABACLOUD_MARKET_MODEL_DESCRIBEPRODUCTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT DescribeProductResult : public ServiceResult + { + public: + struct ShopInfo + { + struct WangWang + { + std::string userName; + std::string remark; + }; + std::vector wangWangs; + std::vector telephones; + long id; + std::string emails; + std::string name; + }; + struct ProductSku + { + struct OrderPeriod + { + std::string periodType; + std::string name; + }; + struct Module + { + struct Property + { + struct PropertyValue + { + std::string type; + std::string min; + std::string max; + std::string value; + std::string displayName; + std::string step; + std::string remark; + }; + std::vector propertyValues; + std::string key; + std::string displayUnit; + std::string name; + std::string showType; + }; + std::string id; + std::vector properties; + std::string code; + std::string name; + }; + std::string constraints; + std::vector modules; + std::string chargeType; + std::vector orderPeriods; + bool hidden; + std::string code; + std::string name; + }; + struct ProductExtra + { + int order; + std::string type; + std::string values; + std::string label; + std::string key; + }; + + + DescribeProductResult(); + explicit DescribeProductResult(const std::string &payload); + ~DescribeProductResult(); + std::string getStatus()const; + std::string getDescription()const; + ShopInfo getShopInfo()const; + std::vector getProductSkus()const; + long getUseCount()const; + long getGmtModified()const; + long getGmtCreated()const; + std::string getCode()const; + std::string getName()const; + std::string getShortDescription()const; + std::string getType()const; + float getScore()const; + std::string getAuditStatus()const; + std::string getAuditFailMsg()const; + std::vector getProductExtras()const; + long getAuditTime()const; + std::string getPicUrl()const; + + protected: + void parse(const std::string &payload); + private: + std::string status_; + std::string description_; + ShopInfo shopInfo_; + std::vector productSkus_; + long useCount_; + long gmtModified_; + long gmtCreated_; + std::string code_; + std::string name_; + std::string shortDescription_; + std::string type_; + float score_; + std::string auditStatus_; + std::string auditFailMsg_; + std::vector productExtras_; + long auditTime_; + std::string picUrl_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_DESCRIBEPRODUCTRESULT_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/DescribeProductsRequest.h b/market/include/alibabacloud/market/model/DescribeProductsRequest.h new file mode 100644 index 000000000..30b21407b --- /dev/null +++ b/market/include/alibabacloud/market/model/DescribeProductsRequest.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_MARKET_MODEL_DESCRIBEPRODUCTSREQUEST_H_ +#define ALIBABACLOUD_MARKET_MODEL_DESCRIBEPRODUCTSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT DescribeProductsRequest : public RpcServiceRequest + { + struct Filter + { + std::string value; + std::string key; + }; + + public: + DescribeProductsRequest(); + ~DescribeProductsRequest(); + + std::vector getFilter()const; + void setFilter(const std::vector& filter); + std::string getSearchTerm()const; + void setSearchTerm(const std::string& searchTerm); + int getPageSize()const; + void setPageSize(int pageSize); + int getPageNumber()const; + void setPageNumber(int pageNumber); + + private: + std::vector filter_; + std::string searchTerm_; + int pageSize_; + int pageNumber_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_DESCRIBEPRODUCTSREQUEST_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/DescribeProductsResult.h b/market/include/alibabacloud/market/model/DescribeProductsResult.h new file mode 100644 index 000000000..78e1a503a --- /dev/null +++ b/market/include/alibabacloud/market/model/DescribeProductsResult.h @@ -0,0 +1,75 @@ +/* + * 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_MARKET_MODEL_DESCRIBEPRODUCTSRESULT_H_ +#define ALIBABACLOUD_MARKET_MODEL_DESCRIBEPRODUCTSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT DescribeProductsResult : public ServiceResult + { + public: + struct ProductItem + { + long categoryId; + std::string warrantyDate; + std::string imageUrl; + std::string targetUrl; + std::string operationSystem; + std::string deliveryDate; + std::string code; + std::string name; + std::string shortDescription; + long supplierId; + std::string deliveryWay; + std::string score; + std::string supplierName; + std::string suggestedPrice; + std::string tags; + }; + + + DescribeProductsResult(); + explicit DescribeProductsResult(const std::string &payload); + ~DescribeProductsResult(); + int getTotalCount()const; + int getPageSize()const; + int getPageNumber()const; + std::vector getProductItems()const; + + protected: + void parse(const std::string &payload); + private: + int totalCount_; + int pageSize_; + int pageNumber_; + std::vector productItems_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_DESCRIBEPRODUCTSRESULT_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/DescribeRateRequest.h b/market/include/alibabacloud/market/model/DescribeRateRequest.h new file mode 100644 index 000000000..18df8b3f7 --- /dev/null +++ b/market/include/alibabacloud/market/model/DescribeRateRequest.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_MARKET_MODEL_DESCRIBERATEREQUEST_H_ +#define ALIBABACLOUD_MARKET_MODEL_DESCRIBERATEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT DescribeRateRequest : public RpcServiceRequest + { + + public: + DescribeRateRequest(); + ~DescribeRateRequest(); + + std::string getOrderId()const; + void setOrderId(const std::string& orderId); + + private: + std::string orderId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_DESCRIBERATEREQUEST_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/DescribeRateResult.h b/market/include/alibabacloud/market/model/DescribeRateResult.h new file mode 100644 index 000000000..d561e39bc --- /dev/null +++ b/market/include/alibabacloud/market/model/DescribeRateResult.h @@ -0,0 +1,79 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_MARKET_MODEL_DESCRIBERATERESULT_H_ +#define ALIBABACLOUD_MARKET_MODEL_DESCRIBERATERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT DescribeRateResult : public ServiceResult + { + public: + + + DescribeRateResult(); + explicit DescribeRateResult(const std::string &payload); + ~DescribeRateResult(); + std::string getInstanceId()const; + std::string getExplaintion()const; + long getGmtExplaintion()const; + std::string getProductId()const; + long getGmtCreated()const; + std::string getAdditionalContent()const; + std::string getOrderId()const; + long getGmtAdditionalExplaintion()const; + std::string getScore()const; + std::string getType()const; + std::string getContent()const; + std::string getAdditionalExplaintion()const; + long getId()const; + long getGmtAdditional()const; + long getAliUid()const; + + protected: + void parse(const std::string &payload); + private: + std::string instanceId_; + std::string explaintion_; + long gmtExplaintion_; + std::string productId_; + long gmtCreated_; + std::string additionalContent_; + std::string orderId_; + long gmtAdditionalExplaintion_; + std::string score_; + std::string type_; + std::string content_; + std::string additionalExplaintion_; + long id_; + long gmtAdditional_; + long aliUid_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_DESCRIBERATERESULT_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/NotifyContractEventRequest.h b/market/include/alibabacloud/market/model/NotifyContractEventRequest.h new file mode 100644 index 000000000..4fb5b8c47 --- /dev/null +++ b/market/include/alibabacloud/market/model/NotifyContractEventRequest.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_MARKET_MODEL_NOTIFYCONTRACTEVENTREQUEST_H_ +#define ALIBABACLOUD_MARKET_MODEL_NOTIFYCONTRACTEVENTREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT NotifyContractEventRequest : public RpcServiceRequest + { + + public: + NotifyContractEventRequest(); + ~NotifyContractEventRequest(); + + std::string getEventMessage()const; + void setEventMessage(const std::string& eventMessage); + std::string getEventType()const; + void setEventType(const std::string& eventType); + + private: + std::string eventMessage_; + std::string eventType_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_NOTIFYCONTRACTEVENTREQUEST_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/NotifyContractEventResult.h b/market/include/alibabacloud/market/model/NotifyContractEventResult.h new file mode 100644 index 000000000..55be5692c --- /dev/null +++ b/market/include/alibabacloud/market/model/NotifyContractEventResult.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_MARKET_MODEL_NOTIFYCONTRACTEVENTRESULT_H_ +#define ALIBABACLOUD_MARKET_MODEL_NOTIFYCONTRACTEVENTRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT NotifyContractEventResult : public ServiceResult + { + public: + + + NotifyContractEventResult(); + explicit NotifyContractEventResult(const std::string &payload); + ~NotifyContractEventResult(); + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_NOTIFYCONTRACTEVENTRESULT_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/PushMeteringDataRequest.h b/market/include/alibabacloud/market/model/PushMeteringDataRequest.h new file mode 100644 index 000000000..af678f560 --- /dev/null +++ b/market/include/alibabacloud/market/model/PushMeteringDataRequest.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_MARKET_MODEL_PUSHMETERINGDATAREQUEST_H_ +#define ALIBABACLOUD_MARKET_MODEL_PUSHMETERINGDATAREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT PushMeteringDataRequest : public RpcServiceRequest + { + + public: + PushMeteringDataRequest(); + ~PushMeteringDataRequest(); + + std::string getMetering()const; + void setMetering(const std::string& metering); + + private: + std::string metering_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_PUSHMETERINGDATAREQUEST_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/PushMeteringDataResult.h b/market/include/alibabacloud/market/model/PushMeteringDataResult.h new file mode 100644 index 000000000..73064aa3e --- /dev/null +++ b/market/include/alibabacloud/market/model/PushMeteringDataResult.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_MARKET_MODEL_PUSHMETERINGDATARESULT_H_ +#define ALIBABACLOUD_MARKET_MODEL_PUSHMETERINGDATARESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT PushMeteringDataResult : public ServiceResult + { + public: + + + PushMeteringDataResult(); + explicit PushMeteringDataResult(const std::string &payload); + ~PushMeteringDataResult(); + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_PUSHMETERINGDATARESULT_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/QueryMarketCategoriesRequest.h b/market/include/alibabacloud/market/model/QueryMarketCategoriesRequest.h new file mode 100644 index 000000000..723147078 --- /dev/null +++ b/market/include/alibabacloud/market/model/QueryMarketCategoriesRequest.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_MARKET_MODEL_QUERYMARKETCATEGORIESREQUEST_H_ +#define ALIBABACLOUD_MARKET_MODEL_QUERYMARKETCATEGORIESREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT QueryMarketCategoriesRequest : public RpcServiceRequest + { + + public: + QueryMarketCategoriesRequest(); + ~QueryMarketCategoriesRequest(); + + std::string getAccessKeyId()const; + void setAccessKeyId(const std::string& accessKeyId); + + private: + std::string accessKeyId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_QUERYMARKETCATEGORIESREQUEST_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/QueryMarketCategoriesResult.h b/market/include/alibabacloud/market/model/QueryMarketCategoriesResult.h new file mode 100644 index 000000000..432dcaf35 --- /dev/null +++ b/market/include/alibabacloud/market/model/QueryMarketCategoriesResult.h @@ -0,0 +1,70 @@ +/* + * 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_MARKET_MODEL_QUERYMARKETCATEGORIESRESULT_H_ +#define ALIBABACLOUD_MARKET_MODEL_QUERYMARKETCATEGORIESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT QueryMarketCategoriesResult : public ServiceResult + { + public: + struct Category + { + struct ChildCategory + { + std::string categoryCode; + std::string categoryName; + long id; + }; + std::string categoryCode; + std::string categoryName; + long id; + std::vector childCategories; + }; + + + QueryMarketCategoriesResult(); + explicit QueryMarketCategoriesResult(const std::string &payload); + ~QueryMarketCategoriesResult(); + int getTotalCount()const; + int getPageSize()const; + std::vector getCategories()const; + int getPageNumber()const; + + protected: + void parse(const std::string &payload); + private: + int totalCount_; + int pageSize_; + std::vector categories_; + int pageNumber_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_QUERYMARKETCATEGORIESRESULT_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/QueryMarketImagesRequest.h b/market/include/alibabacloud/market/model/QueryMarketImagesRequest.h new file mode 100644 index 000000000..9f496fa33 --- /dev/null +++ b/market/include/alibabacloud/market/model/QueryMarketImagesRequest.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_MARKET_MODEL_QUERYMARKETIMAGESREQUEST_H_ +#define ALIBABACLOUD_MARKET_MODEL_QUERYMARKETIMAGESREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT QueryMarketImagesRequest : public RpcServiceRequest + { + + public: + QueryMarketImagesRequest(); + ~QueryMarketImagesRequest(); + + std::string getParam()const; + void setParam(const std::string& param); + std::string getAccessKeyId()const; + void setAccessKeyId(const std::string& accessKeyId); + + private: + std::string param_; + std::string accessKeyId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_QUERYMARKETIMAGESREQUEST_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/QueryMarketImagesResult.h b/market/include/alibabacloud/market/model/QueryMarketImagesResult.h new file mode 100644 index 000000000..3636decf1 --- /dev/null +++ b/market/include/alibabacloud/market/model/QueryMarketImagesResult.h @@ -0,0 +1,130 @@ +/* + * 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_MARKET_MODEL_QUERYMARKETIMAGESRESULT_H_ +#define ALIBABACLOUD_MARKET_MODEL_QUERYMARKETIMAGESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT QueryMarketImagesResult : public ServiceResult + { + public: + struct ImageProduct + { + struct Quota + { + long unusedQuota; + long totalQuota; + long usingQuota; + }; + struct PriceInfo + { + struct Order + { + float originalPrice; + std::string priceUnit; + float discountPrice; + std::string currency; + int period; + std::vector ruleIdSet; + float tradePrice; + }; + struct Rule + { + long ruleId; + std::string title; + std::string name; + }; + Order order; + std::vector rules; + }; + struct Image + { + struct DiskDeviceMapping + { + std::string diskType; + std::string snapshotId; + std::string format; + int size; + std::string device; + std::string importOSSBucket; + std::string importOSSObject; + }; + bool isDefault; + std::vector diskDeviceMappings; + std::string versionDescription; + std::string version; + int imageSize; + bool supportIO; + std::string imageId; + std::string region; + }; + std::string buyUrl; + std::string productName; + long userCount; + std::vector images; + int osBit; + std::string detailUrl; + std::string agreementUrl; + std::vector skuCodes; + PriceInfo priceInfo; + std::string shortDescription; + float score; + Quota quota; + std::string imageProductCode; + std::string supplierName; + bool supportIO; + std::string categoryName; + std::string pictureUrl; + std::string storeUrl; + std::string baseSystem; + long createdOn; + std::string smallPicUrl; + std::string osKind; + }; + + + QueryMarketImagesResult(); + explicit QueryMarketImagesResult(const std::string &payload); + ~QueryMarketImagesResult(); + int getTotalCount()const; + int getPageSize()const; + int getPageNumber()const; + std::vector getResult()const; + + protected: + void parse(const std::string &payload); + private: + int totalCount_; + int pageSize_; + int pageNumber_; + std::vector result_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_QUERYMARKETIMAGESRESULT_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/UpdateCommodityRequest.h b/market/include/alibabacloud/market/model/UpdateCommodityRequest.h new file mode 100644 index 000000000..027d1c5c1 --- /dev/null +++ b/market/include/alibabacloud/market/model/UpdateCommodityRequest.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_MARKET_MODEL_UPDATECOMMODITYREQUEST_H_ +#define ALIBABACLOUD_MARKET_MODEL_UPDATECOMMODITYREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT UpdateCommodityRequest : public RpcServiceRequest + { + + public: + UpdateCommodityRequest(); + ~UpdateCommodityRequest(); + + std::string getCommodityId()const; + void setCommodityId(const std::string& commodityId); + std::string getContent()const; + void setContent(const std::string& content); + + private: + std::string commodityId_; + std::string content_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_UPDATECOMMODITYREQUEST_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/UpdateCommodityResult.h b/market/include/alibabacloud/market/model/UpdateCommodityResult.h new file mode 100644 index 000000000..e413edc59 --- /dev/null +++ b/market/include/alibabacloud/market/model/UpdateCommodityResult.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_MARKET_MODEL_UPDATECOMMODITYRESULT_H_ +#define ALIBABACLOUD_MARKET_MODEL_UPDATECOMMODITYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT UpdateCommodityResult : public ServiceResult + { + public: + + + UpdateCommodityResult(); + explicit UpdateCommodityResult(const std::string &payload); + ~UpdateCommodityResult(); + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_UPDATECOMMODITYRESULT_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/UploadCommodityFileRequest.h b/market/include/alibabacloud/market/model/UploadCommodityFileRequest.h new file mode 100644 index 000000000..c373065eb --- /dev/null +++ b/market/include/alibabacloud/market/model/UploadCommodityFileRequest.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_MARKET_MODEL_UPLOADCOMMODITYFILEREQUEST_H_ +#define ALIBABACLOUD_MARKET_MODEL_UPLOADCOMMODITYFILEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT UploadCommodityFileRequest : public RpcServiceRequest + { + + public: + UploadCommodityFileRequest(); + ~UploadCommodityFileRequest(); + + std::string getFileResourceType()const; + void setFileResourceType(const std::string& fileResourceType); + std::string getFileResource()const; + void setFileResource(const std::string& fileResource); + std::string getFileContentType()const; + void setFileContentType(const std::string& fileContentType); + + private: + std::string fileResourceType_; + std::string fileResource_; + std::string fileContentType_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_UPLOADCOMMODITYFILEREQUEST_H_ \ No newline at end of file diff --git a/market/include/alibabacloud/market/model/UploadCommodityFileResult.h b/market/include/alibabacloud/market/model/UploadCommodityFileResult.h new file mode 100644 index 000000000..4a8d651cd --- /dev/null +++ b/market/include/alibabacloud/market/model/UploadCommodityFileResult.h @@ -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. + */ + +#ifndef ALIBABACLOUD_MARKET_MODEL_UPLOADCOMMODITYFILERESULT_H_ +#define ALIBABACLOUD_MARKET_MODEL_UPLOADCOMMODITYFILERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Market + { + namespace Model + { + class ALIBABACLOUD_MARKET_EXPORT UploadCommodityFileResult : public ServiceResult + { + public: + struct Data + { + std::string resource; + std::string resourceType; + }; + + + UploadCommodityFileResult(); + explicit UploadCommodityFileResult(const std::string &payload); + ~UploadCommodityFileResult(); + Data getData()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + Data data_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKET_MODEL_UPLOADCOMMODITYFILERESULT_H_ \ No newline at end of file diff --git a/market/src/MarketClient.cc b/market/src/MarketClient.cc new file mode 100644 index 000000000..3b93109b2 --- /dev/null +++ b/market/src/MarketClient.cc @@ -0,0 +1,845 @@ +/* + * 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::Market; +using namespace AlibabaCloud::Market::Model; + +namespace +{ + const std::string SERVICE_NAME = "Market"; +} + +MarketClient::MarketClient(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, "yunmarket"); +} + +MarketClient::MarketClient(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, "yunmarket"); +} + +MarketClient::MarketClient(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, "yunmarket"); +} + +MarketClient::~MarketClient() +{} + +MarketClient::NotifyContractEventOutcome MarketClient::notifyContractEvent(const NotifyContractEventRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return NotifyContractEventOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return NotifyContractEventOutcome(NotifyContractEventResult(outcome.result())); + else + return NotifyContractEventOutcome(outcome.error()); +} + +void MarketClient::notifyContractEventAsync(const NotifyContractEventRequest& request, const NotifyContractEventAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, notifyContractEvent(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketClient::NotifyContractEventOutcomeCallable MarketClient::notifyContractEventCallable(const NotifyContractEventRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->notifyContractEvent(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketClient::PushMeteringDataOutcome MarketClient::pushMeteringData(const PushMeteringDataRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return PushMeteringDataOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return PushMeteringDataOutcome(PushMeteringDataResult(outcome.result())); + else + return PushMeteringDataOutcome(outcome.error()); +} + +void MarketClient::pushMeteringDataAsync(const PushMeteringDataRequest& request, const PushMeteringDataAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, pushMeteringData(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketClient::PushMeteringDataOutcomeCallable MarketClient::pushMeteringDataCallable(const PushMeteringDataRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->pushMeteringData(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketClient::DescribeOrderOutcome MarketClient::describeOrder(const DescribeOrderRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeOrderOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeOrderOutcome(DescribeOrderResult(outcome.result())); + else + return DescribeOrderOutcome(outcome.error()); +} + +void MarketClient::describeOrderAsync(const DescribeOrderRequest& request, const DescribeOrderAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeOrder(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketClient::DescribeOrderOutcomeCallable MarketClient::describeOrderCallable(const DescribeOrderRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeOrder(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketClient::BindImagePackageOutcome MarketClient::bindImagePackage(const BindImagePackageRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return BindImagePackageOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return BindImagePackageOutcome(BindImagePackageResult(outcome.result())); + else + return BindImagePackageOutcome(outcome.error()); +} + +void MarketClient::bindImagePackageAsync(const BindImagePackageRequest& request, const BindImagePackageAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, bindImagePackage(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketClient::BindImagePackageOutcomeCallable MarketClient::bindImagePackageCallable(const BindImagePackageRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->bindImagePackage(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketClient::QueryMarketImagesOutcome MarketClient::queryMarketImages(const QueryMarketImagesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return QueryMarketImagesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return QueryMarketImagesOutcome(QueryMarketImagesResult(outcome.result())); + else + return QueryMarketImagesOutcome(outcome.error()); +} + +void MarketClient::queryMarketImagesAsync(const QueryMarketImagesRequest& request, const QueryMarketImagesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, queryMarketImages(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketClient::QueryMarketImagesOutcomeCallable MarketClient::queryMarketImagesCallable(const QueryMarketImagesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->queryMarketImages(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketClient::DescribeProductsOutcome MarketClient::describeProducts(const DescribeProductsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeProductsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeProductsOutcome(DescribeProductsResult(outcome.result())); + else + return DescribeProductsOutcome(outcome.error()); +} + +void MarketClient::describeProductsAsync(const DescribeProductsRequest& request, const DescribeProductsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeProducts(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketClient::DescribeProductsOutcomeCallable MarketClient::describeProductsCallable(const DescribeProductsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeProducts(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketClient::CreateOrderOutcome MarketClient::createOrder(const CreateOrderRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateOrderOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateOrderOutcome(CreateOrderResult(outcome.result())); + else + return CreateOrderOutcome(outcome.error()); +} + +void MarketClient::createOrderAsync(const CreateOrderRequest& request, const CreateOrderAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createOrder(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketClient::CreateOrderOutcomeCallable MarketClient::createOrderCallable(const CreateOrderRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createOrder(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketClient::DescribePriceOutcome MarketClient::describePrice(const DescribePriceRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribePriceOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribePriceOutcome(DescribePriceResult(outcome.result())); + else + return DescribePriceOutcome(outcome.error()); +} + +void MarketClient::describePriceAsync(const DescribePriceRequest& request, const DescribePriceAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describePrice(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketClient::DescribePriceOutcomeCallable MarketClient::describePriceCallable(const DescribePriceRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describePrice(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketClient::DescribeRateOutcome MarketClient::describeRate(const DescribeRateRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeRateOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeRateOutcome(DescribeRateResult(outcome.result())); + else + return DescribeRateOutcome(outcome.error()); +} + +void MarketClient::describeRateAsync(const DescribeRateRequest& request, const DescribeRateAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeRate(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketClient::DescribeRateOutcomeCallable MarketClient::describeRateCallable(const DescribeRateRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeRate(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketClient::QueryMarketCategoriesOutcome MarketClient::queryMarketCategories(const QueryMarketCategoriesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return QueryMarketCategoriesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return QueryMarketCategoriesOutcome(QueryMarketCategoriesResult(outcome.result())); + else + return QueryMarketCategoriesOutcome(outcome.error()); +} + +void MarketClient::queryMarketCategoriesAsync(const QueryMarketCategoriesRequest& request, const QueryMarketCategoriesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, queryMarketCategories(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketClient::QueryMarketCategoriesOutcomeCallable MarketClient::queryMarketCategoriesCallable(const QueryMarketCategoriesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->queryMarketCategories(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketClient::CreateRateOutcome MarketClient::createRate(const CreateRateRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateRateOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateRateOutcome(CreateRateResult(outcome.result())); + else + return CreateRateOutcome(outcome.error()); +} + +void MarketClient::createRateAsync(const CreateRateRequest& request, const CreateRateAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createRate(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketClient::CreateRateOutcomeCallable MarketClient::createRateCallable(const CreateRateRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createRate(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketClient::DescribeInstanceOutcome MarketClient::describeInstance(const DescribeInstanceRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeInstanceOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeInstanceOutcome(DescribeInstanceResult(outcome.result())); + else + return DescribeInstanceOutcome(outcome.error()); +} + +void MarketClient::describeInstanceAsync(const DescribeInstanceRequest& request, const DescribeInstanceAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeInstance(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketClient::DescribeInstanceOutcomeCallable MarketClient::describeInstanceCallable(const DescribeInstanceRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeInstance(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketClient::DescribeLicenseOutcome MarketClient::describeLicense(const DescribeLicenseRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeLicenseOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeLicenseOutcome(DescribeLicenseResult(outcome.result())); + else + return DescribeLicenseOutcome(outcome.error()); +} + +void MarketClient::describeLicenseAsync(const DescribeLicenseRequest& request, const DescribeLicenseAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeLicense(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketClient::DescribeLicenseOutcomeCallable MarketClient::describeLicenseCallable(const DescribeLicenseRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeLicense(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketClient::DescribeInstancesOutcome MarketClient::describeInstances(const DescribeInstancesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeInstancesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeInstancesOutcome(DescribeInstancesResult(outcome.result())); + else + return DescribeInstancesOutcome(outcome.error()); +} + +void MarketClient::describeInstancesAsync(const DescribeInstancesRequest& request, const DescribeInstancesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeInstances(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketClient::DescribeInstancesOutcomeCallable MarketClient::describeInstancesCallable(const DescribeInstancesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeInstances(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketClient::ActivateLicenseOutcome MarketClient::activateLicense(const ActivateLicenseRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ActivateLicenseOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ActivateLicenseOutcome(ActivateLicenseResult(outcome.result())); + else + return ActivateLicenseOutcome(outcome.error()); +} + +void MarketClient::activateLicenseAsync(const ActivateLicenseRequest& request, const ActivateLicenseAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, activateLicense(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketClient::ActivateLicenseOutcomeCallable MarketClient::activateLicenseCallable(const ActivateLicenseRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->activateLicense(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketClient::DescribeCommodityOutcome MarketClient::describeCommodity(const DescribeCommodityRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeCommodityOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeCommodityOutcome(DescribeCommodityResult(outcome.result())); + else + return DescribeCommodityOutcome(outcome.error()); +} + +void MarketClient::describeCommodityAsync(const DescribeCommodityRequest& request, const DescribeCommodityAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeCommodity(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketClient::DescribeCommodityOutcomeCallable MarketClient::describeCommodityCallable(const DescribeCommodityRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeCommodity(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketClient::DescribeProductOutcome MarketClient::describeProduct(const DescribeProductRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeProductOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeProductOutcome(DescribeProductResult(outcome.result())); + else + return DescribeProductOutcome(outcome.error()); +} + +void MarketClient::describeProductAsync(const DescribeProductRequest& request, const DescribeProductAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeProduct(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketClient::DescribeProductOutcomeCallable MarketClient::describeProductCallable(const DescribeProductRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeProduct(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketClient::CreateCommodityOutcome MarketClient::createCommodity(const CreateCommodityRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateCommodityOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateCommodityOutcome(CreateCommodityResult(outcome.result())); + else + return CreateCommodityOutcome(outcome.error()); +} + +void MarketClient::createCommodityAsync(const CreateCommodityRequest& request, const CreateCommodityAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createCommodity(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketClient::CreateCommodityOutcomeCallable MarketClient::createCommodityCallable(const CreateCommodityRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createCommodity(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketClient::DeleteCommodityOutcome MarketClient::deleteCommodity(const DeleteCommodityRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DeleteCommodityOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DeleteCommodityOutcome(DeleteCommodityResult(outcome.result())); + else + return DeleteCommodityOutcome(outcome.error()); +} + +void MarketClient::deleteCommodityAsync(const DeleteCommodityRequest& request, const DeleteCommodityAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, deleteCommodity(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketClient::DeleteCommodityOutcomeCallable MarketClient::deleteCommodityCallable(const DeleteCommodityRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->deleteCommodity(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketClient::UpdateCommodityOutcome MarketClient::updateCommodity(const UpdateCommodityRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UpdateCommodityOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UpdateCommodityOutcome(UpdateCommodityResult(outcome.result())); + else + return UpdateCommodityOutcome(outcome.error()); +} + +void MarketClient::updateCommodityAsync(const UpdateCommodityRequest& request, const UpdateCommodityAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, updateCommodity(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketClient::UpdateCommodityOutcomeCallable MarketClient::updateCommodityCallable(const UpdateCommodityRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->updateCommodity(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketClient::DescribeCommoditiesOutcome MarketClient::describeCommodities(const DescribeCommoditiesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeCommoditiesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeCommoditiesOutcome(DescribeCommoditiesResult(outcome.result())); + else + return DescribeCommoditiesOutcome(outcome.error()); +} + +void MarketClient::describeCommoditiesAsync(const DescribeCommoditiesRequest& request, const DescribeCommoditiesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeCommodities(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketClient::DescribeCommoditiesOutcomeCallable MarketClient::describeCommoditiesCallable(const DescribeCommoditiesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeCommodities(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketClient::UploadCommodityFileOutcome MarketClient::uploadCommodityFile(const UploadCommodityFileRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return UploadCommodityFileOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return UploadCommodityFileOutcome(UploadCommodityFileResult(outcome.result())); + else + return UploadCommodityFileOutcome(outcome.error()); +} + +void MarketClient::uploadCommodityFileAsync(const UploadCommodityFileRequest& request, const UploadCommodityFileAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, uploadCommodityFile(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketClient::UploadCommodityFileOutcomeCallable MarketClient::uploadCommodityFileCallable(const UploadCommodityFileRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->uploadCommodityFile(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + diff --git a/market/src/model/ActivateLicenseRequest.cc b/market/src/model/ActivateLicenseRequest.cc new file mode 100644 index 000000000..51b836338 --- /dev/null +++ b/market/src/model/ActivateLicenseRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Market::Model::ActivateLicenseRequest; + +ActivateLicenseRequest::ActivateLicenseRequest() : + RpcServiceRequest("market", "2015-11-01", "ActivateLicense") +{} + +ActivateLicenseRequest::~ActivateLicenseRequest() +{} + +std::string ActivateLicenseRequest::getIdentification()const +{ + return identification_; +} + +void ActivateLicenseRequest::setIdentification(const std::string& identification) +{ + identification_ = identification; + setCoreParameter("Identification", identification); +} + +std::string ActivateLicenseRequest::getLicenseCode()const +{ + return licenseCode_; +} + +void ActivateLicenseRequest::setLicenseCode(const std::string& licenseCode) +{ + licenseCode_ = licenseCode; + setCoreParameter("LicenseCode", licenseCode); +} + diff --git a/market/src/model/ActivateLicenseResult.cc b/market/src/model/ActivateLicenseResult.cc new file mode 100644 index 000000000..bb9d4fc13 --- /dev/null +++ b/market/src/model/ActivateLicenseResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Market; +using namespace AlibabaCloud::Market::Model; + +ActivateLicenseResult::ActivateLicenseResult() : + ServiceResult() +{} + +ActivateLicenseResult::ActivateLicenseResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ActivateLicenseResult::~ActivateLicenseResult() +{} + +void ActivateLicenseResult::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"; + +} + +bool ActivateLicenseResult::getSuccess()const +{ + return success_; +} + diff --git a/market/src/model/BindImagePackageRequest.cc b/market/src/model/BindImagePackageRequest.cc new file mode 100644 index 000000000..77806eba1 --- /dev/null +++ b/market/src/model/BindImagePackageRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Market::Model::BindImagePackageRequest; + +BindImagePackageRequest::BindImagePackageRequest() : + RpcServiceRequest("market", "2015-11-01", "BindImagePackage") +{} + +BindImagePackageRequest::~BindImagePackageRequest() +{} + +std::string BindImagePackageRequest::getEcsInstanceId()const +{ + return ecsInstanceId_; +} + +void BindImagePackageRequest::setEcsInstanceId(const std::string& ecsInstanceId) +{ + ecsInstanceId_ = ecsInstanceId; + setCoreParameter("EcsInstanceId", ecsInstanceId); +} + +std::string BindImagePackageRequest::getImagePackageInstanceId()const +{ + return imagePackageInstanceId_; +} + +void BindImagePackageRequest::setImagePackageInstanceId(const std::string& imagePackageInstanceId) +{ + imagePackageInstanceId_ = imagePackageInstanceId; + setCoreParameter("ImagePackageInstanceId", imagePackageInstanceId); +} + diff --git a/market/src/model/BindImagePackageResult.cc b/market/src/model/BindImagePackageResult.cc new file mode 100644 index 000000000..bd126a260 --- /dev/null +++ b/market/src/model/BindImagePackageResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Market; +using namespace AlibabaCloud::Market::Model; + +BindImagePackageResult::BindImagePackageResult() : + ServiceResult() +{} + +BindImagePackageResult::BindImagePackageResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +BindImagePackageResult::~BindImagePackageResult() +{} + +void BindImagePackageResult::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"; + +} + +bool BindImagePackageResult::getSuccess()const +{ + return success_; +} + diff --git a/market/src/model/CreateCommodityRequest.cc b/market/src/model/CreateCommodityRequest.cc new file mode 100644 index 000000000..e9dc3370c --- /dev/null +++ b/market/src/model/CreateCommodityRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Market::Model::CreateCommodityRequest; + +CreateCommodityRequest::CreateCommodityRequest() : + RpcServiceRequest("market", "2015-11-01", "CreateCommodity") +{} + +CreateCommodityRequest::~CreateCommodityRequest() +{} + +std::string CreateCommodityRequest::getApplicationId()const +{ + return applicationId_; +} + +void CreateCommodityRequest::setApplicationId(const std::string& applicationId) +{ + applicationId_ = applicationId; + setCoreParameter("ApplicationId", applicationId); +} + +std::string CreateCommodityRequest::getContent()const +{ + return content_; +} + +void CreateCommodityRequest::setContent(const std::string& content) +{ + content_ = content; + setCoreParameter("Content", content); +} + diff --git a/market/src/model/CreateCommodityResult.cc b/market/src/model/CreateCommodityResult.cc new file mode 100644 index 000000000..dacc39646 --- /dev/null +++ b/market/src/model/CreateCommodityResult.cc @@ -0,0 +1,59 @@ +/* + * 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::Market; +using namespace AlibabaCloud::Market::Model; + +CreateCommodityResult::CreateCommodityResult() : + ServiceResult() +{} + +CreateCommodityResult::CreateCommodityResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateCommodityResult::~CreateCommodityResult() +{} + +void CreateCommodityResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto commodityNode = value["Commodity"]; + if(!commodityNode["CommodityId"].isNull()) + commodity_.commodityId = commodityNode["CommodityId"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +CreateCommodityResult::Commodity CreateCommodityResult::getCommodity()const +{ + return commodity_; +} + +bool CreateCommodityResult::getSuccess()const +{ + return success_; +} + diff --git a/market/src/model/CreateOrderRequest.cc b/market/src/model/CreateOrderRequest.cc new file mode 100644 index 000000000..a27bacc74 --- /dev/null +++ b/market/src/model/CreateOrderRequest.cc @@ -0,0 +1,93 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Market::Model::CreateOrderRequest; + +CreateOrderRequest::CreateOrderRequest() : + RpcServiceRequest("market", "2015-11-01", "CreateOrder") +{} + +CreateOrderRequest::~CreateOrderRequest() +{} + +std::string CreateOrderRequest::getOrderSouce()const +{ + return orderSouce_; +} + +void CreateOrderRequest::setOrderSouce(const std::string& orderSouce) +{ + orderSouce_ = orderSouce; + setCoreParameter("OrderSouce", orderSouce); +} + +std::string CreateOrderRequest::getCommodity()const +{ + return commodity_; +} + +void CreateOrderRequest::setCommodity(const std::string& commodity) +{ + commodity_ = commodity; + setCoreParameter("Commodity", commodity); +} + +std::string CreateOrderRequest::getClientToken()const +{ + return clientToken_; +} + +void CreateOrderRequest::setClientToken(const std::string& clientToken) +{ + clientToken_ = clientToken; + setCoreParameter("ClientToken", clientToken); +} + +std::string CreateOrderRequest::getOwnerId()const +{ + return ownerId_; +} + +void CreateOrderRequest::setOwnerId(const std::string& ownerId) +{ + ownerId_ = ownerId; + setCoreParameter("OwnerId", ownerId); +} + +std::string CreateOrderRequest::getPaymentType()const +{ + return paymentType_; +} + +void CreateOrderRequest::setPaymentType(const std::string& paymentType) +{ + paymentType_ = paymentType; + setCoreParameter("PaymentType", paymentType); +} + +std::string CreateOrderRequest::getOrderType()const +{ + return orderType_; +} + +void CreateOrderRequest::setOrderType(const std::string& orderType) +{ + orderType_ = orderType; + setCoreParameter("OrderType", orderType); +} + diff --git a/market/src/model/CreateOrderResult.cc b/market/src/model/CreateOrderResult.cc new file mode 100644 index 000000000..856f4024c --- /dev/null +++ b/market/src/model/CreateOrderResult.cc @@ -0,0 +1,59 @@ +/* + * 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::Market; +using namespace AlibabaCloud::Market::Model; + +CreateOrderResult::CreateOrderResult() : + ServiceResult() +{} + +CreateOrderResult::CreateOrderResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateOrderResult::~CreateOrderResult() +{} + +void CreateOrderResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allInstanceIds = value["InstanceIds"]["InstanceId"]; + for (const auto &item : allInstanceIds) + instanceIds_.push_back(item.asString()); + if(!value["OrderId"].isNull()) + orderId_ = value["OrderId"].asString(); + +} + +std::vector CreateOrderResult::getInstanceIds()const +{ + return instanceIds_; +} + +std::string CreateOrderResult::getOrderId()const +{ + return orderId_; +} + diff --git a/market/src/model/CreateRateRequest.cc b/market/src/model/CreateRateRequest.cc new file mode 100644 index 000000000..98099348b --- /dev/null +++ b/market/src/model/CreateRateRequest.cc @@ -0,0 +1,71 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Market::Model::CreateRateRequest; + +CreateRateRequest::CreateRateRequest() : + RpcServiceRequest("market", "2015-11-01", "CreateRate") +{} + +CreateRateRequest::~CreateRateRequest() +{} + +std::string CreateRateRequest::getScore()const +{ + return score_; +} + +void CreateRateRequest::setScore(const std::string& score) +{ + score_ = score; + setCoreParameter("Score", score); +} + +std::string CreateRateRequest::getOrderId()const +{ + return orderId_; +} + +void CreateRateRequest::setOrderId(const std::string& orderId) +{ + orderId_ = orderId; + setCoreParameter("OrderId", orderId); +} + +std::string CreateRateRequest::getRequestId()const +{ + return requestId_; +} + +void CreateRateRequest::setRequestId(const std::string& requestId) +{ + requestId_ = requestId; + setCoreParameter("RequestId", requestId); +} + +std::string CreateRateRequest::getContent()const +{ + return content_; +} + +void CreateRateRequest::setContent(const std::string& content) +{ + content_ = content; + setCoreParameter("Content", content); +} + diff --git a/market/src/model/CreateRateResult.cc b/market/src/model/CreateRateResult.cc new file mode 100644 index 000000000..a70a88ec0 --- /dev/null +++ b/market/src/model/CreateRateResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Market; +using namespace AlibabaCloud::Market::Model; + +CreateRateResult::CreateRateResult() : + ServiceResult() +{} + +CreateRateResult::CreateRateResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateRateResult::~CreateRateResult() +{} + +void CreateRateResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Id"].isNull()) + id_ = std::stol(value["Id"].asString()); + +} + +long CreateRateResult::getId()const +{ + return id_; +} + diff --git a/market/src/model/DeleteCommodityRequest.cc b/market/src/model/DeleteCommodityRequest.cc new file mode 100644 index 000000000..a590f4286 --- /dev/null +++ b/market/src/model/DeleteCommodityRequest.cc @@ -0,0 +1,38 @@ +/* + * 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::Market::Model::DeleteCommodityRequest; + +DeleteCommodityRequest::DeleteCommodityRequest() : + RpcServiceRequest("market", "2015-11-01", "DeleteCommodity") +{} + +DeleteCommodityRequest::~DeleteCommodityRequest() +{} + +std::string DeleteCommodityRequest::getCommodityId()const +{ + return commodityId_; +} + +void DeleteCommodityRequest::setCommodityId(const std::string& commodityId) +{ + commodityId_ = commodityId; + setCoreParameter("CommodityId", commodityId); +} + diff --git a/market/src/model/DeleteCommodityResult.cc b/market/src/model/DeleteCommodityResult.cc new file mode 100644 index 000000000..9a81811ca --- /dev/null +++ b/market/src/model/DeleteCommodityResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Market; +using namespace AlibabaCloud::Market::Model; + +DeleteCommodityResult::DeleteCommodityResult() : + ServiceResult() +{} + +DeleteCommodityResult::DeleteCommodityResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DeleteCommodityResult::~DeleteCommodityResult() +{} + +void DeleteCommodityResult::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"; + +} + +bool DeleteCommodityResult::getSuccess()const +{ + return success_; +} + diff --git a/market/src/model/DescribeCommoditiesRequest.cc b/market/src/model/DescribeCommoditiesRequest.cc new file mode 100644 index 000000000..479eb699d --- /dev/null +++ b/market/src/model/DescribeCommoditiesRequest.cc @@ -0,0 +1,181 @@ +/* + * 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::Market::Model::DescribeCommoditiesRequest; + +DescribeCommoditiesRequest::DescribeCommoditiesRequest() : + RpcServiceRequest("market", "2015-11-01", "DescribeCommodities") +{} + +DescribeCommoditiesRequest::~DescribeCommoditiesRequest() +{} + +std::string DescribeCommoditiesRequest::getCommodityGmtModifiedTo()const +{ + return commodityGmtModifiedTo_; +} + +void DescribeCommoditiesRequest::setCommodityGmtModifiedTo(const std::string& commodityGmtModifiedTo) +{ + commodityGmtModifiedTo_ = commodityGmtModifiedTo; + setCoreParameter("CommodityGmtModifiedTo", commodityGmtModifiedTo); +} + +std::string DescribeCommoditiesRequest::getCommodityGmtModifiedFrom()const +{ + return commodityGmtModifiedFrom_; +} + +void DescribeCommoditiesRequest::setCommodityGmtModifiedFrom(const std::string& commodityGmtModifiedFrom) +{ + commodityGmtModifiedFrom_ = commodityGmtModifiedFrom; + setCoreParameter("CommodityGmtModifiedFrom", commodityGmtModifiedFrom); +} + +std::string DescribeCommoditiesRequest::getCommodityId()const +{ + return commodityId_; +} + +void DescribeCommoditiesRequest::setCommodityId(const std::string& commodityId) +{ + commodityId_ = commodityId; + setCoreParameter("CommodityId", commodityId); +} + +std::string DescribeCommoditiesRequest::getCommodityGmtPublishFrom()const +{ + return commodityGmtPublishFrom_; +} + +void DescribeCommoditiesRequest::setCommodityGmtPublishFrom(const std::string& commodityGmtPublishFrom) +{ + commodityGmtPublishFrom_ = commodityGmtPublishFrom; + setCoreParameter("CommodityGmtPublishFrom", commodityGmtPublishFrom); +} + +std::string DescribeCommoditiesRequest::getCommodityStatuses()const +{ + return commodityStatuses_; +} + +void DescribeCommoditiesRequest::setCommodityStatuses(const std::string& commodityStatuses) +{ + commodityStatuses_ = commodityStatuses; + setCoreParameter("CommodityStatuses", commodityStatuses); +} + +int DescribeCommoditiesRequest::getPageNumber()const +{ + return pageNumber_; +} + +void DescribeCommoditiesRequest::setPageNumber(int pageNumber) +{ + pageNumber_ = pageNumber; + setCoreParameter("PageNumber", std::to_string(pageNumber)); +} + +std::string DescribeCommoditiesRequest::getCommodityGmtCreatedFrom()const +{ + return commodityGmtCreatedFrom_; +} + +void DescribeCommoditiesRequest::setCommodityGmtCreatedFrom(const std::string& commodityGmtCreatedFrom) +{ + commodityGmtCreatedFrom_ = commodityGmtCreatedFrom; + setCoreParameter("CommodityGmtCreatedFrom", commodityGmtCreatedFrom); +} + +std::string DescribeCommoditiesRequest::getCommodityIds()const +{ + return commodityIds_; +} + +void DescribeCommoditiesRequest::setCommodityIds(const std::string& commodityIds) +{ + commodityIds_ = commodityIds; + setCoreParameter("CommodityIds", commodityIds); +} + +std::string DescribeCommoditiesRequest::getCommodityGmtCreatedTo()const +{ + return commodityGmtCreatedTo_; +} + +void DescribeCommoditiesRequest::setCommodityGmtCreatedTo(const std::string& commodityGmtCreatedTo) +{ + commodityGmtCreatedTo_ = commodityGmtCreatedTo; + setCoreParameter("CommodityGmtCreatedTo", commodityGmtCreatedTo); +} + +int DescribeCommoditiesRequest::getPageSize()const +{ + return pageSize_; +} + +void DescribeCommoditiesRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setCoreParameter("PageSize", std::to_string(pageSize)); +} + +std::string DescribeCommoditiesRequest::getCommodityGmtPublishTo()const +{ + return commodityGmtPublishTo_; +} + +void DescribeCommoditiesRequest::setCommodityGmtPublishTo(const std::string& commodityGmtPublishTo) +{ + commodityGmtPublishTo_ = commodityGmtPublishTo; + setCoreParameter("CommodityGmtPublishTo", commodityGmtPublishTo); +} + +std::string DescribeCommoditiesRequest::getCommodityAuditStatuses()const +{ + return commodityAuditStatuses_; +} + +void DescribeCommoditiesRequest::setCommodityAuditStatuses(const std::string& commodityAuditStatuses) +{ + commodityAuditStatuses_ = commodityAuditStatuses; + setCoreParameter("CommodityAuditStatuses", commodityAuditStatuses); +} + +std::string DescribeCommoditiesRequest::getProperties()const +{ + return properties_; +} + +void DescribeCommoditiesRequest::setProperties(const std::string& properties) +{ + properties_ = properties; + setCoreParameter("Properties", properties); +} + +std::string DescribeCommoditiesRequest::getCommodityCategoryIds()const +{ + return commodityCategoryIds_; +} + +void DescribeCommoditiesRequest::setCommodityCategoryIds(const std::string& commodityCategoryIds) +{ + commodityCategoryIds_ = commodityCategoryIds; + setCoreParameter("CommodityCategoryIds", commodityCategoryIds); +} + diff --git a/market/src/model/DescribeCommoditiesResult.cc b/market/src/model/DescribeCommoditiesResult.cc new file mode 100644 index 000000000..681235c61 --- /dev/null +++ b/market/src/model/DescribeCommoditiesResult.cc @@ -0,0 +1,76 @@ +/* + * 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::Market; +using namespace AlibabaCloud::Market::Model; + +DescribeCommoditiesResult::DescribeCommoditiesResult() : + ServiceResult() +{} + +DescribeCommoditiesResult::DescribeCommoditiesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeCommoditiesResult::~DescribeCommoditiesResult() +{} + +void DescribeCommoditiesResult::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["TotalCount"].isNull()) + data_.totalCount = std::stol(dataNode["TotalCount"].asString()); + auto allCommodities = value["Commodities"]["Commodity"]; + for (auto value : allCommodities) + { + Data::Commodity commodityObject; + if(!value["CommodityId"].isNull()) + commodityObject.commodityId = value["CommodityId"].asString(); + if(!value["Properties"].isNull()) + commodityObject.properties = value["Properties"].asString(); + if(!value["ApplicationId"].isNull()) + commodityObject.applicationId = value["ApplicationId"].asString(); + data_.commodities.push_back(commodityObject); + } + auto pageableNode = dataNode["Pageable"]; + if(!pageableNode["PageNumber"].isNull()) + data_.pageable.pageNumber = std::stoi(pageableNode["PageNumber"].asString()); + if(!pageableNode["PageSize"].isNull()) + data_.pageable.pageSize = std::stoi(pageableNode["PageSize"].asString()); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +DescribeCommoditiesResult::Data DescribeCommoditiesResult::getData()const +{ + return data_; +} + +bool DescribeCommoditiesResult::getSuccess()const +{ + return success_; +} + diff --git a/market/src/model/DescribeCommodityRequest.cc b/market/src/model/DescribeCommodityRequest.cc new file mode 100644 index 000000000..9438a397b --- /dev/null +++ b/market/src/model/DescribeCommodityRequest.cc @@ -0,0 +1,38 @@ +/* + * 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::Market::Model::DescribeCommodityRequest; + +DescribeCommodityRequest::DescribeCommodityRequest() : + RpcServiceRequest("market", "2015-11-01", "DescribeCommodity") +{} + +DescribeCommodityRequest::~DescribeCommodityRequest() +{} + +std::string DescribeCommodityRequest::getCommodityId()const +{ + return commodityId_; +} + +void DescribeCommodityRequest::setCommodityId(const std::string& commodityId) +{ + commodityId_ = commodityId; + setCoreParameter("CommodityId", commodityId); +} + diff --git a/market/src/model/DescribeCommodityResult.cc b/market/src/model/DescribeCommodityResult.cc new file mode 100644 index 000000000..135dc0a23 --- /dev/null +++ b/market/src/model/DescribeCommodityResult.cc @@ -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 +#include + +using namespace AlibabaCloud::Market; +using namespace AlibabaCloud::Market::Model; + +DescribeCommodityResult::DescribeCommodityResult() : + ServiceResult() +{} + +DescribeCommodityResult::DescribeCommodityResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeCommodityResult::~DescribeCommodityResult() +{} + +void DescribeCommodityResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto commodityNode = value["Commodity"]; + if(!commodityNode["CommodityId"].isNull()) + commodity_.commodityId = commodityNode["CommodityId"].asString(); + if(!commodityNode["Properties"].isNull()) + commodity_.properties = commodityNode["Properties"].asString(); + if(!commodityNode["CommoditySpecs"].isNull()) + commodity_.commoditySpecs = commodityNode["CommoditySpecs"].asString(); + if(!commodityNode["ApplicationId"].isNull()) + commodity_.applicationId = commodityNode["ApplicationId"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +DescribeCommodityResult::Commodity DescribeCommodityResult::getCommodity()const +{ + return commodity_; +} + +bool DescribeCommodityResult::getSuccess()const +{ + return success_; +} + diff --git a/market/src/model/DescribeInstanceRequest.cc b/market/src/model/DescribeInstanceRequest.cc new file mode 100644 index 000000000..22c726612 --- /dev/null +++ b/market/src/model/DescribeInstanceRequest.cc @@ -0,0 +1,60 @@ +/* + * 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::Market::Model::DescribeInstanceRequest; + +DescribeInstanceRequest::DescribeInstanceRequest() : + RpcServiceRequest("market", "2015-11-01", "DescribeInstance") +{} + +DescribeInstanceRequest::~DescribeInstanceRequest() +{} + +long DescribeInstanceRequest::getOwnerId()const +{ + return ownerId_; +} + +void DescribeInstanceRequest::setOwnerId(long ownerId) +{ + ownerId_ = ownerId; + setCoreParameter("OwnerId", std::to_string(ownerId)); +} + +std::string DescribeInstanceRequest::getInstanceId()const +{ + return instanceId_; +} + +void DescribeInstanceRequest::setInstanceId(const std::string& instanceId) +{ + instanceId_ = instanceId; + setCoreParameter("InstanceId", instanceId); +} + +std::string DescribeInstanceRequest::getOrderType()const +{ + return orderType_; +} + +void DescribeInstanceRequest::setOrderType(const std::string& orderType) +{ + orderType_ = orderType; + setCoreParameter("OrderType", orderType); +} + diff --git a/market/src/model/DescribeInstanceResult.cc b/market/src/model/DescribeInstanceResult.cc new file mode 100644 index 000000000..e350be134 --- /dev/null +++ b/market/src/model/DescribeInstanceResult.cc @@ -0,0 +1,215 @@ +/* + * 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::Market; +using namespace AlibabaCloud::Market::Model; + +DescribeInstanceResult::DescribeInstanceResult() : + ServiceResult() +{} + +DescribeInstanceResult::DescribeInstanceResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeInstanceResult::~DescribeInstanceResult() +{} + +void DescribeInstanceResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allModules = value["Modules"]["Module"]; + for (auto value : allModules) + { + Module modulesObject; + if(!value["Id"].isNull()) + modulesObject.id = value["Id"].asString(); + if(!value["Name"].isNull()) + modulesObject.name = value["Name"].asString(); + if(!value["Code"].isNull()) + modulesObject.code = value["Code"].asString(); + auto allProperties = value["Properties"]["Property"]; + for (auto value : allProperties) + { + Module::Property propertiesObject; + if(!value["Name"].isNull()) + propertiesObject.name = value["Name"].asString(); + if(!value["Key"].isNull()) + propertiesObject.key = value["Key"].asString(); + if(!value["ShowType"].isNull()) + propertiesObject.showType = value["ShowType"].asString(); + if(!value["DisplayUnit"].isNull()) + propertiesObject.displayUnit = value["DisplayUnit"].asString(); + auto allPropertyValues = value["PropertyValues"]["PropertyValue"]; + for (auto value : allPropertyValues) + { + Module::Property::PropertyValue propertyValuesObject; + if(!value["Value"].isNull()) + propertyValuesObject.value = value["Value"].asString(); + if(!value["DisplayName"].isNull()) + propertyValuesObject.displayName = value["DisplayName"].asString(); + if(!value["Type"].isNull()) + propertyValuesObject.type = value["Type"].asString(); + if(!value["Min"].isNull()) + propertyValuesObject.min = value["Min"].asString(); + if(!value["Max"].isNull()) + propertyValuesObject.max = value["Max"].asString(); + if(!value["Step"].isNull()) + propertyValuesObject.step = value["Step"].asString(); + if(!value["Remark"].isNull()) + propertyValuesObject.remark = value["Remark"].asString(); + propertiesObject.propertyValues.push_back(propertyValuesObject); + } + modulesObject.properties.push_back(propertiesObject); + } + modules_.push_back(modulesObject); + } + auto relationalDataNode = value["RelationalData"]; + if(!relationalDataNode["ServiceStatus"].isNull()) + relationalData_.serviceStatus = relationalDataNode["ServiceStatus"].asString(); + if(!value["InstanceId"].isNull()) + instanceId_ = std::stol(value["InstanceId"].asString()); + if(!value["OrderId"].isNull()) + orderId_ = std::stol(value["OrderId"].asString()); + if(!value["SupplierName"].isNull()) + supplierName_ = value["SupplierName"].asString(); + if(!value["ProductCode"].isNull()) + productCode_ = value["ProductCode"].asString(); + if(!value["ProductSkuCode"].isNull()) + productSkuCode_ = value["ProductSkuCode"].asString(); + if(!value["ProductName"].isNull()) + productName_ = value["ProductName"].asString(); + if(!value["ProductType"].isNull()) + productType_ = value["ProductType"].asString(); + if(!value["Status"].isNull()) + status_ = value["Status"].asString(); + if(!value["BeganOn"].isNull()) + beganOn_ = std::stol(value["BeganOn"].asString()); + if(!value["EndOn"].isNull()) + endOn_ = std::stol(value["EndOn"].asString()); + if(!value["CreatedOn"].isNull()) + createdOn_ = std::stol(value["CreatedOn"].asString()); + if(!value["ExtendJson"].isNull()) + extendJson_ = value["ExtendJson"].asString(); + if(!value["HostJson"].isNull()) + hostJson_ = value["HostJson"].asString(); + if(!value["AppJson"].isNull()) + appJson_ = value["AppJson"].asString(); + if(!value["ComponentJson"].isNull()) + componentJson_ = value["ComponentJson"].asString(); + if(!value["Constraints"].isNull()) + constraints_ = value["Constraints"].asString(); + +} + +std::string DescribeInstanceResult::getStatus()const +{ + return status_; +} + +std::string DescribeInstanceResult::getProductName()const +{ + return productName_; +} + +long DescribeInstanceResult::getInstanceId()const +{ + return instanceId_; +} + +std::string DescribeInstanceResult::getProductCode()const +{ + return productCode_; +} + +long DescribeInstanceResult::getEndOn()const +{ + return endOn_; +} + +std::vector DescribeInstanceResult::getModules()const +{ + return modules_; +} + +DescribeInstanceResult::RelationalData DescribeInstanceResult::getRelationalData()const +{ + return relationalData_; +} + +std::string DescribeInstanceResult::getProductType()const +{ + return productType_; +} + +std::string DescribeInstanceResult::getAppJson()const +{ + return appJson_; +} + +long DescribeInstanceResult::getOrderId()const +{ + return orderId_; +} + +std::string DescribeInstanceResult::getConstraints()const +{ + return constraints_; +} + +std::string DescribeInstanceResult::getExtendJson()const +{ + return extendJson_; +} + +std::string DescribeInstanceResult::getSupplierName()const +{ + return supplierName_; +} + +std::string DescribeInstanceResult::getComponentJson()const +{ + return componentJson_; +} + +std::string DescribeInstanceResult::getProductSkuCode()const +{ + return productSkuCode_; +} + +long DescribeInstanceResult::getCreatedOn()const +{ + return createdOn_; +} + +std::string DescribeInstanceResult::getHostJson()const +{ + return hostJson_; +} + +long DescribeInstanceResult::getBeganOn()const +{ + return beganOn_; +} + diff --git a/market/src/model/DescribeInstancesRequest.cc b/market/src/model/DescribeInstancesRequest.cc new file mode 100644 index 000000000..32d1e25f4 --- /dev/null +++ b/market/src/model/DescribeInstancesRequest.cc @@ -0,0 +1,60 @@ +/* + * 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::Market::Model::DescribeInstancesRequest; + +DescribeInstancesRequest::DescribeInstancesRequest() : + RpcServiceRequest("market", "2015-11-01", "DescribeInstances") +{} + +DescribeInstancesRequest::~DescribeInstancesRequest() +{} + +int DescribeInstancesRequest::getPageSize()const +{ + return pageSize_; +} + +void DescribeInstancesRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setCoreParameter("PageSize", std::to_string(pageSize)); +} + +int DescribeInstancesRequest::getPageNumber()const +{ + return pageNumber_; +} + +void DescribeInstancesRequest::setPageNumber(int pageNumber) +{ + pageNumber_ = pageNumber; + setCoreParameter("PageNumber", std::to_string(pageNumber)); +} + +std::string DescribeInstancesRequest::getProductType()const +{ + return productType_; +} + +void DescribeInstancesRequest::setProductType(const std::string& productType) +{ + productType_ = productType; + setCoreParameter("ProductType", productType); +} + diff --git a/market/src/model/DescribeInstancesResult.cc b/market/src/model/DescribeInstancesResult.cc new file mode 100644 index 000000000..9ba344e8e --- /dev/null +++ b/market/src/model/DescribeInstancesResult.cc @@ -0,0 +1,110 @@ +/* + * 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::Market; +using namespace AlibabaCloud::Market::Model; + +DescribeInstancesResult::DescribeInstancesResult() : + ServiceResult() +{} + +DescribeInstancesResult::DescribeInstancesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeInstancesResult::~DescribeInstancesResult() +{} + +void DescribeInstancesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allInstanceItems = value["InstanceItems"]["InstanceItem"]; + for (auto value : allInstanceItems) + { + InstanceItem instanceItemsObject; + if(!value["InstanceId"].isNull()) + instanceItemsObject.instanceId = std::stol(value["InstanceId"].asString()); + if(!value["OrderId"].isNull()) + instanceItemsObject.orderId = std::stol(value["OrderId"].asString()); + if(!value["SupplierName"].isNull()) + instanceItemsObject.supplierName = value["SupplierName"].asString(); + if(!value["ProductCode"].isNull()) + instanceItemsObject.productCode = value["ProductCode"].asString(); + if(!value["ProductSkuCode"].isNull()) + instanceItemsObject.productSkuCode = value["ProductSkuCode"].asString(); + if(!value["ProductName"].isNull()) + instanceItemsObject.productName = value["ProductName"].asString(); + if(!value["ProductType"].isNull()) + instanceItemsObject.productType = value["ProductType"].asString(); + if(!value["Status"].isNull()) + instanceItemsObject.status = value["Status"].asString(); + if(!value["BeganOn"].isNull()) + instanceItemsObject.beganOn = std::stol(value["BeganOn"].asString()); + if(!value["EndOn"].isNull()) + instanceItemsObject.endOn = std::stol(value["EndOn"].asString()); + if(!value["CreatedOn"].isNull()) + instanceItemsObject.createdOn = std::stol(value["CreatedOn"].asString()); + if(!value["ExtendJson"].isNull()) + instanceItemsObject.extendJson = value["ExtendJson"].asString(); + if(!value["HostJson"].isNull()) + instanceItemsObject.hostJson = value["HostJson"].asString(); + if(!value["AppJson"].isNull()) + instanceItemsObject.appJson = value["AppJson"].asString(); + if(!value["ApiJson"].isNull()) + instanceItemsObject.apiJson = value["ApiJson"].asString(); + if(!value["ImageJson"].isNull()) + instanceItemsObject.imageJson = value["ImageJson"].asString(); + if(!value["IdaasJson"].isNull()) + instanceItemsObject.idaasJson = value["IdaasJson"].asString(); + instanceItems_.push_back(instanceItemsObject); + } + if(!value["PageNumber"].isNull()) + pageNumber_ = std::stoi(value["PageNumber"].asString()); + if(!value["PageSize"].isNull()) + pageSize_ = std::stoi(value["PageSize"].asString()); + if(!value["TotalCount"].isNull()) + totalCount_ = std::stoi(value["TotalCount"].asString()); + +} + +int DescribeInstancesResult::getTotalCount()const +{ + return totalCount_; +} + +int DescribeInstancesResult::getPageSize()const +{ + return pageSize_; +} + +int DescribeInstancesResult::getPageNumber()const +{ + return pageNumber_; +} + +std::vector DescribeInstancesResult::getInstanceItems()const +{ + return instanceItems_; +} + diff --git a/market/src/model/DescribeLicenseRequest.cc b/market/src/model/DescribeLicenseRequest.cc new file mode 100644 index 000000000..9f5c0bb0c --- /dev/null +++ b/market/src/model/DescribeLicenseRequest.cc @@ -0,0 +1,38 @@ +/* + * 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::Market::Model::DescribeLicenseRequest; + +DescribeLicenseRequest::DescribeLicenseRequest() : + RpcServiceRequest("market", "2015-11-01", "DescribeLicense") +{} + +DescribeLicenseRequest::~DescribeLicenseRequest() +{} + +std::string DescribeLicenseRequest::getLicenseCode()const +{ + return licenseCode_; +} + +void DescribeLicenseRequest::setLicenseCode(const std::string& licenseCode) +{ + licenseCode_ = licenseCode; + setCoreParameter("LicenseCode", licenseCode); +} + diff --git a/market/src/model/DescribeLicenseResult.cc b/market/src/model/DescribeLicenseResult.cc new file mode 100644 index 000000000..f9c3a9164 --- /dev/null +++ b/market/src/model/DescribeLicenseResult.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::Market; +using namespace AlibabaCloud::Market::Model; + +DescribeLicenseResult::DescribeLicenseResult() : + ServiceResult() +{} + +DescribeLicenseResult::DescribeLicenseResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeLicenseResult::~DescribeLicenseResult() +{} + +void DescribeLicenseResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto licenseNode = value["License"]; + if(!licenseNode["LicenseStatus"].isNull()) + license_.licenseStatus = licenseNode["LicenseStatus"].asString(); + if(!licenseNode["LicenseCode"].isNull()) + license_.licenseCode = licenseNode["LicenseCode"].asString(); + if(!licenseNode["InstanceId"].isNull()) + license_.instanceId = licenseNode["InstanceId"].asString(); + if(!licenseNode["CreateTime"].isNull()) + license_.createTime = licenseNode["CreateTime"].asString(); + if(!licenseNode["ExpiredTime"].isNull()) + license_.expiredTime = licenseNode["ExpiredTime"].asString(); + if(!licenseNode["ActivateTime"].isNull()) + license_.activateTime = licenseNode["ActivateTime"].asString(); + if(!licenseNode["ProductSkuId"].isNull()) + license_.productSkuId = licenseNode["ProductSkuId"].asString(); + if(!licenseNode["ProductCode"].isNull()) + license_.productCode = licenseNode["ProductCode"].asString(); + if(!licenseNode["ProductName"].isNull()) + license_.productName = licenseNode["ProductName"].asString(); + if(!licenseNode["SupplierName"].isNull()) + license_.supplierName = licenseNode["SupplierName"].asString(); + auto allExtendArray = value["ExtendArray"]["LicenseAttribute"]; + for (auto value : allExtendArray) + { + License::LicenseAttribute licenseAttributeObject; + if(!value["Code"].isNull()) + licenseAttributeObject.code = value["Code"].asString(); + if(!value["Value"].isNull()) + licenseAttributeObject.value = value["Value"].asString(); + license_.extendArray.push_back(licenseAttributeObject); + } + auto extendInfoNode = licenseNode["ExtendInfo"]; + if(!extendInfoNode["AliUid"].isNull()) + license_.extendInfo.aliUid = std::stol(extendInfoNode["AliUid"].asString()); + if(!extendInfoNode["Email"].isNull()) + license_.extendInfo.email = extendInfoNode["Email"].asString(); + if(!extendInfoNode["Mobile"].isNull()) + license_.extendInfo.mobile = extendInfoNode["Mobile"].asString(); + if(!extendInfoNode["AccountQuantity"].isNull()) + license_.extendInfo.accountQuantity = std::stol(extendInfoNode["AccountQuantity"].asString()); + +} + +DescribeLicenseResult::License DescribeLicenseResult::getLicense()const +{ + return license_; +} + diff --git a/market/src/model/DescribeOrderRequest.cc b/market/src/model/DescribeOrderRequest.cc new file mode 100644 index 000000000..fea16e5d2 --- /dev/null +++ b/market/src/model/DescribeOrderRequest.cc @@ -0,0 +1,38 @@ +/* + * 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::Market::Model::DescribeOrderRequest; + +DescribeOrderRequest::DescribeOrderRequest() : + RpcServiceRequest("market", "2015-11-01", "DescribeOrder") +{} + +DescribeOrderRequest::~DescribeOrderRequest() +{} + +std::string DescribeOrderRequest::getOrderId()const +{ + return orderId_; +} + +void DescribeOrderRequest::setOrderId(const std::string& orderId) +{ + orderId_ = orderId; + setCoreParameter("OrderId", orderId); +} + diff --git a/market/src/model/DescribeOrderResult.cc b/market/src/model/DescribeOrderResult.cc new file mode 100644 index 000000000..0df77d231 --- /dev/null +++ b/market/src/model/DescribeOrderResult.cc @@ -0,0 +1,186 @@ +/* + * 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::Market; +using namespace AlibabaCloud::Market::Model; + +DescribeOrderResult::DescribeOrderResult() : + ServiceResult() +{} + +DescribeOrderResult::DescribeOrderResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeOrderResult::~DescribeOrderResult() +{} + +void DescribeOrderResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allSupplierTelephones = value["SupplierTelephones"]["Telephone"]; + for (const auto &item : allSupplierTelephones) + supplierTelephones_.push_back(item.asString()); + auto allInstanceIds = value["InstanceIds"]["InstanceId"]; + for (const auto &item : allInstanceIds) + instanceIds_.push_back(item.asString()); + if(!value["OrderId"].isNull()) + orderId_ = std::stol(value["OrderId"].asString()); + if(!value["AliUid"].isNull()) + aliUid_ = std::stol(value["AliUid"].asString()); + if(!value["SupplierCompanyName"].isNull()) + supplierCompanyName_ = value["SupplierCompanyName"].asString(); + if(!value["ProductCode"].isNull()) + productCode_ = value["ProductCode"].asString(); + if(!value["ProductSkuCode"].isNull()) + productSkuCode_ = value["ProductSkuCode"].asString(); + if(!value["ProductName"].isNull()) + productName_ = value["ProductName"].asString(); + if(!value["PeriodType"].isNull()) + periodType_ = value["PeriodType"].asString(); + if(!value["Quantity"].isNull()) + quantity_ = std::stoi(value["Quantity"].asString()); + if(!value["AccountQuantity"].isNull()) + accountQuantity_ = std::stol(value["AccountQuantity"].asString()); + if(!value["OrderType"].isNull()) + orderType_ = value["OrderType"].asString(); + if(!value["OrderStatus"].isNull()) + orderStatus_ = value["OrderStatus"].asString(); + if(!value["PayStatus"].isNull()) + payStatus_ = value["PayStatus"].asString(); + if(!value["PaidOn"].isNull()) + paidOn_ = std::stol(value["PaidOn"].asString()); + if(!value["CreatedOn"].isNull()) + createdOn_ = std::stol(value["CreatedOn"].asString()); + if(!value["OriginalPrice"].isNull()) + originalPrice_ = std::stof(value["OriginalPrice"].asString()); + if(!value["TotalPrice"].isNull()) + totalPrice_ = std::stof(value["TotalPrice"].asString()); + if(!value["PaymentPrice"].isNull()) + paymentPrice_ = std::stof(value["PaymentPrice"].asString()); + if(!value["CouponPrice"].isNull()) + couponPrice_ = std::stof(value["CouponPrice"].asString()); + +} + +long DescribeOrderResult::getPaidOn()const +{ + return paidOn_; +} + +std::string DescribeOrderResult::getPeriodType()const +{ + return periodType_; +} + +float DescribeOrderResult::getCouponPrice()const +{ + return couponPrice_; +} + +std::string DescribeOrderResult::getPayStatus()const +{ + return payStatus_; +} + +float DescribeOrderResult::getOriginalPrice()const +{ + return originalPrice_; +} + +std::string DescribeOrderResult::getProductName()const +{ + return productName_; +} + +std::string DescribeOrderResult::getProductCode()const +{ + return productCode_; +} + +std::string DescribeOrderResult::getSupplierCompanyName()const +{ + return supplierCompanyName_; +} + +int DescribeOrderResult::getQuantity()const +{ + return quantity_; +} + +long DescribeOrderResult::getOrderId()const +{ + return orderId_; +} + +std::vector DescribeOrderResult::getSupplierTelephones()const +{ + return supplierTelephones_; +} + +std::string DescribeOrderResult::getOrderStatus()const +{ + return orderStatus_; +} + +std::string DescribeOrderResult::getOrderType()const +{ + return orderType_; +} + +float DescribeOrderResult::getTotalPrice()const +{ + return totalPrice_; +} + +std::string DescribeOrderResult::getProductSkuCode()const +{ + return productSkuCode_; +} + +long DescribeOrderResult::getCreatedOn()const +{ + return createdOn_; +} + +float DescribeOrderResult::getPaymentPrice()const +{ + return paymentPrice_; +} + +std::vector DescribeOrderResult::getInstanceIds()const +{ + return instanceIds_; +} + +long DescribeOrderResult::getAccountQuantity()const +{ + return accountQuantity_; +} + +long DescribeOrderResult::getAliUid()const +{ + return aliUid_; +} + diff --git a/market/src/model/DescribePriceRequest.cc b/market/src/model/DescribePriceRequest.cc new file mode 100644 index 000000000..da472b396 --- /dev/null +++ b/market/src/model/DescribePriceRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Market::Model::DescribePriceRequest; + +DescribePriceRequest::DescribePriceRequest() : + RpcServiceRequest("market", "2015-11-01", "DescribePrice") +{} + +DescribePriceRequest::~DescribePriceRequest() +{} + +std::string DescribePriceRequest::getCommodity()const +{ + return commodity_; +} + +void DescribePriceRequest::setCommodity(const std::string& commodity) +{ + commodity_ = commodity; + setCoreParameter("Commodity", commodity); +} + +std::string DescribePriceRequest::getOrderType()const +{ + return orderType_; +} + +void DescribePriceRequest::setOrderType(const std::string& orderType) +{ + orderType_ = orderType; + setCoreParameter("OrderType", orderType); +} + diff --git a/market/src/model/DescribePriceResult.cc b/market/src/model/DescribePriceResult.cc new file mode 100644 index 000000000..8145de4b2 --- /dev/null +++ b/market/src/model/DescribePriceResult.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::Market; +using namespace AlibabaCloud::Market::Model; + +DescribePriceResult::DescribePriceResult() : + ServiceResult() +{} + +DescribePriceResult::DescribePriceResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribePriceResult::~DescribePriceResult() +{} + +void DescribePriceResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allPromotionRules = value["PromotionRules"]["PromotionRule"]; + for (auto value : allPromotionRules) + { + PromotionRule promotionRulesObject; + if(!value["RuleId"].isNull()) + promotionRulesObject.ruleId = value["RuleId"].asString(); + if(!value["Name"].isNull()) + promotionRulesObject.name = value["Name"].asString(); + if(!value["Title"].isNull()) + promotionRulesObject.title = value["Title"].asString(); + promotionRules_.push_back(promotionRulesObject); + } + if(!value["ProductCode"].isNull()) + productCode_ = value["ProductCode"].asString(); + if(!value["OriginalPrice"].isNull()) + originalPrice_ = std::stof(value["OriginalPrice"].asString()); + if(!value["TradePrice"].isNull()) + tradePrice_ = std::stof(value["TradePrice"].asString()); + if(!value["DiscountPrice"].isNull()) + discountPrice_ = std::stof(value["DiscountPrice"].asString()); + +} + +std::vector DescribePriceResult::getPromotionRules()const +{ + return promotionRules_; +} + +float DescribePriceResult::getOriginalPrice()const +{ + return originalPrice_; +} + +std::string DescribePriceResult::getProductCode()const +{ + return productCode_; +} + +float DescribePriceResult::getDiscountPrice()const +{ + return discountPrice_; +} + +float DescribePriceResult::getTradePrice()const +{ + return tradePrice_; +} + diff --git a/market/src/model/DescribeProductRequest.cc b/market/src/model/DescribeProductRequest.cc new file mode 100644 index 000000000..cb58bdec8 --- /dev/null +++ b/market/src/model/DescribeProductRequest.cc @@ -0,0 +1,60 @@ +/* + * 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::Market::Model::DescribeProductRequest; + +DescribeProductRequest::DescribeProductRequest() : + RpcServiceRequest("market", "2015-11-01", "DescribeProduct") +{} + +DescribeProductRequest::~DescribeProductRequest() +{} + +std::string DescribeProductRequest::getCode()const +{ + return code_; +} + +void DescribeProductRequest::setCode(const std::string& code) +{ + code_ = code; + setCoreParameter("Code", code); +} + +bool DescribeProductRequest::getQueryDraft()const +{ + return queryDraft_; +} + +void DescribeProductRequest::setQueryDraft(bool queryDraft) +{ + queryDraft_ = queryDraft; + setCoreParameter("QueryDraft", queryDraft ? "true" : "false"); +} + +std::string DescribeProductRequest::getAliUid()const +{ + return aliUid_; +} + +void DescribeProductRequest::setAliUid(const std::string& aliUid) +{ + aliUid_ = aliUid; + setCoreParameter("AliUid", aliUid); +} + diff --git a/market/src/model/DescribeProductResult.cc b/market/src/model/DescribeProductResult.cc new file mode 100644 index 000000000..d95db927d --- /dev/null +++ b/market/src/model/DescribeProductResult.cc @@ -0,0 +1,265 @@ +/* + * 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::Market; +using namespace AlibabaCloud::Market::Model; + +DescribeProductResult::DescribeProductResult() : + ServiceResult() +{} + +DescribeProductResult::DescribeProductResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeProductResult::~DescribeProductResult() +{} + +void DescribeProductResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allProductSkus = value["ProductSkus"]["ProductSku"]; + for (auto value : allProductSkus) + { + ProductSku productSkusObject; + if(!value["Name"].isNull()) + productSkusObject.name = value["Name"].asString(); + if(!value["Code"].isNull()) + productSkusObject.code = value["Code"].asString(); + if(!value["ChargeType"].isNull()) + productSkusObject.chargeType = value["ChargeType"].asString(); + if(!value["Constraints"].isNull()) + productSkusObject.constraints = value["Constraints"].asString(); + if(!value["Hidden"].isNull()) + productSkusObject.hidden = value["Hidden"].asString() == "true"; + auto allOrderPeriods = value["OrderPeriods"]["OrderPeriod"]; + for (auto value : allOrderPeriods) + { + ProductSku::OrderPeriod orderPeriodsObject; + if(!value["Name"].isNull()) + orderPeriodsObject.name = value["Name"].asString(); + if(!value["PeriodType"].isNull()) + orderPeriodsObject.periodType = value["PeriodType"].asString(); + productSkusObject.orderPeriods.push_back(orderPeriodsObject); + } + auto allModules = value["Modules"]["Module"]; + for (auto value : allModules) + { + ProductSku::Module modulesObject; + if(!value["Id"].isNull()) + modulesObject.id = value["Id"].asString(); + if(!value["Name"].isNull()) + modulesObject.name = value["Name"].asString(); + if(!value["Code"].isNull()) + modulesObject.code = value["Code"].asString(); + auto allProperties = value["Properties"]["Property"]; + for (auto value : allProperties) + { + ProductSku::Module::Property propertiesObject; + if(!value["Name"].isNull()) + propertiesObject.name = value["Name"].asString(); + if(!value["Key"].isNull()) + propertiesObject.key = value["Key"].asString(); + if(!value["ShowType"].isNull()) + propertiesObject.showType = value["ShowType"].asString(); + if(!value["DisplayUnit"].isNull()) + propertiesObject.displayUnit = value["DisplayUnit"].asString(); + auto allPropertyValues = value["PropertyValues"]["PropertyValue"]; + for (auto value : allPropertyValues) + { + ProductSku::Module::Property::PropertyValue propertyValuesObject; + if(!value["Value"].isNull()) + propertyValuesObject.value = value["Value"].asString(); + if(!value["DisplayName"].isNull()) + propertyValuesObject.displayName = value["DisplayName"].asString(); + if(!value["Type"].isNull()) + propertyValuesObject.type = value["Type"].asString(); + if(!value["Min"].isNull()) + propertyValuesObject.min = value["Min"].asString(); + if(!value["Max"].isNull()) + propertyValuesObject.max = value["Max"].asString(); + if(!value["Step"].isNull()) + propertyValuesObject.step = value["Step"].asString(); + if(!value["Remark"].isNull()) + propertyValuesObject.remark = value["Remark"].asString(); + propertiesObject.propertyValues.push_back(propertyValuesObject); + } + modulesObject.properties.push_back(propertiesObject); + } + productSkusObject.modules.push_back(modulesObject); + } + productSkus_.push_back(productSkusObject); + } + auto allProductExtras = value["ProductExtras"]["ProductExtra"]; + for (auto value : allProductExtras) + { + ProductExtra productExtrasObject; + if(!value["Key"].isNull()) + productExtrasObject.key = value["Key"].asString(); + if(!value["Values"].isNull()) + productExtrasObject.values = value["Values"].asString(); + if(!value["Label"].isNull()) + productExtrasObject.label = value["Label"].asString(); + if(!value["Order"].isNull()) + productExtrasObject.order = std::stoi(value["Order"].asString()); + if(!value["Type"].isNull()) + productExtrasObject.type = value["Type"].asString(); + productExtras_.push_back(productExtrasObject); + } + auto shopInfoNode = value["ShopInfo"]; + if(!shopInfoNode["Id"].isNull()) + shopInfo_.id = std::stol(shopInfoNode["Id"].asString()); + if(!shopInfoNode["Name"].isNull()) + shopInfo_.name = shopInfoNode["Name"].asString(); + if(!shopInfoNode["Emails"].isNull()) + shopInfo_.emails = shopInfoNode["Emails"].asString(); + auto allWangWangs = value["WangWangs"]["WangWang"]; + for (auto value : allWangWangs) + { + ShopInfo::WangWang wangWangObject; + if(!value["UserName"].isNull()) + wangWangObject.userName = value["UserName"].asString(); + if(!value["Remark"].isNull()) + wangWangObject.remark = value["Remark"].asString(); + shopInfo_.wangWangs.push_back(wangWangObject); + } + auto allTelephones = shopInfoNode["Telephones"]["Telephone"]; + for (auto value : allTelephones) + shopInfo_.telephones.push_back(value.asString()); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Name"].isNull()) + name_ = value["Name"].asString(); + if(!value["Type"].isNull()) + type_ = value["Type"].asString(); + if(!value["PicUrl"].isNull()) + picUrl_ = value["PicUrl"].asString(); + if(!value["Description"].isNull()) + description_ = value["Description"].asString(); + if(!value["ShortDescription"].isNull()) + shortDescription_ = value["ShortDescription"].asString(); + if(!value["UseCount"].isNull()) + useCount_ = std::stol(value["UseCount"].asString()); + if(!value["Score"].isNull()) + score_ = std::stof(value["Score"].asString()); + if(!value["Status"].isNull()) + status_ = value["Status"].asString(); + if(!value["AuditStatus"].isNull()) + auditStatus_ = value["AuditStatus"].asString(); + if(!value["AuditFailMsg"].isNull()) + auditFailMsg_ = value["AuditFailMsg"].asString(); + if(!value["AuditTime"].isNull()) + auditTime_ = std::stol(value["AuditTime"].asString()); + if(!value["GmtCreated"].isNull()) + gmtCreated_ = std::stol(value["GmtCreated"].asString()); + if(!value["GmtModified"].isNull()) + gmtModified_ = std::stol(value["GmtModified"].asString()); + +} + +std::string DescribeProductResult::getStatus()const +{ + return status_; +} + +std::string DescribeProductResult::getDescription()const +{ + return description_; +} + +DescribeProductResult::ShopInfo DescribeProductResult::getShopInfo()const +{ + return shopInfo_; +} + +std::vector DescribeProductResult::getProductSkus()const +{ + return productSkus_; +} + +long DescribeProductResult::getUseCount()const +{ + return useCount_; +} + +long DescribeProductResult::getGmtModified()const +{ + return gmtModified_; +} + +long DescribeProductResult::getGmtCreated()const +{ + return gmtCreated_; +} + +std::string DescribeProductResult::getCode()const +{ + return code_; +} + +std::string DescribeProductResult::getName()const +{ + return name_; +} + +std::string DescribeProductResult::getShortDescription()const +{ + return shortDescription_; +} + +std::string DescribeProductResult::getType()const +{ + return type_; +} + +float DescribeProductResult::getScore()const +{ + return score_; +} + +std::string DescribeProductResult::getAuditStatus()const +{ + return auditStatus_; +} + +std::string DescribeProductResult::getAuditFailMsg()const +{ + return auditFailMsg_; +} + +std::vector DescribeProductResult::getProductExtras()const +{ + return productExtras_; +} + +long DescribeProductResult::getAuditTime()const +{ + return auditTime_; +} + +std::string DescribeProductResult::getPicUrl()const +{ + return picUrl_; +} + diff --git a/market/src/model/DescribeProductsRequest.cc b/market/src/model/DescribeProductsRequest.cc new file mode 100644 index 000000000..b60d496bf --- /dev/null +++ b/market/src/model/DescribeProductsRequest.cc @@ -0,0 +1,77 @@ +/* + * 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::Market::Model::DescribeProductsRequest; + +DescribeProductsRequest::DescribeProductsRequest() : + RpcServiceRequest("market", "2015-11-01", "DescribeProducts") +{} + +DescribeProductsRequest::~DescribeProductsRequest() +{} + +std::vector DescribeProductsRequest::getFilter()const +{ + return filter_; +} + +void DescribeProductsRequest::setFilter(const std::vector& filter) +{ + filter_ = filter; + int i = 0; + for(int i = 0; i!= filter.size(); i++) { + auto obj = filter.at(i); + std::string str ="Filter."+ std::to_string(i); + setCoreParameter(str + ".Value", obj.value); + setCoreParameter(str + ".Key", obj.key); + } +} + +std::string DescribeProductsRequest::getSearchTerm()const +{ + return searchTerm_; +} + +void DescribeProductsRequest::setSearchTerm(const std::string& searchTerm) +{ + searchTerm_ = searchTerm; + setCoreParameter("SearchTerm", searchTerm); +} + +int DescribeProductsRequest::getPageSize()const +{ + return pageSize_; +} + +void DescribeProductsRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setCoreParameter("PageSize", std::to_string(pageSize)); +} + +int DescribeProductsRequest::getPageNumber()const +{ + return pageNumber_; +} + +void DescribeProductsRequest::setPageNumber(int pageNumber) +{ + pageNumber_ = pageNumber; + setCoreParameter("PageNumber", std::to_string(pageNumber)); +} + diff --git a/market/src/model/DescribeProductsResult.cc b/market/src/model/DescribeProductsResult.cc new file mode 100644 index 000000000..08efac9ed --- /dev/null +++ b/market/src/model/DescribeProductsResult.cc @@ -0,0 +1,106 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Market; +using namespace AlibabaCloud::Market::Model; + +DescribeProductsResult::DescribeProductsResult() : + ServiceResult() +{} + +DescribeProductsResult::DescribeProductsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeProductsResult::~DescribeProductsResult() +{} + +void DescribeProductsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allProductItems = value["ProductItems"]["ProductItem"]; + for (auto value : allProductItems) + { + ProductItem productItemsObject; + if(!value["Code"].isNull()) + productItemsObject.code = value["Code"].asString(); + if(!value["Name"].isNull()) + productItemsObject.name = value["Name"].asString(); + if(!value["CategoryId"].isNull()) + productItemsObject.categoryId = std::stol(value["CategoryId"].asString()); + if(!value["SupplierId"].isNull()) + productItemsObject.supplierId = std::stol(value["SupplierId"].asString()); + if(!value["SupplierName"].isNull()) + productItemsObject.supplierName = value["SupplierName"].asString(); + if(!value["ShortDescription"].isNull()) + productItemsObject.shortDescription = value["ShortDescription"].asString(); + if(!value["Tags"].isNull()) + productItemsObject.tags = value["Tags"].asString(); + if(!value["SuggestedPrice"].isNull()) + productItemsObject.suggestedPrice = value["SuggestedPrice"].asString(); + if(!value["TargetUrl"].isNull()) + productItemsObject.targetUrl = value["TargetUrl"].asString(); + if(!value["ImageUrl"].isNull()) + productItemsObject.imageUrl = value["ImageUrl"].asString(); + if(!value["Score"].isNull()) + productItemsObject.score = value["Score"].asString(); + if(!value["OperationSystem"].isNull()) + productItemsObject.operationSystem = value["OperationSystem"].asString(); + if(!value["WarrantyDate"].isNull()) + productItemsObject.warrantyDate = value["WarrantyDate"].asString(); + if(!value["DeliveryDate"].isNull()) + productItemsObject.deliveryDate = value["DeliveryDate"].asString(); + if(!value["DeliveryWay"].isNull()) + productItemsObject.deliveryWay = value["DeliveryWay"].asString(); + productItems_.push_back(productItemsObject); + } + if(!value["PageNumber"].isNull()) + pageNumber_ = std::stoi(value["PageNumber"].asString()); + if(!value["PageSize"].isNull()) + pageSize_ = std::stoi(value["PageSize"].asString()); + if(!value["TotalCount"].isNull()) + totalCount_ = std::stoi(value["TotalCount"].asString()); + +} + +int DescribeProductsResult::getTotalCount()const +{ + return totalCount_; +} + +int DescribeProductsResult::getPageSize()const +{ + return pageSize_; +} + +int DescribeProductsResult::getPageNumber()const +{ + return pageNumber_; +} + +std::vector DescribeProductsResult::getProductItems()const +{ + return productItems_; +} + diff --git a/market/src/model/DescribeRateRequest.cc b/market/src/model/DescribeRateRequest.cc new file mode 100644 index 000000000..dd9cf0c3b --- /dev/null +++ b/market/src/model/DescribeRateRequest.cc @@ -0,0 +1,38 @@ +/* + * 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::Market::Model::DescribeRateRequest; + +DescribeRateRequest::DescribeRateRequest() : + RpcServiceRequest("market", "2015-11-01", "DescribeRate") +{} + +DescribeRateRequest::~DescribeRateRequest() +{} + +std::string DescribeRateRequest::getOrderId()const +{ + return orderId_; +} + +void DescribeRateRequest::setOrderId(const std::string& orderId) +{ + orderId_ = orderId; + setCoreParameter("OrderId", orderId); +} + diff --git a/market/src/model/DescribeRateResult.cc b/market/src/model/DescribeRateResult.cc new file mode 100644 index 000000000..f9e7aa995 --- /dev/null +++ b/market/src/model/DescribeRateResult.cc @@ -0,0 +1,149 @@ +/* + * 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::Market; +using namespace AlibabaCloud::Market::Model; + +DescribeRateResult::DescribeRateResult() : + ServiceResult() +{} + +DescribeRateResult::DescribeRateResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeRateResult::~DescribeRateResult() +{} + +void DescribeRateResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Id"].isNull()) + id_ = std::stol(value["Id"].asString()); + if(!value["OrderId"].isNull()) + orderId_ = value["OrderId"].asString(); + if(!value["InstanceId"].isNull()) + instanceId_ = value["InstanceId"].asString(); + if(!value["AliUid"].isNull()) + aliUid_ = std::stol(value["AliUid"].asString()); + if(!value["ProductId"].isNull()) + productId_ = value["ProductId"].asString(); + if(!value["Score"].isNull()) + score_ = value["Score"].asString(); + if(!value["Content"].isNull()) + content_ = value["Content"].asString(); + if(!value["GmtCreated"].isNull()) + gmtCreated_ = std::stol(value["GmtCreated"].asString()); + if(!value["Explaintion"].isNull()) + explaintion_ = value["Explaintion"].asString(); + if(!value["GmtExplaintion"].isNull()) + gmtExplaintion_ = std::stol(value["GmtExplaintion"].asString()); + if(!value["AdditionalContent"].isNull()) + additionalContent_ = value["AdditionalContent"].asString(); + if(!value["GmtAdditional"].isNull()) + gmtAdditional_ = std::stol(value["GmtAdditional"].asString()); + if(!value["AdditionalExplaintion"].isNull()) + additionalExplaintion_ = value["AdditionalExplaintion"].asString(); + if(!value["GmtAdditionalExplaintion"].isNull()) + gmtAdditionalExplaintion_ = std::stol(value["GmtAdditionalExplaintion"].asString()); + if(!value["Type"].isNull()) + type_ = value["Type"].asString(); + +} + +std::string DescribeRateResult::getInstanceId()const +{ + return instanceId_; +} + +std::string DescribeRateResult::getExplaintion()const +{ + return explaintion_; +} + +long DescribeRateResult::getGmtExplaintion()const +{ + return gmtExplaintion_; +} + +std::string DescribeRateResult::getProductId()const +{ + return productId_; +} + +long DescribeRateResult::getGmtCreated()const +{ + return gmtCreated_; +} + +std::string DescribeRateResult::getAdditionalContent()const +{ + return additionalContent_; +} + +std::string DescribeRateResult::getOrderId()const +{ + return orderId_; +} + +long DescribeRateResult::getGmtAdditionalExplaintion()const +{ + return gmtAdditionalExplaintion_; +} + +std::string DescribeRateResult::getScore()const +{ + return score_; +} + +std::string DescribeRateResult::getType()const +{ + return type_; +} + +std::string DescribeRateResult::getContent()const +{ + return content_; +} + +std::string DescribeRateResult::getAdditionalExplaintion()const +{ + return additionalExplaintion_; +} + +long DescribeRateResult::getId()const +{ + return id_; +} + +long DescribeRateResult::getGmtAdditional()const +{ + return gmtAdditional_; +} + +long DescribeRateResult::getAliUid()const +{ + return aliUid_; +} + diff --git a/market/src/model/NotifyContractEventRequest.cc b/market/src/model/NotifyContractEventRequest.cc new file mode 100644 index 000000000..512116d67 --- /dev/null +++ b/market/src/model/NotifyContractEventRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Market::Model::NotifyContractEventRequest; + +NotifyContractEventRequest::NotifyContractEventRequest() : + RpcServiceRequest("market", "2015-11-01", "NotifyContractEvent") +{} + +NotifyContractEventRequest::~NotifyContractEventRequest() +{} + +std::string NotifyContractEventRequest::getEventMessage()const +{ + return eventMessage_; +} + +void NotifyContractEventRequest::setEventMessage(const std::string& eventMessage) +{ + eventMessage_ = eventMessage; + setCoreParameter("EventMessage", eventMessage); +} + +std::string NotifyContractEventRequest::getEventType()const +{ + return eventType_; +} + +void NotifyContractEventRequest::setEventType(const std::string& eventType) +{ + eventType_ = eventType; + setCoreParameter("EventType", eventType); +} + diff --git a/market/src/model/NotifyContractEventResult.cc b/market/src/model/NotifyContractEventResult.cc new file mode 100644 index 000000000..f5283cbe1 --- /dev/null +++ b/market/src/model/NotifyContractEventResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Market; +using namespace AlibabaCloud::Market::Model; + +NotifyContractEventResult::NotifyContractEventResult() : + ServiceResult() +{} + +NotifyContractEventResult::NotifyContractEventResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +NotifyContractEventResult::~NotifyContractEventResult() +{} + +void NotifyContractEventResult::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"; + +} + +bool NotifyContractEventResult::getSuccess()const +{ + return success_; +} + diff --git a/market/src/model/PushMeteringDataRequest.cc b/market/src/model/PushMeteringDataRequest.cc new file mode 100644 index 000000000..c0e8f64a1 --- /dev/null +++ b/market/src/model/PushMeteringDataRequest.cc @@ -0,0 +1,38 @@ +/* + * 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::Market::Model::PushMeteringDataRequest; + +PushMeteringDataRequest::PushMeteringDataRequest() : + RpcServiceRequest("market", "2015-11-01", "PushMeteringData") +{} + +PushMeteringDataRequest::~PushMeteringDataRequest() +{} + +std::string PushMeteringDataRequest::getMetering()const +{ + return metering_; +} + +void PushMeteringDataRequest::setMetering(const std::string& metering) +{ + metering_ = metering; + setCoreParameter("Metering", metering); +} + diff --git a/market/src/model/PushMeteringDataResult.cc b/market/src/model/PushMeteringDataResult.cc new file mode 100644 index 000000000..346f3e55a --- /dev/null +++ b/market/src/model/PushMeteringDataResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Market; +using namespace AlibabaCloud::Market::Model; + +PushMeteringDataResult::PushMeteringDataResult() : + ServiceResult() +{} + +PushMeteringDataResult::PushMeteringDataResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +PushMeteringDataResult::~PushMeteringDataResult() +{} + +void PushMeteringDataResult::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"; + +} + +bool PushMeteringDataResult::getSuccess()const +{ + return success_; +} + diff --git a/market/src/model/QueryMarketCategoriesRequest.cc b/market/src/model/QueryMarketCategoriesRequest.cc new file mode 100644 index 000000000..c8e30dc2b --- /dev/null +++ b/market/src/model/QueryMarketCategoriesRequest.cc @@ -0,0 +1,38 @@ +/* + * 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::Market::Model::QueryMarketCategoriesRequest; + +QueryMarketCategoriesRequest::QueryMarketCategoriesRequest() : + RpcServiceRequest("market", "2015-11-01", "QueryMarketCategories") +{} + +QueryMarketCategoriesRequest::~QueryMarketCategoriesRequest() +{} + +std::string QueryMarketCategoriesRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void QueryMarketCategoriesRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setCoreParameter("AccessKeyId", accessKeyId); +} + diff --git a/market/src/model/QueryMarketCategoriesResult.cc b/market/src/model/QueryMarketCategoriesResult.cc new file mode 100644 index 000000000..4a5664724 --- /dev/null +++ b/market/src/model/QueryMarketCategoriesResult.cc @@ -0,0 +1,94 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Market; +using namespace AlibabaCloud::Market::Model; + +QueryMarketCategoriesResult::QueryMarketCategoriesResult() : + ServiceResult() +{} + +QueryMarketCategoriesResult::QueryMarketCategoriesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +QueryMarketCategoriesResult::~QueryMarketCategoriesResult() +{} + +void QueryMarketCategoriesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allCategories = value["Categories"]["Category"]; + for (auto value : allCategories) + { + Category categoriesObject; + if(!value["Id"].isNull()) + categoriesObject.id = std::stol(value["Id"].asString()); + if(!value["CategoryCode"].isNull()) + categoriesObject.categoryCode = value["CategoryCode"].asString(); + if(!value["CategoryName"].isNull()) + categoriesObject.categoryName = value["CategoryName"].asString(); + auto allChildCategories = value["ChildCategories"]["ChildCategory"]; + for (auto value : allChildCategories) + { + Category::ChildCategory childCategoriesObject; + if(!value["Id"].isNull()) + childCategoriesObject.id = std::stol(value["Id"].asString()); + if(!value["CategoryCode"].isNull()) + childCategoriesObject.categoryCode = value["CategoryCode"].asString(); + if(!value["CategoryName"].isNull()) + childCategoriesObject.categoryName = value["CategoryName"].asString(); + categoriesObject.childCategories.push_back(childCategoriesObject); + } + categories_.push_back(categoriesObject); + } + if(!value["PageNumber"].isNull()) + pageNumber_ = std::stoi(value["PageNumber"].asString()); + if(!value["PageSize"].isNull()) + pageSize_ = std::stoi(value["PageSize"].asString()); + if(!value["TotalCount"].isNull()) + totalCount_ = std::stoi(value["TotalCount"].asString()); + +} + +int QueryMarketCategoriesResult::getTotalCount()const +{ + return totalCount_; +} + +int QueryMarketCategoriesResult::getPageSize()const +{ + return pageSize_; +} + +std::vector QueryMarketCategoriesResult::getCategories()const +{ + return categories_; +} + +int QueryMarketCategoriesResult::getPageNumber()const +{ + return pageNumber_; +} + diff --git a/market/src/model/QueryMarketImagesRequest.cc b/market/src/model/QueryMarketImagesRequest.cc new file mode 100644 index 000000000..b48070502 --- /dev/null +++ b/market/src/model/QueryMarketImagesRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Market::Model::QueryMarketImagesRequest; + +QueryMarketImagesRequest::QueryMarketImagesRequest() : + RpcServiceRequest("market", "2015-11-01", "QueryMarketImages") +{} + +QueryMarketImagesRequest::~QueryMarketImagesRequest() +{} + +std::string QueryMarketImagesRequest::getParam()const +{ + return param_; +} + +void QueryMarketImagesRequest::setParam(const std::string& param) +{ + param_ = param; + setCoreParameter("Param", param); +} + +std::string QueryMarketImagesRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void QueryMarketImagesRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setCoreParameter("AccessKeyId", accessKeyId); +} + diff --git a/market/src/model/QueryMarketImagesResult.cc b/market/src/model/QueryMarketImagesResult.cc new file mode 100644 index 000000000..cce827455 --- /dev/null +++ b/market/src/model/QueryMarketImagesResult.cc @@ -0,0 +1,191 @@ +/* + * 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::Market; +using namespace AlibabaCloud::Market::Model; + +QueryMarketImagesResult::QueryMarketImagesResult() : + ServiceResult() +{} + +QueryMarketImagesResult::QueryMarketImagesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +QueryMarketImagesResult::~QueryMarketImagesResult() +{} + +void QueryMarketImagesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allResult = value["Result"]["ImageProduct"]; + for (auto value : allResult) + { + ImageProduct resultObject; + if(!value["ImageProductCode"].isNull()) + resultObject.imageProductCode = value["ImageProductCode"].asString(); + if(!value["ProductName"].isNull()) + resultObject.productName = value["ProductName"].asString(); + if(!value["CategoryName"].isNull()) + resultObject.categoryName = value["CategoryName"].asString(); + if(!value["SupplierName"].isNull()) + resultObject.supplierName = value["SupplierName"].asString(); + if(!value["BaseSystem"].isNull()) + resultObject.baseSystem = value["BaseSystem"].asString(); + if(!value["OsKind"].isNull()) + resultObject.osKind = value["OsKind"].asString(); + if(!value["OsBit"].isNull()) + resultObject.osBit = std::stoi(value["OsBit"].asString()); + if(!value["PictureUrl"].isNull()) + resultObject.pictureUrl = value["PictureUrl"].asString(); + if(!value["SmallPicUrl"].isNull()) + resultObject.smallPicUrl = value["SmallPicUrl"].asString(); + if(!value["ShortDescription"].isNull()) + resultObject.shortDescription = value["ShortDescription"].asString(); + if(!value["AgreementUrl"].isNull()) + resultObject.agreementUrl = value["AgreementUrl"].asString(); + if(!value["DetailUrl"].isNull()) + resultObject.detailUrl = value["DetailUrl"].asString(); + if(!value["BuyUrl"].isNull()) + resultObject.buyUrl = value["BuyUrl"].asString(); + if(!value["StoreUrl"].isNull()) + resultObject.storeUrl = value["StoreUrl"].asString(); + if(!value["Score"].isNull()) + resultObject.score = std::stof(value["Score"].asString()); + if(!value["UserCount"].isNull()) + resultObject.userCount = std::stol(value["UserCount"].asString()); + if(!value["SupportIO"].isNull()) + resultObject.supportIO = value["SupportIO"].asString() == "true"; + if(!value["CreatedOn"].isNull()) + resultObject.createdOn = std::stol(value["CreatedOn"].asString()); + auto allImages = value["Images"]["Image"]; + for (auto value : allImages) + { + ImageProduct::Image imagesObject; + if(!value["Version"].isNull()) + imagesObject.version = value["Version"].asString(); + if(!value["VersionDescription"].isNull()) + imagesObject.versionDescription = value["VersionDescription"].asString(); + if(!value["ImageId"].isNull()) + imagesObject.imageId = value["ImageId"].asString(); + if(!value["ImageSize"].isNull()) + imagesObject.imageSize = std::stoi(value["ImageSize"].asString()); + if(!value["Region"].isNull()) + imagesObject.region = value["Region"].asString(); + if(!value["IsDefault"].isNull()) + imagesObject.isDefault = value["IsDefault"].asString() == "true"; + if(!value["SupportIO"].isNull()) + imagesObject.supportIO = value["SupportIO"].asString() == "true"; + auto allDiskDeviceMappings = value["DiskDeviceMappings"]["DiskDeviceMapping"]; + for (auto value : allDiskDeviceMappings) + { + ImageProduct::Image::DiskDeviceMapping diskDeviceMappingsObject; + if(!value["DiskType"].isNull()) + diskDeviceMappingsObject.diskType = value["DiskType"].asString(); + if(!value["Format"].isNull()) + diskDeviceMappingsObject.format = value["Format"].asString(); + if(!value["SnapshotId"].isNull()) + diskDeviceMappingsObject.snapshotId = value["SnapshotId"].asString(); + if(!value["Size"].isNull()) + diskDeviceMappingsObject.size = std::stoi(value["Size"].asString()); + if(!value["Device"].isNull()) + diskDeviceMappingsObject.device = value["Device"].asString(); + if(!value["ImportOSSBucket"].isNull()) + diskDeviceMappingsObject.importOSSBucket = value["ImportOSSBucket"].asString(); + if(!value["ImportOSSObject"].isNull()) + diskDeviceMappingsObject.importOSSObject = value["ImportOSSObject"].asString(); + imagesObject.diskDeviceMappings.push_back(diskDeviceMappingsObject); + } + resultObject.images.push_back(imagesObject); + } + auto quotaNode = value["Quota"]; + if(!quotaNode["TotalQuota"].isNull()) + resultObject.quota.totalQuota = std::stol(quotaNode["TotalQuota"].asString()); + if(!quotaNode["UsingQuota"].isNull()) + resultObject.quota.usingQuota = std::stol(quotaNode["UsingQuota"].asString()); + if(!quotaNode["UnusedQuota"].isNull()) + resultObject.quota.unusedQuota = std::stol(quotaNode["UnusedQuota"].asString()); + auto priceInfoNode = value["PriceInfo"]; + auto allRules = value["Rules"]["Rule"]; + for (auto value : allRules) + { + ImageProduct::PriceInfo::Rule ruleObject; + if(!value["RuleId"].isNull()) + ruleObject.ruleId = std::stol(value["RuleId"].asString()); + if(!value["Title"].isNull()) + ruleObject.title = value["Title"].asString(); + if(!value["Name"].isNull()) + ruleObject.name = value["Name"].asString(); + resultObject.priceInfo.rules.push_back(ruleObject); + } + auto orderNode = priceInfoNode["Order"]; + if(!orderNode["OriginalPrice"].isNull()) + resultObject.priceInfo.order.originalPrice = std::stof(orderNode["OriginalPrice"].asString()); + if(!orderNode["DiscountPrice"].isNull()) + resultObject.priceInfo.order.discountPrice = std::stof(orderNode["DiscountPrice"].asString()); + if(!orderNode["TradePrice"].isNull()) + resultObject.priceInfo.order.tradePrice = std::stof(orderNode["TradePrice"].asString()); + if(!orderNode["Currency"].isNull()) + resultObject.priceInfo.order.currency = orderNode["Currency"].asString(); + if(!orderNode["Period"].isNull()) + resultObject.priceInfo.order.period = std::stoi(orderNode["Period"].asString()); + if(!orderNode["PriceUnit"].isNull()) + resultObject.priceInfo.order.priceUnit = orderNode["PriceUnit"].asString(); + auto allRuleIdSet = orderNode["RuleIdSet"]["RuleId"]; + for (auto value : allRuleIdSet) + resultObject.priceInfo.order.ruleIdSet.push_back(value.asString()); + auto allSkuCodes = value["SkuCodes"]["SkuCode"]; + for (auto value : allSkuCodes) + resultObject.skuCodes.push_back(value.asString()); + result_.push_back(resultObject); + } + if(!value["PageNumber"].isNull()) + pageNumber_ = std::stoi(value["PageNumber"].asString()); + if(!value["PageSize"].isNull()) + pageSize_ = std::stoi(value["PageSize"].asString()); + if(!value["TotalCount"].isNull()) + totalCount_ = std::stoi(value["TotalCount"].asString()); + +} + +int QueryMarketImagesResult::getTotalCount()const +{ + return totalCount_; +} + +int QueryMarketImagesResult::getPageSize()const +{ + return pageSize_; +} + +int QueryMarketImagesResult::getPageNumber()const +{ + return pageNumber_; +} + +std::vector QueryMarketImagesResult::getResult()const +{ + return result_; +} + diff --git a/market/src/model/UpdateCommodityRequest.cc b/market/src/model/UpdateCommodityRequest.cc new file mode 100644 index 000000000..f19cb3a8e --- /dev/null +++ b/market/src/model/UpdateCommodityRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Market::Model::UpdateCommodityRequest; + +UpdateCommodityRequest::UpdateCommodityRequest() : + RpcServiceRequest("market", "2015-11-01", "UpdateCommodity") +{} + +UpdateCommodityRequest::~UpdateCommodityRequest() +{} + +std::string UpdateCommodityRequest::getCommodityId()const +{ + return commodityId_; +} + +void UpdateCommodityRequest::setCommodityId(const std::string& commodityId) +{ + commodityId_ = commodityId; + setCoreParameter("CommodityId", commodityId); +} + +std::string UpdateCommodityRequest::getContent()const +{ + return content_; +} + +void UpdateCommodityRequest::setContent(const std::string& content) +{ + content_ = content; + setCoreParameter("Content", content); +} + diff --git a/market/src/model/UpdateCommodityResult.cc b/market/src/model/UpdateCommodityResult.cc new file mode 100644 index 000000000..c8acf427c --- /dev/null +++ b/market/src/model/UpdateCommodityResult.cc @@ -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. + */ + +#include +#include + +using namespace AlibabaCloud::Market; +using namespace AlibabaCloud::Market::Model; + +UpdateCommodityResult::UpdateCommodityResult() : + ServiceResult() +{} + +UpdateCommodityResult::UpdateCommodityResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UpdateCommodityResult::~UpdateCommodityResult() +{} + +void UpdateCommodityResult::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"; + +} + +bool UpdateCommodityResult::getSuccess()const +{ + return success_; +} + diff --git a/market/src/model/UploadCommodityFileRequest.cc b/market/src/model/UploadCommodityFileRequest.cc new file mode 100644 index 000000000..3ff940451 --- /dev/null +++ b/market/src/model/UploadCommodityFileRequest.cc @@ -0,0 +1,60 @@ +/* + * 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::Market::Model::UploadCommodityFileRequest; + +UploadCommodityFileRequest::UploadCommodityFileRequest() : + RpcServiceRequest("market", "2015-11-01", "UploadCommodityFile") +{} + +UploadCommodityFileRequest::~UploadCommodityFileRequest() +{} + +std::string UploadCommodityFileRequest::getFileResourceType()const +{ + return fileResourceType_; +} + +void UploadCommodityFileRequest::setFileResourceType(const std::string& fileResourceType) +{ + fileResourceType_ = fileResourceType; + setCoreParameter("FileResourceType", fileResourceType); +} + +std::string UploadCommodityFileRequest::getFileResource()const +{ + return fileResource_; +} + +void UploadCommodityFileRequest::setFileResource(const std::string& fileResource) +{ + fileResource_ = fileResource; + setCoreParameter("FileResource", fileResource); +} + +std::string UploadCommodityFileRequest::getFileContentType()const +{ + return fileContentType_; +} + +void UploadCommodityFileRequest::setFileContentType(const std::string& fileContentType) +{ + fileContentType_ = fileContentType; + setCoreParameter("FileContentType", fileContentType); +} + diff --git a/market/src/model/UploadCommodityFileResult.cc b/market/src/model/UploadCommodityFileResult.cc new file mode 100644 index 000000000..2fb036d35 --- /dev/null +++ b/market/src/model/UploadCommodityFileResult.cc @@ -0,0 +1,61 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Market; +using namespace AlibabaCloud::Market::Model; + +UploadCommodityFileResult::UploadCommodityFileResult() : + ServiceResult() +{} + +UploadCommodityFileResult::UploadCommodityFileResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +UploadCommodityFileResult::~UploadCommodityFileResult() +{} + +void UploadCommodityFileResult::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["ResourceType"].isNull()) + data_.resourceType = dataNode["ResourceType"].asString(); + if(!dataNode["Resource"].isNull()) + data_.resource = dataNode["Resource"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +UploadCommodityFileResult::Data UploadCommodityFileResult::getData()const +{ + return data_; +} + +bool UploadCommodityFileResult::getSuccess()const +{ + return success_; +} +