diff --git a/VERSION b/VERSION index b121dff48..9dae7256b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.2107 \ No newline at end of file +1.36.2108 \ No newline at end of file diff --git a/marketplaceintl/CMakeLists.txt b/marketplaceintl/CMakeLists.txt new file mode 100644 index 000000000..32598627c --- /dev/null +++ b/marketplaceintl/CMakeLists.txt @@ -0,0 +1,98 @@ +# +# 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(marketplaceintl_public_header + include/alibabacloud/marketplaceintl/MarketplaceIntlClient.h + include/alibabacloud/marketplaceintl/MarketplaceIntlExport.h ) + +set(marketplaceintl_public_header_model + include/alibabacloud/marketplaceintl/model/DescribePushMeteringDataRequest.h + include/alibabacloud/marketplaceintl/model/DescribePushMeteringDataResult.h + include/alibabacloud/marketplaceintl/model/DescribeSellerInstancesRequest.h + include/alibabacloud/marketplaceintl/model/DescribeSellerInstancesResult.h + include/alibabacloud/marketplaceintl/model/NoticeInstanceUserRequest.h + include/alibabacloud/marketplaceintl/model/NoticeInstanceUserResult.h + include/alibabacloud/marketplaceintl/model/PushMeteringDataRequest.h + include/alibabacloud/marketplaceintl/model/PushMeteringDataResult.h ) + +set(marketplaceintl_src + src/MarketplaceIntlClient.cc + src/model/DescribePushMeteringDataRequest.cc + src/model/DescribePushMeteringDataResult.cc + src/model/DescribeSellerInstancesRequest.cc + src/model/DescribeSellerInstancesResult.cc + src/model/NoticeInstanceUserRequest.cc + src/model/NoticeInstanceUserResult.cc + src/model/PushMeteringDataRequest.cc + src/model/PushMeteringDataResult.cc ) + +add_library(marketplaceintl ${LIB_TYPE} + ${marketplaceintl_public_header} + ${marketplaceintl_public_header_model} + ${marketplaceintl_src}) + +set_target_properties(marketplaceintl + 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}marketplaceintl + ) + +if(${LIB_TYPE} STREQUAL "SHARED") + set_target_properties(marketplaceintl + PROPERTIES + DEFINE_SYMBOL ALIBABACLOUD_MARKETPLACEINTL_LIBRARY) +endif() + +target_include_directories(marketplaceintl + PRIVATE include + ${CMAKE_SOURCE_DIR}/core/include + ) +target_link_libraries(marketplaceintl + core) + +if(CMAKE_HOST_WIN32) + ExternalProject_Get_Property(jsoncpp INSTALL_DIR) + set(jsoncpp_install_dir ${INSTALL_DIR}) + add_dependencies(marketplaceintl + jsoncpp) + target_include_directories(marketplaceintl + PRIVATE ${jsoncpp_install_dir}/include) + target_link_libraries(marketplaceintl + ${jsoncpp_install_dir}/lib/jsoncpp.lib) + set_target_properties(marketplaceintl + PROPERTIES + COMPILE_OPTIONS "/bigobj") +else() + target_include_directories(marketplaceintl + PRIVATE /usr/include/jsoncpp) + target_link_libraries(marketplaceintl + jsoncpp) +endif() + +install(FILES ${marketplaceintl_public_header} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/marketplaceintl) +install(FILES ${marketplaceintl_public_header_model} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/marketplaceintl/model) +install(TARGETS marketplaceintl + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) \ No newline at end of file diff --git a/marketplaceintl/include/alibabacloud/marketplaceintl/MarketplaceIntlClient.h b/marketplaceintl/include/alibabacloud/marketplaceintl/MarketplaceIntlClient.h new file mode 100644 index 000000000..312aa05c4 --- /dev/null +++ b/marketplaceintl/include/alibabacloud/marketplaceintl/MarketplaceIntlClient.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_MARKETPLACEINTL_MARKETPLACEINTLCLIENT_H_ +#define ALIBABACLOUD_MARKETPLACEINTL_MARKETPLACEINTLCLIENT_H_ + +#include +#include +#include +#include +#include "MarketplaceIntlExport.h" +#include "model/DescribePushMeteringDataRequest.h" +#include "model/DescribePushMeteringDataResult.h" +#include "model/DescribeSellerInstancesRequest.h" +#include "model/DescribeSellerInstancesResult.h" +#include "model/NoticeInstanceUserRequest.h" +#include "model/NoticeInstanceUserResult.h" +#include "model/PushMeteringDataRequest.h" +#include "model/PushMeteringDataResult.h" + + +namespace AlibabaCloud +{ + namespace MarketplaceIntl + { + class ALIBABACLOUD_MARKETPLACEINTL_EXPORT MarketplaceIntlClient : public RpcServiceClient + { + public: + typedef Outcome DescribePushMeteringDataOutcome; + typedef std::future DescribePushMeteringDataOutcomeCallable; + typedef std::function&)> DescribePushMeteringDataAsyncHandler; + typedef Outcome DescribeSellerInstancesOutcome; + typedef std::future DescribeSellerInstancesOutcomeCallable; + typedef std::function&)> DescribeSellerInstancesAsyncHandler; + typedef Outcome NoticeInstanceUserOutcome; + typedef std::future NoticeInstanceUserOutcomeCallable; + typedef std::function&)> NoticeInstanceUserAsyncHandler; + typedef Outcome PushMeteringDataOutcome; + typedef std::future PushMeteringDataOutcomeCallable; + typedef std::function&)> PushMeteringDataAsyncHandler; + + MarketplaceIntlClient(const Credentials &credentials, const ClientConfiguration &configuration); + MarketplaceIntlClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); + MarketplaceIntlClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); + ~MarketplaceIntlClient(); + DescribePushMeteringDataOutcome describePushMeteringData(const Model::DescribePushMeteringDataRequest &request)const; + void describePushMeteringDataAsync(const Model::DescribePushMeteringDataRequest& request, const DescribePushMeteringDataAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribePushMeteringDataOutcomeCallable describePushMeteringDataCallable(const Model::DescribePushMeteringDataRequest& request) const; + DescribeSellerInstancesOutcome describeSellerInstances(const Model::DescribeSellerInstancesRequest &request)const; + void describeSellerInstancesAsync(const Model::DescribeSellerInstancesRequest& request, const DescribeSellerInstancesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeSellerInstancesOutcomeCallable describeSellerInstancesCallable(const Model::DescribeSellerInstancesRequest& request) const; + NoticeInstanceUserOutcome noticeInstanceUser(const Model::NoticeInstanceUserRequest &request)const; + void noticeInstanceUserAsync(const Model::NoticeInstanceUserRequest& request, const NoticeInstanceUserAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + NoticeInstanceUserOutcomeCallable noticeInstanceUserCallable(const Model::NoticeInstanceUserRequest& 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; + + private: + std::shared_ptr endpointProvider_; + }; + } +} + +#endif // !ALIBABACLOUD_MARKETPLACEINTL_MARKETPLACEINTLCLIENT_H_ diff --git a/marketplaceintl/include/alibabacloud/marketplaceintl/MarketplaceIntlExport.h b/marketplaceintl/include/alibabacloud/marketplaceintl/MarketplaceIntlExport.h new file mode 100644 index 000000000..162fa559d --- /dev/null +++ b/marketplaceintl/include/alibabacloud/marketplaceintl/MarketplaceIntlExport.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_MARKETPLACEINTL_MARKETPLACEINTLEXPORT_H_ +#define ALIBABACLOUD_MARKETPLACEINTL_MARKETPLACEINTLEXPORT_H_ + +#include + +#if defined(ALIBABACLOUD_SHARED) +# if defined(ALIBABACLOUD_MARKETPLACEINTL_LIBRARY) +# define ALIBABACLOUD_MARKETPLACEINTL_EXPORT ALIBABACLOUD_DECL_EXPORT +# else +# define ALIBABACLOUD_MARKETPLACEINTL_EXPORT ALIBABACLOUD_DECL_IMPORT +# endif +#else +# define ALIBABACLOUD_MARKETPLACEINTL_EXPORT +#endif + +#endif // !ALIBABACLOUD_MARKETPLACEINTL_MARKETPLACEINTLEXPORT_H_ \ No newline at end of file diff --git a/marketplaceintl/include/alibabacloud/marketplaceintl/model/DescribePushMeteringDataRequest.h b/marketplaceintl/include/alibabacloud/marketplaceintl/model/DescribePushMeteringDataRequest.h new file mode 100644 index 000000000..7cbd84b92 --- /dev/null +++ b/marketplaceintl/include/alibabacloud/marketplaceintl/model/DescribePushMeteringDataRequest.h @@ -0,0 +1,42 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_MARKETPLACEINTL_MODEL_DESCRIBEPUSHMETERINGDATAREQUEST_H_ +#define ALIBABACLOUD_MARKETPLACEINTL_MODEL_DESCRIBEPUSHMETERINGDATAREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace MarketplaceIntl { +namespace Model { +class ALIBABACLOUD_MARKETPLACEINTL_EXPORT DescribePushMeteringDataRequest : public RpcServiceRequest { +public: + DescribePushMeteringDataRequest(); + ~DescribePushMeteringDataRequest(); + std::string getPushOrderBizId() const; + void setPushOrderBizId(const std::string &pushOrderBizId); + +private: + std::string pushOrderBizId_; +}; +} // namespace Model +} // namespace MarketplaceIntl +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_MARKETPLACEINTL_MODEL_DESCRIBEPUSHMETERINGDATAREQUEST_H_ diff --git a/marketplaceintl/include/alibabacloud/marketplaceintl/model/DescribePushMeteringDataResult.h b/marketplaceintl/include/alibabacloud/marketplaceintl/model/DescribePushMeteringDataResult.h new file mode 100644 index 000000000..0d115575f --- /dev/null +++ b/marketplaceintl/include/alibabacloud/marketplaceintl/model/DescribePushMeteringDataResult.h @@ -0,0 +1,71 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_MARKETPLACEINTL_MODEL_DESCRIBEPUSHMETERINGDATARESULT_H_ +#define ALIBABACLOUD_MARKETPLACEINTL_MODEL_DESCRIBEPUSHMETERINGDATARESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace MarketplaceIntl + { + namespace Model + { + class ALIBABACLOUD_MARKETPLACEINTL_EXPORT DescribePushMeteringDataResult : public ServiceResult + { + public: + struct Result + { + bool isPushBilling; + std::string meteringEntity; + long endTime; + std::string instanceId; + long startTime; + std::string pushOrderBizId; + std::string meteringAssist; + }; + + + DescribePushMeteringDataResult(); + explicit DescribePushMeteringDataResult(const std::string &payload); + ~DescribePushMeteringDataResult(); + std::string getMessage()const; + bool getForceFatal()const; + std::string getDynamicMessage()const; + std::string getCode()const; + bool getSuccess()const; + Result getResult()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + bool forceFatal_; + std::string dynamicMessage_; + std::string code_; + bool success_; + Result result_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKETPLACEINTL_MODEL_DESCRIBEPUSHMETERINGDATARESULT_H_ \ No newline at end of file diff --git a/marketplaceintl/include/alibabacloud/marketplaceintl/model/DescribeSellerInstancesRequest.h b/marketplaceintl/include/alibabacloud/marketplaceintl/model/DescribeSellerInstancesRequest.h new file mode 100644 index 000000000..ff0440635 --- /dev/null +++ b/marketplaceintl/include/alibabacloud/marketplaceintl/model/DescribeSellerInstancesRequest.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_MARKETPLACEINTL_MODEL_DESCRIBESELLERINSTANCESREQUEST_H_ +#define ALIBABACLOUD_MARKETPLACEINTL_MODEL_DESCRIBESELLERINSTANCESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace MarketplaceIntl { +namespace Model { +class ALIBABACLOUD_MARKETPLACEINTL_EXPORT DescribeSellerInstancesRequest : public RpcServiceRequest { +public: + DescribeSellerInstancesRequest(); + ~DescribeSellerInstancesRequest(); + std::string getInstanceStatus() const; + void setInstanceStatus(const std::string &instanceStatus); + long getUserId() const; + void setUserId(long userId); + long getInstanceId() const; + void setInstanceId(long instanceId); + long getPageSize() const; + void setPageSize(long pageSize); + int getPageIndex() const; + void setPageIndex(int pageIndex); + +private: + std::string instanceStatus_; + long userId_; + long instanceId_; + long pageSize_; + int pageIndex_; +}; +} // namespace Model +} // namespace MarketplaceIntl +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_MARKETPLACEINTL_MODEL_DESCRIBESELLERINSTANCESREQUEST_H_ diff --git a/marketplaceintl/include/alibabacloud/marketplaceintl/model/DescribeSellerInstancesResult.h b/marketplaceintl/include/alibabacloud/marketplaceintl/model/DescribeSellerInstancesResult.h new file mode 100644 index 000000000..7c9e7d0dd --- /dev/null +++ b/marketplaceintl/include/alibabacloud/marketplaceintl/model/DescribeSellerInstancesResult.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_MARKETPLACEINTL_MODEL_DESCRIBESELLERINSTANCESRESULT_H_ +#define ALIBABACLOUD_MARKETPLACEINTL_MODEL_DESCRIBESELLERINSTANCESRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace MarketplaceIntl + { + namespace Model + { + class ALIBABACLOUD_MARKETPLACEINTL_EXPORT DescribeSellerInstancesResult : public ServiceResult + { + public: + struct ResultItem + { + long instanceId; + std::string instanceStatus; + long userId; + int chargeType; + std::string commodityCode; + long createdOn; + std::string info; + std::string hostInfo; + std::string appInfo; + }; + + + DescribeSellerInstancesResult(); + explicit DescribeSellerInstancesResult(const std::string &payload); + ~DescribeSellerInstancesResult(); + long getPageSize()const; + std::string getMessage()const; + long getPageNumber()const; + std::string getVersion()const; + long getCount()const; + bool getFatal()const; + std::string getCode()const; + bool getSuccess()const; + std::vector getResult()const; + + protected: + void parse(const std::string &payload); + private: + long pageSize_; + std::string message_; + long pageNumber_; + std::string version_; + long count_; + bool fatal_; + std::string code_; + bool success_; + std::vector result_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKETPLACEINTL_MODEL_DESCRIBESELLERINSTANCESRESULT_H_ \ No newline at end of file diff --git a/marketplaceintl/include/alibabacloud/marketplaceintl/model/NoticeInstanceUserRequest.h b/marketplaceintl/include/alibabacloud/marketplaceintl/model/NoticeInstanceUserRequest.h new file mode 100644 index 000000000..4af0e0b8e --- /dev/null +++ b/marketplaceintl/include/alibabacloud/marketplaceintl/model/NoticeInstanceUserRequest.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_MARKETPLACEINTL_MODEL_NOTICEINSTANCEUSERREQUEST_H_ +#define ALIBABACLOUD_MARKETPLACEINTL_MODEL_NOTICEINSTANCEUSERREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace MarketplaceIntl { +namespace Model { +class ALIBABACLOUD_MARKETPLACEINTL_EXPORT NoticeInstanceUserRequest : public RpcServiceRequest { +public: + NoticeInstanceUserRequest(); + ~NoticeInstanceUserRequest(); + std::string getNoticeParam() const; + void setNoticeParam(const std::string ¬iceParam); + long getInstanceId() const; + void setInstanceId(long instanceId); + long getNoticeType() const; + void setNoticeType(long noticeType); + +private: + std::string noticeParam_; + long instanceId_; + long noticeType_; +}; +} // namespace Model +} // namespace MarketplaceIntl +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_MARKETPLACEINTL_MODEL_NOTICEINSTANCEUSERREQUEST_H_ diff --git a/marketplaceintl/include/alibabacloud/marketplaceintl/model/NoticeInstanceUserResult.h b/marketplaceintl/include/alibabacloud/marketplaceintl/model/NoticeInstanceUserResult.h new file mode 100644 index 000000000..044e502de --- /dev/null +++ b/marketplaceintl/include/alibabacloud/marketplaceintl/model/NoticeInstanceUserResult.h @@ -0,0 +1,69 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_MARKETPLACEINTL_MODEL_NOTICEINSTANCEUSERRESULT_H_ +#define ALIBABACLOUD_MARKETPLACEINTL_MODEL_NOTICEINSTANCEUSERRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace MarketplaceIntl + { + namespace Model + { + class ALIBABACLOUD_MARKETPLACEINTL_EXPORT NoticeInstanceUserResult : public ServiceResult + { + public: + struct AccessDeniedDetail + { + std::string policyType; + std::string authPrincipalOwnerId; + std::string encodedDiagnosticMessage; + std::string authPrincipalType; + std::string authPrincipalDisplayName; + std::string noPermissionType; + std::string authAction; + }; + + + NoticeInstanceUserResult(); + explicit NoticeInstanceUserResult(const std::string &payload); + ~NoticeInstanceUserResult(); + AccessDeniedDetail getAccessDeniedDetail()const; + std::string getMessage()const; + std::string getCode()const; + bool getSuccess()const; + bool getResult()const; + + protected: + void parse(const std::string &payload); + private: + AccessDeniedDetail accessDeniedDetail_; + std::string message_; + std::string code_; + bool success_; + bool result_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKETPLACEINTL_MODEL_NOTICEINSTANCEUSERRESULT_H_ \ No newline at end of file diff --git a/marketplaceintl/include/alibabacloud/marketplaceintl/model/PushMeteringDataRequest.h b/marketplaceintl/include/alibabacloud/marketplaceintl/model/PushMeteringDataRequest.h new file mode 100644 index 000000000..c4717a80d --- /dev/null +++ b/marketplaceintl/include/alibabacloud/marketplaceintl/model/PushMeteringDataRequest.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_MARKETPLACEINTL_MODEL_PUSHMETERINGDATAREQUEST_H_ +#define ALIBABACLOUD_MARKETPLACEINTL_MODEL_PUSHMETERINGDATAREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace MarketplaceIntl { +namespace Model { +class ALIBABACLOUD_MARKETPLACEINTL_EXPORT PushMeteringDataRequest : public RpcServiceRequest { +public: + struct MeteringData { + std::string meteringAssist; + std::string pushOrderBizId; + std::string instanceId; + long endTime; + long startTime; + std::string meteringEntity; + }; + PushMeteringDataRequest(); + ~PushMeteringDataRequest(); + std::vector getMeteringData() const; + void setMeteringData(const std::vector &meteringData); + std::string getGmtCreate() const; + void setGmtCreate(const std::string &gmtCreate); + +private: + std::vector meteringData_; + std::string gmtCreate_; +}; +} // namespace Model +} // namespace MarketplaceIntl +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_MARKETPLACEINTL_MODEL_PUSHMETERINGDATAREQUEST_H_ diff --git a/marketplaceintl/include/alibabacloud/marketplaceintl/model/PushMeteringDataResult.h b/marketplaceintl/include/alibabacloud/marketplaceintl/model/PushMeteringDataResult.h new file mode 100644 index 000000000..0e3512ded --- /dev/null +++ b/marketplaceintl/include/alibabacloud/marketplaceintl/model/PushMeteringDataResult.h @@ -0,0 +1,61 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_MARKETPLACEINTL_MODEL_PUSHMETERINGDATARESULT_H_ +#define ALIBABACLOUD_MARKETPLACEINTL_MODEL_PUSHMETERINGDATARESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace MarketplaceIntl + { + namespace Model + { + class ALIBABACLOUD_MARKETPLACEINTL_EXPORT PushMeteringDataResult : public ServiceResult + { + public: + + + PushMeteringDataResult(); + explicit PushMeteringDataResult(const std::string &payload); + ~PushMeteringDataResult(); + std::string getMessage()const; + bool getForceFatal()const; + std::string getDynamicMessage()const; + std::string getCode()const; + bool getSuccess()const; + bool getResult()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + bool forceFatal_; + std::string dynamicMessage_; + std::string code_; + bool success_; + bool result_; + + }; + } + } +} +#endif // !ALIBABACLOUD_MARKETPLACEINTL_MODEL_PUSHMETERINGDATARESULT_H_ \ No newline at end of file diff --git a/marketplaceintl/src/MarketplaceIntlClient.cc b/marketplaceintl/src/MarketplaceIntlClient.cc new file mode 100644 index 000000000..2674ede51 --- /dev/null +++ b/marketplaceintl/src/MarketplaceIntlClient.cc @@ -0,0 +1,197 @@ +/* + * 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::MarketplaceIntl; +using namespace AlibabaCloud::MarketplaceIntl::Model; + +namespace +{ + const std::string SERVICE_NAME = "marketplaceIntl"; +} + +MarketplaceIntlClient::MarketplaceIntlClient(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, ""); +} + +MarketplaceIntlClient::MarketplaceIntlClient(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, ""); +} + +MarketplaceIntlClient::MarketplaceIntlClient(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, ""); +} + +MarketplaceIntlClient::~MarketplaceIntlClient() +{} + +MarketplaceIntlClient::DescribePushMeteringDataOutcome MarketplaceIntlClient::describePushMeteringData(const DescribePushMeteringDataRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribePushMeteringDataOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribePushMeteringDataOutcome(DescribePushMeteringDataResult(outcome.result())); + else + return DescribePushMeteringDataOutcome(outcome.error()); +} + +void MarketplaceIntlClient::describePushMeteringDataAsync(const DescribePushMeteringDataRequest& request, const DescribePushMeteringDataAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describePushMeteringData(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketplaceIntlClient::DescribePushMeteringDataOutcomeCallable MarketplaceIntlClient::describePushMeteringDataCallable(const DescribePushMeteringDataRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describePushMeteringData(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketplaceIntlClient::DescribeSellerInstancesOutcome MarketplaceIntlClient::describeSellerInstances(const DescribeSellerInstancesRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeSellerInstancesOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeSellerInstancesOutcome(DescribeSellerInstancesResult(outcome.result())); + else + return DescribeSellerInstancesOutcome(outcome.error()); +} + +void MarketplaceIntlClient::describeSellerInstancesAsync(const DescribeSellerInstancesRequest& request, const DescribeSellerInstancesAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeSellerInstances(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketplaceIntlClient::DescribeSellerInstancesOutcomeCallable MarketplaceIntlClient::describeSellerInstancesCallable(const DescribeSellerInstancesRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeSellerInstances(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketplaceIntlClient::NoticeInstanceUserOutcome MarketplaceIntlClient::noticeInstanceUser(const NoticeInstanceUserRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return NoticeInstanceUserOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return NoticeInstanceUserOutcome(NoticeInstanceUserResult(outcome.result())); + else + return NoticeInstanceUserOutcome(outcome.error()); +} + +void MarketplaceIntlClient::noticeInstanceUserAsync(const NoticeInstanceUserRequest& request, const NoticeInstanceUserAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, noticeInstanceUser(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +MarketplaceIntlClient::NoticeInstanceUserOutcomeCallable MarketplaceIntlClient::noticeInstanceUserCallable(const NoticeInstanceUserRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->noticeInstanceUser(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +MarketplaceIntlClient::PushMeteringDataOutcome MarketplaceIntlClient::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 MarketplaceIntlClient::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)); +} + +MarketplaceIntlClient::PushMeteringDataOutcomeCallable MarketplaceIntlClient::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(); +} + diff --git a/marketplaceintl/src/model/DescribePushMeteringDataRequest.cc b/marketplaceintl/src/model/DescribePushMeteringDataRequest.cc new file mode 100644 index 000000000..101001922 --- /dev/null +++ b/marketplaceintl/src/model/DescribePushMeteringDataRequest.cc @@ -0,0 +1,36 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::MarketplaceIntl::Model::DescribePushMeteringDataRequest; + +DescribePushMeteringDataRequest::DescribePushMeteringDataRequest() + : RpcServiceRequest("marketplaceintl", "2022-12-30", "DescribePushMeteringData") { + setMethod(HttpRequest::Method::Post); +} + +DescribePushMeteringDataRequest::~DescribePushMeteringDataRequest() {} + +std::string DescribePushMeteringDataRequest::getPushOrderBizId() const { + return pushOrderBizId_; +} + +void DescribePushMeteringDataRequest::setPushOrderBizId(const std::string &pushOrderBizId) { + pushOrderBizId_ = pushOrderBizId; + setParameter(std::string("PushOrderBizId"), pushOrderBizId); +} + diff --git a/marketplaceintl/src/model/DescribePushMeteringDataResult.cc b/marketplaceintl/src/model/DescribePushMeteringDataResult.cc new file mode 100644 index 000000000..cc6cafd90 --- /dev/null +++ b/marketplaceintl/src/model/DescribePushMeteringDataResult.cc @@ -0,0 +1,99 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::MarketplaceIntl; +using namespace AlibabaCloud::MarketplaceIntl::Model; + +DescribePushMeteringDataResult::DescribePushMeteringDataResult() : + ServiceResult() +{} + +DescribePushMeteringDataResult::DescribePushMeteringDataResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribePushMeteringDataResult::~DescribePushMeteringDataResult() +{} + +void DescribePushMeteringDataResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto resultNode = value["Result"]; + if(!resultNode["EndTime"].isNull()) + result_.endTime = std::stol(resultNode["EndTime"].asString()); + if(!resultNode["InstanceId"].isNull()) + result_.instanceId = resultNode["InstanceId"].asString(); + if(!resultNode["IsPushBilling"].isNull()) + result_.isPushBilling = resultNode["IsPushBilling"].asString() == "true"; + if(!resultNode["MeteringAssist"].isNull()) + result_.meteringAssist = resultNode["MeteringAssist"].asString(); + if(!resultNode["MeteringEntity"].isNull()) + result_.meteringEntity = resultNode["MeteringEntity"].asString(); + if(!resultNode["PushOrderBizId"].isNull()) + result_.pushOrderBizId = resultNode["PushOrderBizId"].asString(); + if(!resultNode["StartTime"].isNull()) + result_.startTime = std::stol(resultNode["StartTime"].asString()); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + if(!value["ForceFatal"].isNull()) + forceFatal_ = value["ForceFatal"].asString() == "true"; + if(!value["DynamicMessage"].isNull()) + dynamicMessage_ = value["DynamicMessage"].asString(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string DescribePushMeteringDataResult::getMessage()const +{ + return message_; +} + +bool DescribePushMeteringDataResult::getForceFatal()const +{ + return forceFatal_; +} + +std::string DescribePushMeteringDataResult::getDynamicMessage()const +{ + return dynamicMessage_; +} + +std::string DescribePushMeteringDataResult::getCode()const +{ + return code_; +} + +bool DescribePushMeteringDataResult::getSuccess()const +{ + return success_; +} + +DescribePushMeteringDataResult::Result DescribePushMeteringDataResult::getResult()const +{ + return result_; +} + diff --git a/marketplaceintl/src/model/DescribeSellerInstancesRequest.cc b/marketplaceintl/src/model/DescribeSellerInstancesRequest.cc new file mode 100644 index 000000000..0d7daf0fd --- /dev/null +++ b/marketplaceintl/src/model/DescribeSellerInstancesRequest.cc @@ -0,0 +1,72 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::MarketplaceIntl::Model::DescribeSellerInstancesRequest; + +DescribeSellerInstancesRequest::DescribeSellerInstancesRequest() + : RpcServiceRequest("marketplaceintl", "2022-12-30", "DescribeSellerInstances") { + setMethod(HttpRequest::Method::Post); +} + +DescribeSellerInstancesRequest::~DescribeSellerInstancesRequest() {} + +std::string DescribeSellerInstancesRequest::getInstanceStatus() const { + return instanceStatus_; +} + +void DescribeSellerInstancesRequest::setInstanceStatus(const std::string &instanceStatus) { + instanceStatus_ = instanceStatus; + setParameter(std::string("InstanceStatus"), instanceStatus); +} + +long DescribeSellerInstancesRequest::getUserId() const { + return userId_; +} + +void DescribeSellerInstancesRequest::setUserId(long userId) { + userId_ = userId; + setParameter(std::string("UserId"), std::to_string(userId)); +} + +long DescribeSellerInstancesRequest::getInstanceId() const { + return instanceId_; +} + +void DescribeSellerInstancesRequest::setInstanceId(long instanceId) { + instanceId_ = instanceId; + setParameter(std::string("InstanceId"), std::to_string(instanceId)); +} + +long DescribeSellerInstancesRequest::getPageSize() const { + return pageSize_; +} + +void DescribeSellerInstancesRequest::setPageSize(long pageSize) { + pageSize_ = pageSize; + setParameter(std::string("PageSize"), std::to_string(pageSize)); +} + +int DescribeSellerInstancesRequest::getPageIndex() const { + return pageIndex_; +} + +void DescribeSellerInstancesRequest::setPageIndex(int pageIndex) { + pageIndex_ = pageIndex; + setParameter(std::string("PageIndex"), std::to_string(pageIndex)); +} + diff --git a/marketplaceintl/src/model/DescribeSellerInstancesResult.cc b/marketplaceintl/src/model/DescribeSellerInstancesResult.cc new file mode 100644 index 000000000..d5bc05929 --- /dev/null +++ b/marketplaceintl/src/model/DescribeSellerInstancesResult.cc @@ -0,0 +1,129 @@ +/* + * 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::MarketplaceIntl; +using namespace AlibabaCloud::MarketplaceIntl::Model; + +DescribeSellerInstancesResult::DescribeSellerInstancesResult() : + ServiceResult() +{} + +DescribeSellerInstancesResult::DescribeSellerInstancesResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeSellerInstancesResult::~DescribeSellerInstancesResult() +{} + +void DescribeSellerInstancesResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allResultNode = value["Result"]["ResultItem"]; + for (auto valueResultResultItem : allResultNode) + { + ResultItem resultObject; + if(!valueResultResultItem["AppInfo"].isNull()) + resultObject.appInfo = valueResultResultItem["AppInfo"].asString(); + if(!valueResultResultItem["CommodityCode"].isNull()) + resultObject.commodityCode = valueResultResultItem["CommodityCode"].asString(); + if(!valueResultResultItem["CreatedOn"].isNull()) + resultObject.createdOn = std::stol(valueResultResultItem["CreatedOn"].asString()); + if(!valueResultResultItem["InstanceId"].isNull()) + resultObject.instanceId = std::stol(valueResultResultItem["InstanceId"].asString()); + if(!valueResultResultItem["InstanceStatus"].isNull()) + resultObject.instanceStatus = valueResultResultItem["InstanceStatus"].asString(); + if(!valueResultResultItem["UserId"].isNull()) + resultObject.userId = std::stol(valueResultResultItem["UserId"].asString()); + if(!valueResultResultItem["HostInfo"].isNull()) + resultObject.hostInfo = valueResultResultItem["HostInfo"].asString(); + if(!valueResultResultItem["Info"].isNull()) + resultObject.info = valueResultResultItem["Info"].asString(); + if(!valueResultResultItem["ChargeType"].isNull()) + resultObject.chargeType = std::stoi(valueResultResultItem["ChargeType"].asString()); + result_.push_back(resultObject); + } + if(!value["PageSize"].isNull()) + pageSize_ = std::stol(value["PageSize"].asString()); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + if(!value["PageNumber"].isNull()) + pageNumber_ = std::stol(value["PageNumber"].asString()); + if(!value["Version"].isNull()) + version_ = value["Version"].asString(); + if(!value["Count"].isNull()) + count_ = std::stol(value["Count"].asString()); + if(!value["Fatal"].isNull()) + fatal_ = value["Fatal"].asString() == "true"; + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +long DescribeSellerInstancesResult::getPageSize()const +{ + return pageSize_; +} + +std::string DescribeSellerInstancesResult::getMessage()const +{ + return message_; +} + +long DescribeSellerInstancesResult::getPageNumber()const +{ + return pageNumber_; +} + +std::string DescribeSellerInstancesResult::getVersion()const +{ + return version_; +} + +long DescribeSellerInstancesResult::getCount()const +{ + return count_; +} + +bool DescribeSellerInstancesResult::getFatal()const +{ + return fatal_; +} + +std::string DescribeSellerInstancesResult::getCode()const +{ + return code_; +} + +bool DescribeSellerInstancesResult::getSuccess()const +{ + return success_; +} + +std::vector DescribeSellerInstancesResult::getResult()const +{ + return result_; +} + diff --git a/marketplaceintl/src/model/NoticeInstanceUserRequest.cc b/marketplaceintl/src/model/NoticeInstanceUserRequest.cc new file mode 100644 index 000000000..9827e3151 --- /dev/null +++ b/marketplaceintl/src/model/NoticeInstanceUserRequest.cc @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::MarketplaceIntl::Model::NoticeInstanceUserRequest; + +NoticeInstanceUserRequest::NoticeInstanceUserRequest() + : RpcServiceRequest("marketplaceintl", "2022-12-30", "NoticeInstanceUser") { + setMethod(HttpRequest::Method::Post); +} + +NoticeInstanceUserRequest::~NoticeInstanceUserRequest() {} + +std::string NoticeInstanceUserRequest::getNoticeParam() const { + return noticeParam_; +} + +void NoticeInstanceUserRequest::setNoticeParam(const std::string ¬iceParam) { + noticeParam_ = noticeParam; + setBodyParameter(std::string("NoticeParam"), noticeParam); +} + +long NoticeInstanceUserRequest::getInstanceId() const { + return instanceId_; +} + +void NoticeInstanceUserRequest::setInstanceId(long instanceId) { + instanceId_ = instanceId; + setBodyParameter(std::string("InstanceId"), std::to_string(instanceId)); +} + +long NoticeInstanceUserRequest::getNoticeType() const { + return noticeType_; +} + +void NoticeInstanceUserRequest::setNoticeType(long noticeType) { + noticeType_ = noticeType; + setBodyParameter(std::string("NoticeType"), std::to_string(noticeType)); +} + diff --git a/marketplaceintl/src/model/NoticeInstanceUserResult.cc b/marketplaceintl/src/model/NoticeInstanceUserResult.cc new file mode 100644 index 000000000..6596c3851 --- /dev/null +++ b/marketplaceintl/src/model/NoticeInstanceUserResult.cc @@ -0,0 +1,92 @@ +/* + * 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::MarketplaceIntl; +using namespace AlibabaCloud::MarketplaceIntl::Model; + +NoticeInstanceUserResult::NoticeInstanceUserResult() : + ServiceResult() +{} + +NoticeInstanceUserResult::NoticeInstanceUserResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +NoticeInstanceUserResult::~NoticeInstanceUserResult() +{} + +void NoticeInstanceUserResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto accessDeniedDetailNode = value["AccessDeniedDetail"]; + if(!accessDeniedDetailNode["AuthAction"].isNull()) + accessDeniedDetail_.authAction = accessDeniedDetailNode["AuthAction"].asString(); + if(!accessDeniedDetailNode["AuthPrincipalDisplayName"].isNull()) + accessDeniedDetail_.authPrincipalDisplayName = accessDeniedDetailNode["AuthPrincipalDisplayName"].asString(); + if(!accessDeniedDetailNode["AuthPrincipalOwnerId"].isNull()) + accessDeniedDetail_.authPrincipalOwnerId = accessDeniedDetailNode["AuthPrincipalOwnerId"].asString(); + if(!accessDeniedDetailNode["AuthPrincipalType"].isNull()) + accessDeniedDetail_.authPrincipalType = accessDeniedDetailNode["AuthPrincipalType"].asString(); + if(!accessDeniedDetailNode["EncodedDiagnosticMessage"].isNull()) + accessDeniedDetail_.encodedDiagnosticMessage = accessDeniedDetailNode["EncodedDiagnosticMessage"].asString(); + if(!accessDeniedDetailNode["NoPermissionType"].isNull()) + accessDeniedDetail_.noPermissionType = accessDeniedDetailNode["NoPermissionType"].asString(); + if(!accessDeniedDetailNode["PolicyType"].isNull()) + accessDeniedDetail_.policyType = accessDeniedDetailNode["PolicyType"].asString(); + if(!value["Result"].isNull()) + result_ = value["Result"].asString() == "true"; + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +NoticeInstanceUserResult::AccessDeniedDetail NoticeInstanceUserResult::getAccessDeniedDetail()const +{ + return accessDeniedDetail_; +} + +std::string NoticeInstanceUserResult::getMessage()const +{ + return message_; +} + +std::string NoticeInstanceUserResult::getCode()const +{ + return code_; +} + +bool NoticeInstanceUserResult::getSuccess()const +{ + return success_; +} + +bool NoticeInstanceUserResult::getResult()const +{ + return result_; +} + diff --git a/marketplaceintl/src/model/PushMeteringDataRequest.cc b/marketplaceintl/src/model/PushMeteringDataRequest.cc new file mode 100644 index 000000000..8051c85c7 --- /dev/null +++ b/marketplaceintl/src/model/PushMeteringDataRequest.cc @@ -0,0 +1,54 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::MarketplaceIntl::Model::PushMeteringDataRequest; + +PushMeteringDataRequest::PushMeteringDataRequest() + : RpcServiceRequest("marketplaceintl", "2022-12-30", "PushMeteringData") { + setMethod(HttpRequest::Method::Post); +} + +PushMeteringDataRequest::~PushMeteringDataRequest() {} + +std::vector PushMeteringDataRequest::getMeteringData() const { + return meteringData_; +} + +void PushMeteringDataRequest::setMeteringData(const std::vector &meteringData) { + meteringData_ = meteringData; + for(int dep1 = 0; dep1 != meteringData.size(); dep1++) { + auto meteringDataObj = meteringData.at(dep1); + std::string meteringDataObjStr = std::string("MeteringData") + "." + std::to_string(dep1 + 1); + setBodyParameter(meteringDataObjStr + ".MeteringAssist", meteringDataObj.meteringAssist); + setBodyParameter(meteringDataObjStr + ".PushOrderBizId", meteringDataObj.pushOrderBizId); + setBodyParameter(meteringDataObjStr + ".InstanceId", meteringDataObj.instanceId); + setBodyParameter(meteringDataObjStr + ".EndTime", std::to_string(meteringDataObj.endTime)); + setBodyParameter(meteringDataObjStr + ".StartTime", std::to_string(meteringDataObj.startTime)); + setBodyParameter(meteringDataObjStr + ".MeteringEntity", meteringDataObj.meteringEntity); + } +} + +std::string PushMeteringDataRequest::getGmtCreate() const { + return gmtCreate_; +} + +void PushMeteringDataRequest::setGmtCreate(const std::string &gmtCreate) { + gmtCreate_ = gmtCreate; + setBodyParameter(std::string("GmtCreate"), gmtCreate); +} + diff --git a/marketplaceintl/src/model/PushMeteringDataResult.cc b/marketplaceintl/src/model/PushMeteringDataResult.cc new file mode 100644 index 000000000..cd31f3929 --- /dev/null +++ b/marketplaceintl/src/model/PushMeteringDataResult.cc @@ -0,0 +1,86 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::MarketplaceIntl; +using namespace AlibabaCloud::MarketplaceIntl::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["Result"].isNull()) + result_ = value["Result"].asString() == "true"; + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + if(!value["ForceFatal"].isNull()) + forceFatal_ = value["ForceFatal"].asString() == "true"; + if(!value["DynamicMessage"].isNull()) + dynamicMessage_ = value["DynamicMessage"].asString(); + +} + +std::string PushMeteringDataResult::getMessage()const +{ + return message_; +} + +bool PushMeteringDataResult::getForceFatal()const +{ + return forceFatal_; +} + +std::string PushMeteringDataResult::getDynamicMessage()const +{ + return dynamicMessage_; +} + +std::string PushMeteringDataResult::getCode()const +{ + return code_; +} + +bool PushMeteringDataResult::getSuccess()const +{ + return success_; +} + +bool PushMeteringDataResult::getResult()const +{ + return result_; +} +