Generated 2022-12-30 for marketplaceIntl.
This commit is contained in:
98
marketplaceintl/CMakeLists.txt
Normal file
98
marketplaceintl/CMakeLists.txt
Normal file
@@ -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}
|
||||||
|
)
|
||||||
@@ -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 <future>
|
||||||
|
#include <alibabacloud/core/AsyncCallerContext.h>
|
||||||
|
#include <alibabacloud/core/EndpointProvider.h>
|
||||||
|
#include <alibabacloud/core/RpcServiceClient.h>
|
||||||
|
#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<Error, Model::DescribePushMeteringDataResult> DescribePushMeteringDataOutcome;
|
||||||
|
typedef std::future<DescribePushMeteringDataOutcome> DescribePushMeteringDataOutcomeCallable;
|
||||||
|
typedef std::function<void(const MarketplaceIntlClient*, const Model::DescribePushMeteringDataRequest&, const DescribePushMeteringDataOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribePushMeteringDataAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::DescribeSellerInstancesResult> DescribeSellerInstancesOutcome;
|
||||||
|
typedef std::future<DescribeSellerInstancesOutcome> DescribeSellerInstancesOutcomeCallable;
|
||||||
|
typedef std::function<void(const MarketplaceIntlClient*, const Model::DescribeSellerInstancesRequest&, const DescribeSellerInstancesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeSellerInstancesAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::NoticeInstanceUserResult> NoticeInstanceUserOutcome;
|
||||||
|
typedef std::future<NoticeInstanceUserOutcome> NoticeInstanceUserOutcomeCallable;
|
||||||
|
typedef std::function<void(const MarketplaceIntlClient*, const Model::NoticeInstanceUserRequest&, const NoticeInstanceUserOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> NoticeInstanceUserAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::PushMeteringDataResult> PushMeteringDataOutcome;
|
||||||
|
typedef std::future<PushMeteringDataOutcome> PushMeteringDataOutcomeCallable;
|
||||||
|
typedef std::function<void(const MarketplaceIntlClient*, const Model::PushMeteringDataRequest&, const PushMeteringDataOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> PushMeteringDataAsyncHandler;
|
||||||
|
|
||||||
|
MarketplaceIntlClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||||
|
MarketplaceIntlClient(const std::shared_ptr<CredentialsProvider> &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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& 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<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
PushMeteringDataOutcomeCallable pushMeteringDataCallable(const Model::PushMeteringDataRequest& request) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // !ALIBABACLOUD_MARKETPLACEINTL_MARKETPLACEINTLCLIENT_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 <alibabacloud/core/Global.h>
|
||||||
|
|
||||||
|
#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_
|
||||||
@@ -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 <alibabacloud/marketplaceintl/MarketplaceIntlExport.h>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
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_
|
||||||
@@ -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 <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/marketplaceintl/MarketplaceIntlExport.h>
|
||||||
|
|
||||||
|
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_
|
||||||
@@ -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 <alibabacloud/marketplaceintl/MarketplaceIntlExport.h>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
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_
|
||||||
@@ -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 <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/marketplaceintl/MarketplaceIntlExport.h>
|
||||||
|
|
||||||
|
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<ResultItem> 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<ResultItem> result_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_MARKETPLACEINTL_MODEL_DESCRIBESELLERINSTANCESRESULT_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 <alibabacloud/marketplaceintl/MarketplaceIntlExport.h>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
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_
|
||||||
@@ -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 <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/marketplaceintl/MarketplaceIntlExport.h>
|
||||||
|
|
||||||
|
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_
|
||||||
@@ -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 <alibabacloud/marketplaceintl/MarketplaceIntlExport.h>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
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<MeteringData> getMeteringData() const;
|
||||||
|
void setMeteringData(const std::vector<MeteringData> &meteringData);
|
||||||
|
std::string getGmtCreate() const;
|
||||||
|
void setGmtCreate(const std::string &gmtCreate);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::vector<MeteringData> meteringData_;
|
||||||
|
std::string gmtCreate_;
|
||||||
|
};
|
||||||
|
} // namespace Model
|
||||||
|
} // namespace MarketplaceIntl
|
||||||
|
} // namespace AlibabaCloud
|
||||||
|
#endif // !ALIBABACLOUD_MARKETPLACEINTL_MODEL_PUSHMETERINGDATAREQUEST_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 <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/marketplaceintl/MarketplaceIntlExport.h>
|
||||||
|
|
||||||
|
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_
|
||||||
197
marketplaceintl/src/MarketplaceIntlClient.cc
Normal file
197
marketplaceintl/src/MarketplaceIntlClient.cc
Normal file
@@ -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 <alibabacloud/marketplaceintl/MarketplaceIntlClient.h>
|
||||||
|
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||||
|
|
||||||
|
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<SimpleCredentialsProvider>(credentials), configuration)
|
||||||
|
{
|
||||||
|
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
|
||||||
|
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
MarketplaceIntlClient::MarketplaceIntlClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||||
|
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
|
||||||
|
{
|
||||||
|
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||||
|
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
MarketplaceIntlClient::MarketplaceIntlClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
|
||||||
|
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
|
||||||
|
{
|
||||||
|
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
|
||||||
|
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
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<const AsyncCallerContext>& 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<std::packaged_task<DescribePushMeteringDataOutcome()>>(
|
||||||
|
[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<const AsyncCallerContext>& 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<std::packaged_task<DescribeSellerInstancesOutcome()>>(
|
||||||
|
[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<const AsyncCallerContext>& 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<std::packaged_task<NoticeInstanceUserOutcome()>>(
|
||||||
|
[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<const AsyncCallerContext>& 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<std::packaged_task<PushMeteringDataOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->pushMeteringData(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
36
marketplaceintl/src/model/DescribePushMeteringDataRequest.cc
Normal file
36
marketplaceintl/src/model/DescribePushMeteringDataRequest.cc
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <alibabacloud/marketplaceintl/model/DescribePushMeteringDataRequest.h>
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
99
marketplaceintl/src/model/DescribePushMeteringDataResult.cc
Normal file
99
marketplaceintl/src/model/DescribePushMeteringDataResult.cc
Normal file
@@ -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 <alibabacloud/marketplaceintl/model/DescribePushMeteringDataResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
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_;
|
||||||
|
}
|
||||||
|
|
||||||
72
marketplaceintl/src/model/DescribeSellerInstancesRequest.cc
Normal file
72
marketplaceintl/src/model/DescribeSellerInstancesRequest.cc
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <alibabacloud/marketplaceintl/model/DescribeSellerInstancesRequest.h>
|
||||||
|
|
||||||
|
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));
|
||||||
|
}
|
||||||
|
|
||||||
129
marketplaceintl/src/model/DescribeSellerInstancesResult.cc
Normal file
129
marketplaceintl/src/model/DescribeSellerInstancesResult.cc
Normal file
@@ -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 <alibabacloud/marketplaceintl/model/DescribeSellerInstancesResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
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::ResultItem> DescribeSellerInstancesResult::getResult()const
|
||||||
|
{
|
||||||
|
return result_;
|
||||||
|
}
|
||||||
|
|
||||||
54
marketplaceintl/src/model/NoticeInstanceUserRequest.cc
Normal file
54
marketplaceintl/src/model/NoticeInstanceUserRequest.cc
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <alibabacloud/marketplaceintl/model/NoticeInstanceUserRequest.h>
|
||||||
|
|
||||||
|
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));
|
||||||
|
}
|
||||||
|
|
||||||
92
marketplaceintl/src/model/NoticeInstanceUserResult.cc
Normal file
92
marketplaceintl/src/model/NoticeInstanceUserResult.cc
Normal file
@@ -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 <alibabacloud/marketplaceintl/model/NoticeInstanceUserResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
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_;
|
||||||
|
}
|
||||||
|
|
||||||
54
marketplaceintl/src/model/PushMeteringDataRequest.cc
Normal file
54
marketplaceintl/src/model/PushMeteringDataRequest.cc
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <alibabacloud/marketplaceintl/model/PushMeteringDataRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::MarketplaceIntl::Model::PushMeteringDataRequest;
|
||||||
|
|
||||||
|
PushMeteringDataRequest::PushMeteringDataRequest()
|
||||||
|
: RpcServiceRequest("marketplaceintl", "2022-12-30", "PushMeteringData") {
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
PushMeteringDataRequest::~PushMeteringDataRequest() {}
|
||||||
|
|
||||||
|
std::vector<PushMeteringDataRequest::MeteringData> PushMeteringDataRequest::getMeteringData() const {
|
||||||
|
return meteringData_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PushMeteringDataRequest::setMeteringData(const std::vector<PushMeteringDataRequest::MeteringData> &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);
|
||||||
|
}
|
||||||
|
|
||||||
86
marketplaceintl/src/model/PushMeteringDataResult.cc
Normal file
86
marketplaceintl/src/model/PushMeteringDataResult.cc
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <alibabacloud/marketplaceintl/model/PushMeteringDataResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
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_;
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user