Add CommodityCode For QueryOrderAPI.

This commit is contained in:
sdk-team
2020-12-28 09:15:31 +00:00
parent f9b117f5a6
commit c5062df7f5
25 changed files with 637 additions and 188 deletions

View File

@@ -69,6 +69,8 @@ set(bssopenapi_public_header_model
include/alibabacloud/bssopenapi/model/QueryAccountBalanceResult.h
include/alibabacloud/bssopenapi/model/QueryAccountBillRequest.h
include/alibabacloud/bssopenapi/model/QueryAccountBillResult.h
include/alibabacloud/bssopenapi/model/QueryAccountTransactionDetailsRequest.h
include/alibabacloud/bssopenapi/model/QueryAccountTransactionDetailsResult.h
include/alibabacloud/bssopenapi/model/QueryAccountTransactionsRequest.h
include/alibabacloud/bssopenapi/model/QueryAccountTransactionsResult.h
include/alibabacloud/bssopenapi/model/QueryAvailableInstancesRequest.h
@@ -190,6 +192,8 @@ set(bssopenapi_src
src/model/QueryAccountBalanceResult.cc
src/model/QueryAccountBillRequest.cc
src/model/QueryAccountBillResult.cc
src/model/QueryAccountTransactionDetailsRequest.cc
src/model/QueryAccountTransactionDetailsResult.cc
src/model/QueryAccountTransactionsRequest.cc
src/model/QueryAccountTransactionsResult.cc
src/model/QueryAvailableInstancesRequest.cc

View File

@@ -70,6 +70,8 @@
#include "model/QueryAccountBalanceResult.h"
#include "model/QueryAccountBillRequest.h"
#include "model/QueryAccountBillResult.h"
#include "model/QueryAccountTransactionDetailsRequest.h"
#include "model/QueryAccountTransactionDetailsResult.h"
#include "model/QueryAccountTransactionsRequest.h"
#include "model/QueryAccountTransactionsResult.h"
#include "model/QueryAvailableInstancesRequest.h"
@@ -221,6 +223,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::QueryAccountBillResult> QueryAccountBillOutcome;
typedef std::future<QueryAccountBillOutcome> QueryAccountBillOutcomeCallable;
typedef std::function<void(const BssOpenApiClient*, const Model::QueryAccountBillRequest&, const QueryAccountBillOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryAccountBillAsyncHandler;
typedef Outcome<Error, Model::QueryAccountTransactionDetailsResult> QueryAccountTransactionDetailsOutcome;
typedef std::future<QueryAccountTransactionDetailsOutcome> QueryAccountTransactionDetailsOutcomeCallable;
typedef std::function<void(const BssOpenApiClient*, const Model::QueryAccountTransactionDetailsRequest&, const QueryAccountTransactionDetailsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryAccountTransactionDetailsAsyncHandler;
typedef Outcome<Error, Model::QueryAccountTransactionsResult> QueryAccountTransactionsOutcome;
typedef std::future<QueryAccountTransactionsOutcome> QueryAccountTransactionsOutcomeCallable;
typedef std::function<void(const BssOpenApiClient*, const Model::QueryAccountTransactionsRequest&, const QueryAccountTransactionsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryAccountTransactionsAsyncHandler;
@@ -403,6 +408,9 @@ namespace AlibabaCloud
QueryAccountBillOutcome queryAccountBill(const Model::QueryAccountBillRequest &request)const;
void queryAccountBillAsync(const Model::QueryAccountBillRequest& request, const QueryAccountBillAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
QueryAccountBillOutcomeCallable queryAccountBillCallable(const Model::QueryAccountBillRequest& request) const;
QueryAccountTransactionDetailsOutcome queryAccountTransactionDetails(const Model::QueryAccountTransactionDetailsRequest &request)const;
void queryAccountTransactionDetailsAsync(const Model::QueryAccountTransactionDetailsRequest& request, const QueryAccountTransactionDetailsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
QueryAccountTransactionDetailsOutcomeCallable queryAccountTransactionDetailsCallable(const Model::QueryAccountTransactionDetailsRequest& request) const;
QueryAccountTransactionsOutcome queryAccountTransactions(const Model::QueryAccountTransactionsRequest &request)const;
void queryAccountTransactionsAsync(const Model::QueryAccountTransactionsRequest& request, const QueryAccountTransactionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
QueryAccountTransactionsOutcomeCallable queryAccountTransactionsCallable(const Model::QueryAccountTransactionsRequest& request) const;

View File

@@ -35,8 +35,8 @@ namespace AlibabaCloud
{
std::string resourceId;
std::string commodityCode;
long resourceUserId;
std::string apportionCode;
long resourceUserId;
};
public:

View File

@@ -37,8 +37,8 @@ namespace AlibabaCloud
struct CostUnitDtoListItem
{
long unitId;
long ownerUid;
long parentUnitId;
long ownerUid;
std::string unitName;
};
std::vector<CostUnitDtoListItem> costUnitDtoList;

View File

@@ -39,23 +39,24 @@ namespace AlibabaCloud
std::string afterTaxAmount;
std::string subOrderId;
std::string config;
std::string paymentTime;
std::string tax;
std::string paymentCurrency;
std::string _operator;
std::string tax;
std::string paymentTime;
std::string paymentCurrency;
std::string usageEndTime;
std::string subscriptionType;
std::string pretaxGrossAmount;
std::string orderType;
std::string currency;
std::string commodityCode;
std::string usageStartTime;
std::string originalConfig;
std::string paymentStatus;
std::string productCode;
std::string createTime;
std::string productType;
std::string quantity;
std::string relatedOrderId;
std::string quantity;
std::string orderId;
std::string pretaxAmount;
std::string orderSubType;
@@ -64,8 +65,8 @@ namespace AlibabaCloud
std::string pretaxAmountLocal;
};
int totalCount;
int pageNum;
int pageSize;
int pageNum;
std::vector<Order> orderList;
std::string hostName;
};

View 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.
*/
#ifndef ALIBABACLOUD_BSSOPENAPI_MODEL_QUERYACCOUNTTRANSACTIONDETAILSREQUEST_H_
#define ALIBABACLOUD_BSSOPENAPI_MODEL_QUERYACCOUNTTRANSACTIONDETAILSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/bssopenapi/BssOpenApiExport.h>
namespace AlibabaCloud
{
namespace BssOpenApi
{
namespace Model
{
class ALIBABACLOUD_BSSOPENAPI_EXPORT QueryAccountTransactionDetailsRequest : public RpcServiceRequest
{
public:
QueryAccountTransactionDetailsRequest();
~QueryAccountTransactionDetailsRequest();
std::string getTransactionType()const;
void setTransactionType(const std::string& transactionType);
std::string getCreateTimeEnd()const;
void setCreateTimeEnd(const std::string& createTimeEnd);
std::string getRecordID()const;
void setRecordID(const std::string& recordID);
std::string getNextToken()const;
void setNextToken(const std::string& nextToken);
int getMaxResults()const;
void setMaxResults(int maxResults);
std::string getTransactionChannel()const;
void setTransactionChannel(const std::string& transactionChannel);
std::string getTransactionChannelSN()const;
void setTransactionChannelSN(const std::string& transactionChannelSN);
std::string getCreateTimeStart()const;
void setCreateTimeStart(const std::string& createTimeStart);
std::string getTransactionNumber()const;
void setTransactionNumber(const std::string& transactionNumber);
private:
std::string transactionType_;
std::string createTimeEnd_;
std::string recordID_;
std::string nextToken_;
int maxResults_;
std::string transactionChannel_;
std::string transactionChannelSN_;
std::string createTimeStart_;
std::string transactionNumber_;
};
}
}
}
#endif // !ALIBABACLOUD_BSSOPENAPI_MODEL_QUERYACCOUNTTRANSACTIONDETAILSREQUEST_H_

View File

@@ -0,0 +1,81 @@
/*
* 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_BSSOPENAPI_MODEL_QUERYACCOUNTTRANSACTIONDETAILSRESULT_H_
#define ALIBABACLOUD_BSSOPENAPI_MODEL_QUERYACCOUNTTRANSACTIONDETAILSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/bssopenapi/BssOpenApiExport.h>
namespace AlibabaCloud
{
namespace BssOpenApi
{
namespace Model
{
class ALIBABACLOUD_BSSOPENAPI_EXPORT QueryAccountTransactionDetailsResult : public ServiceResult
{
public:
struct Data
{
struct AccountTransactionsListItem
{
std::string transactionType;
std::string billingCycle;
std::string transactionNumber;
std::string amount;
std::string transactionAccount;
std::string transactionTime;
std::string transactionChannelSN;
std::string remarks;
std::string fundType;
std::string transactionFlow;
std::string recordID;
std::string balance;
std::string transactionChannel;
};
int totalCount;
std::string nextToken;
int maxResults;
std::vector<AccountTransactionsListItem> accountTransactionsList;
std::string accountName;
};
QueryAccountTransactionDetailsResult();
explicit QueryAccountTransactionDetailsResult(const std::string &payload);
~QueryAccountTransactionDetailsResult();
std::string getMessage()const;
Data getData()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
Data data_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_BSSOPENAPI_MODEL_QUERYACCOUNTTRANSACTIONDETAILSRESULT_H_

View File

@@ -37,15 +37,15 @@ namespace AlibabaCloud
struct CostUnit
{
long unitId;
long ownerUid;
long parentUnitId;
long ownerUid;
std::string unitName;
};
struct CostUnitStatisInfo
{
long subUnitCount;
long totalResourceCount;
long totalResourceGroupCount;
long totalResourceCount;
long userCount;
long resourceCount;
long totalUserCount;
@@ -64,12 +64,12 @@ namespace AlibabaCloud
std::string commodityCode;
std::string resourceStatus;
std::string resourceUserName;
std::string commodityName;
std::string resourceGroup;
std::string commodityName;
};
int totalCount;
int pageNum;
int pageSize;
int pageNum;
CostUnit costUnit;
std::vector<ResourceInstanceList> resourceInstanceDtoList;
CostUnitStatisInfo costUnitStatisInfo;

View File

@@ -37,13 +37,13 @@ namespace AlibabaCloud
struct CostUnitDtoListItem
{
long unitId;
long ownerUid;
long parentUnitId;
long ownerUid;
std::string unitName;
};
int totalCount;
int pageNum;
int pageSize;
int pageNum;
std::vector<CostUnitDtoListItem> costUnitDtoList;
};

View File

@@ -50,6 +50,7 @@ namespace AlibabaCloud
std::string orderType;
std::string pretaxAmount;
std::string currency;
std::string commodityCode;
std::string paymentStatus;
std::string pretaxAmountLocal;
};

View File

@@ -915,6 +915,42 @@ BssOpenApiClient::QueryAccountBillOutcomeCallable BssOpenApiClient::queryAccount
return task->get_future();
}
BssOpenApiClient::QueryAccountTransactionDetailsOutcome BssOpenApiClient::queryAccountTransactionDetails(const QueryAccountTransactionDetailsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return QueryAccountTransactionDetailsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return QueryAccountTransactionDetailsOutcome(QueryAccountTransactionDetailsResult(outcome.result()));
else
return QueryAccountTransactionDetailsOutcome(outcome.error());
}
void BssOpenApiClient::queryAccountTransactionDetailsAsync(const QueryAccountTransactionDetailsRequest& request, const QueryAccountTransactionDetailsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, queryAccountTransactionDetails(request), context);
};
asyncExecute(new Runnable(fn));
}
BssOpenApiClient::QueryAccountTransactionDetailsOutcomeCallable BssOpenApiClient::queryAccountTransactionDetailsCallable(const QueryAccountTransactionDetailsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<QueryAccountTransactionDetailsOutcome()>>(
[this, request]()
{
return this->queryAccountTransactionDetails(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
BssOpenApiClient::QueryAccountTransactionsOutcome BssOpenApiClient::queryAccountTransactions(const QueryAccountTransactionsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -40,8 +40,8 @@ void AllocateCostUnitResourceRequest::setResourceInstanceList(const std::vector<
std::string resourceInstanceListObjStr = "ResourceInstanceList." + std::to_string(dep1 + 1);
setParameter(resourceInstanceListObjStr + ".ResourceId", resourceInstanceListObj.resourceId);
setParameter(resourceInstanceListObjStr + ".CommodityCode", resourceInstanceListObj.commodityCode);
setParameter(resourceInstanceListObjStr + ".ResourceUserId", std::to_string(resourceInstanceListObj.resourceUserId));
setParameter(resourceInstanceListObjStr + ".ApportionCode", resourceInstanceListObj.apportionCode);
setParameter(resourceInstanceListObjStr + ".ResourceUserId", std::to_string(resourceInstanceListObj.resourceUserId));
}
}

View File

@@ -40,18 +40,18 @@ void AllocateCostUnitResourceResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["IsSuccess"].isNull())
data_.isSuccess = dataNode["IsSuccess"].asString() == "true";
if(!dataNode["ToUnitUserId"].isNull())
data_.toUnitUserId = std::stol(dataNode["ToUnitUserId"].asString());
if(!dataNode["ToUnitId"].isNull())
data_.toUnitId = std::stol(dataNode["ToUnitId"].asString());
if(!dataNode["IsSuccess"].isNull())
data_.isSuccess = dataNode["IsSuccess"].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["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}

View File

@@ -44,22 +44,22 @@ void CreateCostUnitResult::parse(const std::string &payload)
for (auto dataNodeCostUnitDtoListCostUnitDtoListItem : allCostUnitDtoListNode)
{
Data::CostUnitDtoListItem costUnitDtoListItemObject;
if(!dataNodeCostUnitDtoListCostUnitDtoListItem["OwnerUid"].isNull())
costUnitDtoListItemObject.ownerUid = std::stol(dataNodeCostUnitDtoListCostUnitDtoListItem["OwnerUid"].asString());
if(!dataNodeCostUnitDtoListCostUnitDtoListItem["ParentUnitId"].isNull())
costUnitDtoListItemObject.parentUnitId = std::stol(dataNodeCostUnitDtoListCostUnitDtoListItem["ParentUnitId"].asString());
if(!dataNodeCostUnitDtoListCostUnitDtoListItem["UnitId"].isNull())
costUnitDtoListItemObject.unitId = std::stol(dataNodeCostUnitDtoListCostUnitDtoListItem["UnitId"].asString());
if(!dataNodeCostUnitDtoListCostUnitDtoListItem["ParentUnitId"].isNull())
costUnitDtoListItemObject.parentUnitId = std::stol(dataNodeCostUnitDtoListCostUnitDtoListItem["ParentUnitId"].asString());
if(!dataNodeCostUnitDtoListCostUnitDtoListItem["OwnerUid"].isNull())
costUnitDtoListItemObject.ownerUid = std::stol(dataNodeCostUnitDtoListCostUnitDtoListItem["OwnerUid"].asString());
if(!dataNodeCostUnitDtoListCostUnitDtoListItem["UnitName"].isNull())
costUnitDtoListItemObject.unitName = dataNodeCostUnitDtoListCostUnitDtoListItem["UnitName"].asString();
data_.costUnitDtoList.push_back(costUnitDtoListItemObject);
}
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["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}

View File

@@ -40,18 +40,18 @@ void DeleteCostUnitResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["OwnerUid"].isNull())
data_.ownerUid = std::stol(dataNode["OwnerUid"].asString());
if(!dataNode["UnitId"].isNull())
data_.unitId = std::stol(dataNode["UnitId"].asString());
if(!dataNode["IsSuccess"].isNull())
data_.isSuccess = dataNode["IsSuccess"].asString() == "true";
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!dataNode["UnitId"].isNull())
data_.unitId = std::stol(dataNode["UnitId"].asString());
if(!dataNode["OwnerUid"].isNull())
data_.ownerUid = std::stol(dataNode["OwnerUid"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}

View File

@@ -67,18 +67,18 @@ void DescribePricingModuleResult::parse(const std::string &payload)
attributeObject.name = dataNodeAttributeListAttribute["Name"].asString();
if(!dataNodeAttributeListAttribute["Unit"].isNull())
attributeObject.unit = dataNodeAttributeListAttribute["Unit"].asString();
auto allValuesNode = allAttributeListNode["Values"]["AttributeValue"];
for (auto allAttributeListNodeValuesAttributeValue : allValuesNode)
auto allValuesNode = dataNodeAttributeListAttribute["Values"]["AttributeValue"];
for (auto dataNodeAttributeListAttributeValuesAttributeValue : allValuesNode)
{
Data::Attribute::AttributeValue valuesObject;
if(!allAttributeListNodeValuesAttributeValue["Type"].isNull())
valuesObject.type = allAttributeListNodeValuesAttributeValue["Type"].asString();
if(!allAttributeListNodeValuesAttributeValue["Name"].isNull())
valuesObject.name = allAttributeListNodeValuesAttributeValue["Name"].asString();
if(!allAttributeListNodeValuesAttributeValue["Value"].isNull())
valuesObject.value = allAttributeListNodeValuesAttributeValue["Value"].asString();
if(!allAttributeListNodeValuesAttributeValue["Remark"].isNull())
valuesObject.remark = allAttributeListNodeValuesAttributeValue["Remark"].asString();
if(!dataNodeAttributeListAttributeValuesAttributeValue["Type"].isNull())
valuesObject.type = dataNodeAttributeListAttributeValuesAttributeValue["Type"].asString();
if(!dataNodeAttributeListAttributeValuesAttributeValue["Name"].isNull())
valuesObject.name = dataNodeAttributeListAttributeValuesAttributeValue["Name"].asString();
if(!dataNodeAttributeListAttributeValuesAttributeValue["Value"].isNull())
valuesObject.value = dataNodeAttributeListAttributeValuesAttributeValue["Value"].asString();
if(!dataNodeAttributeListAttributeValuesAttributeValue["Remark"].isNull())
valuesObject.remark = dataNodeAttributeListAttributeValuesAttributeValue["Remark"].asString();
attributeObject.values.push_back(valuesObject);
}
data_.attributeList.push_back(attributeObject);

View File

@@ -50,42 +50,42 @@ void DescribeResourcePackageProductResult::parse(const std::string &payload)
resourcePackageObject.productType = dataNodeResourcePackagesResourcePackage["ProductType"].asString();
if(!dataNodeResourcePackagesResourcePackage["Name"].isNull())
resourcePackageObject.name = dataNodeResourcePackagesResourcePackage["Name"].asString();
auto allPackageTypesNode = allResourcePackagesNode["PackageTypes"]["PackageType"];
for (auto allResourcePackagesNodePackageTypesPackageType : allPackageTypesNode)
auto allPackageTypesNode = dataNodeResourcePackagesResourcePackage["PackageTypes"]["PackageType"];
for (auto dataNodeResourcePackagesResourcePackagePackageTypesPackageType : allPackageTypesNode)
{
Data::ResourcePackage::PackageType packageTypesObject;
if(!allResourcePackagesNodePackageTypesPackageType["Name"].isNull())
packageTypesObject.name = allResourcePackagesNodePackageTypesPackageType["Name"].asString();
if(!allResourcePackagesNodePackageTypesPackageType["Code"].isNull())
packageTypesObject.code = allResourcePackagesNodePackageTypesPackageType["Code"].asString();
auto allPropertiesNode = allPackageTypesNode["Properties"]["Property"];
for (auto allPackageTypesNodePropertiesProperty : allPropertiesNode)
if(!dataNodeResourcePackagesResourcePackagePackageTypesPackageType["Name"].isNull())
packageTypesObject.name = dataNodeResourcePackagesResourcePackagePackageTypesPackageType["Name"].asString();
if(!dataNodeResourcePackagesResourcePackagePackageTypesPackageType["Code"].isNull())
packageTypesObject.code = dataNodeResourcePackagesResourcePackagePackageTypesPackageType["Code"].asString();
auto allPropertiesNode = dataNodeResourcePackagesResourcePackagePackageTypesPackageType["Properties"]["Property"];
for (auto dataNodeResourcePackagesResourcePackagePackageTypesPackageTypePropertiesProperty : allPropertiesNode)
{
Data::ResourcePackage::PackageType::Property propertiesObject;
if(!allPackageTypesNodePropertiesProperty["Name"].isNull())
propertiesObject.name = allPackageTypesNodePropertiesProperty["Name"].asString();
if(!allPackageTypesNodePropertiesProperty["Value"].isNull())
propertiesObject.value = allPackageTypesNodePropertiesProperty["Value"].asString();
if(!dataNodeResourcePackagesResourcePackagePackageTypesPackageTypePropertiesProperty["Name"].isNull())
propertiesObject.name = dataNodeResourcePackagesResourcePackagePackageTypesPackageTypePropertiesProperty["Name"].asString();
if(!dataNodeResourcePackagesResourcePackagePackageTypesPackageTypePropertiesProperty["Value"].isNull())
propertiesObject.value = dataNodeResourcePackagesResourcePackagePackageTypesPackageTypePropertiesProperty["Value"].asString();
packageTypesObject.properties.push_back(propertiesObject);
}
auto allSpecificationsNode = allPackageTypesNode["Specifications"]["Specification"];
for (auto allPackageTypesNodeSpecificationsSpecification : allSpecificationsNode)
auto allSpecificationsNode = dataNodeResourcePackagesResourcePackagePackageTypesPackageType["Specifications"]["Specification"];
for (auto dataNodeResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecification : allSpecificationsNode)
{
Data::ResourcePackage::PackageType::Specification specificationsObject;
if(!allPackageTypesNodeSpecificationsSpecification["Name"].isNull())
specificationsObject.name = allPackageTypesNodeSpecificationsSpecification["Name"].asString();
if(!allPackageTypesNodeSpecificationsSpecification["Value"].isNull())
specificationsObject.value = allPackageTypesNodeSpecificationsSpecification["Value"].asString();
auto allAvailableDurationsNode = allSpecificationsNode["AvailableDurations"]["AvailableDuration"];
for (auto allSpecificationsNodeAvailableDurationsAvailableDuration : allAvailableDurationsNode)
if(!dataNodeResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecification["Name"].isNull())
specificationsObject.name = dataNodeResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecification["Name"].asString();
if(!dataNodeResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecification["Value"].isNull())
specificationsObject.value = dataNodeResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecification["Value"].asString();
auto allAvailableDurationsNode = dataNodeResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecification["AvailableDurations"]["AvailableDuration"];
for (auto dataNodeResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecificationAvailableDurationsAvailableDuration : allAvailableDurationsNode)
{
Data::ResourcePackage::PackageType::Specification::AvailableDuration availableDurationsObject;
if(!allSpecificationsNodeAvailableDurationsAvailableDuration["Name"].isNull())
availableDurationsObject.name = allSpecificationsNodeAvailableDurationsAvailableDuration["Name"].asString();
if(!allSpecificationsNodeAvailableDurationsAvailableDuration["Value"].isNull())
availableDurationsObject.value = std::stoi(allSpecificationsNodeAvailableDurationsAvailableDuration["Value"].asString());
if(!allSpecificationsNodeAvailableDurationsAvailableDuration["Unit"].isNull())
availableDurationsObject.unit = allSpecificationsNodeAvailableDurationsAvailableDuration["Unit"].asString();
if(!dataNodeResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecificationAvailableDurationsAvailableDuration["Name"].isNull())
availableDurationsObject.name = dataNodeResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecificationAvailableDurationsAvailableDuration["Name"].asString();
if(!dataNodeResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecificationAvailableDurationsAvailableDuration["Value"].isNull())
availableDurationsObject.value = std::stoi(dataNodeResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecificationAvailableDurationsAvailableDuration["Value"].asString());
if(!dataNodeResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecificationAvailableDurationsAvailableDuration["Unit"].isNull())
availableDurationsObject.unit = dataNodeResourcePackagesResourcePackagePackageTypesPackageTypeSpecificationsSpecificationAvailableDurationsAvailableDuration["Unit"].asString();
specificationsObject.availableDurations.push_back(availableDurationsObject);
}
packageTypesObject.specifications.push_back(specificationsObject);

View File

@@ -40,78 +40,80 @@ void GetOrderDetailResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["HostName"].isNull())
data_.hostName = dataNode["HostName"].asString();
if(!dataNode["PageNum"].isNull())
data_.pageNum = std::stoi(dataNode["PageNum"].asString());
if(!dataNode["PageSize"].isNull())
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
if(!dataNode["TotalCount"].isNull())
data_.totalCount = std::stoi(dataNode["TotalCount"].asString());
if(!dataNode["PageSize"].isNull())
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
if(!dataNode["PageNum"].isNull())
data_.pageNum = std::stoi(dataNode["PageNum"].asString());
if(!dataNode["HostName"].isNull())
data_.hostName = dataNode["HostName"].asString();
auto allOrderListNode = dataNode["OrderList"]["Order"];
for (auto dataNodeOrderListOrder : allOrderListNode)
{
Data::Order orderObject;
if(!dataNodeOrderListOrder["OrderId"].isNull())
orderObject.orderId = dataNodeOrderListOrder["OrderId"].asString();
if(!dataNodeOrderListOrder["SubOrderId"].isNull())
orderObject.subOrderId = dataNodeOrderListOrder["SubOrderId"].asString();
if(!dataNodeOrderListOrder["ProductCode"].isNull())
orderObject.productCode = dataNodeOrderListOrder["ProductCode"].asString();
if(!dataNodeOrderListOrder["ProductType"].isNull())
orderObject.productType = dataNodeOrderListOrder["ProductType"].asString();
if(!dataNodeOrderListOrder["SubscriptionType"].isNull())
orderObject.subscriptionType = dataNodeOrderListOrder["SubscriptionType"].asString();
if(!dataNodeOrderListOrder["OrderType"].isNull())
orderObject.orderType = dataNodeOrderListOrder["OrderType"].asString();
if(!dataNodeOrderListOrder["CreateTime"].isNull())
orderObject.createTime = dataNodeOrderListOrder["CreateTime"].asString();
if(!dataNodeOrderListOrder["PaymentTime"].isNull())
orderObject.paymentTime = dataNodeOrderListOrder["PaymentTime"].asString();
if(!dataNodeOrderListOrder["PaymentStatus"].isNull())
orderObject.paymentStatus = dataNodeOrderListOrder["PaymentStatus"].asString();
if(!dataNodeOrderListOrder["Region"].isNull())
orderObject.region = dataNodeOrderListOrder["Region"].asString();
if(!dataNodeOrderListOrder["Config"].isNull())
orderObject.config = dataNodeOrderListOrder["Config"].asString();
if(!dataNodeOrderListOrder["Quantity"].isNull())
orderObject.quantity = dataNodeOrderListOrder["Quantity"].asString();
if(!dataNodeOrderListOrder["UsageStartTime"].isNull())
orderObject.usageStartTime = dataNodeOrderListOrder["UsageStartTime"].asString();
if(!dataNodeOrderListOrder["UsageEndTime"].isNull())
orderObject.usageEndTime = dataNodeOrderListOrder["UsageEndTime"].asString();
if(!dataNodeOrderListOrder["InstanceIDs"].isNull())
orderObject.instanceIDs = dataNodeOrderListOrder["InstanceIDs"].asString();
if(!dataNodeOrderListOrder["PretaxGrossAmount"].isNull())
orderObject.pretaxGrossAmount = dataNodeOrderListOrder["PretaxGrossAmount"].asString();
if(!dataNodeOrderListOrder["PretaxAmount"].isNull())
orderObject.pretaxAmount = dataNodeOrderListOrder["PretaxAmount"].asString();
if(!dataNodeOrderListOrder["Currency"].isNull())
orderObject.currency = dataNodeOrderListOrder["Currency"].asString();
if(!dataNodeOrderListOrder["PretaxAmountLocal"].isNull())
orderObject.pretaxAmountLocal = dataNodeOrderListOrder["PretaxAmountLocal"].asString();
if(!dataNodeOrderListOrder["Tax"].isNull())
orderObject.tax = dataNodeOrderListOrder["Tax"].asString();
if(!dataNodeOrderListOrder["AfterTaxAmount"].isNull())
orderObject.afterTaxAmount = dataNodeOrderListOrder["AfterTaxAmount"].asString();
if(!dataNodeOrderListOrder["PaymentCurrency"].isNull())
orderObject.paymentCurrency = dataNodeOrderListOrder["PaymentCurrency"].asString();
if(!dataNodeOrderListOrder["Operator"].isNull())
orderObject._operator = dataNodeOrderListOrder["Operator"].asString();
if(!dataNodeOrderListOrder["RelatedOrderId"].isNull())
orderObject.relatedOrderId = dataNodeOrderListOrder["RelatedOrderId"].asString();
if(!dataNodeOrderListOrder["OrderSubType"].isNull())
orderObject.orderSubType = dataNodeOrderListOrder["OrderSubType"].asString();
if(!dataNodeOrderListOrder["AfterTaxAmount"].isNull())
orderObject.afterTaxAmount = dataNodeOrderListOrder["AfterTaxAmount"].asString();
if(!dataNodeOrderListOrder["SubOrderId"].isNull())
orderObject.subOrderId = dataNodeOrderListOrder["SubOrderId"].asString();
if(!dataNodeOrderListOrder["Config"].isNull())
orderObject.config = dataNodeOrderListOrder["Config"].asString();
if(!dataNodeOrderListOrder["Tax"].isNull())
orderObject.tax = dataNodeOrderListOrder["Tax"].asString();
if(!dataNodeOrderListOrder["PaymentTime"].isNull())
orderObject.paymentTime = dataNodeOrderListOrder["PaymentTime"].asString();
if(!dataNodeOrderListOrder["PaymentCurrency"].isNull())
orderObject.paymentCurrency = dataNodeOrderListOrder["PaymentCurrency"].asString();
if(!dataNodeOrderListOrder["UsageEndTime"].isNull())
orderObject.usageEndTime = dataNodeOrderListOrder["UsageEndTime"].asString();
if(!dataNodeOrderListOrder["SubscriptionType"].isNull())
orderObject.subscriptionType = dataNodeOrderListOrder["SubscriptionType"].asString();
if(!dataNodeOrderListOrder["PretaxGrossAmount"].isNull())
orderObject.pretaxGrossAmount = dataNodeOrderListOrder["PretaxGrossAmount"].asString();
if(!dataNodeOrderListOrder["OrderType"].isNull())
orderObject.orderType = dataNodeOrderListOrder["OrderType"].asString();
if(!dataNodeOrderListOrder["Currency"].isNull())
orderObject.currency = dataNodeOrderListOrder["Currency"].asString();
if(!dataNodeOrderListOrder["UsageStartTime"].isNull())
orderObject.usageStartTime = dataNodeOrderListOrder["UsageStartTime"].asString();
if(!dataNodeOrderListOrder["OriginalConfig"].isNull())
orderObject.originalConfig = dataNodeOrderListOrder["OriginalConfig"].asString();
if(!dataNodeOrderListOrder["PaymentStatus"].isNull())
orderObject.paymentStatus = dataNodeOrderListOrder["PaymentStatus"].asString();
if(!dataNodeOrderListOrder["ProductCode"].isNull())
orderObject.productCode = dataNodeOrderListOrder["ProductCode"].asString();
if(!dataNodeOrderListOrder["CreateTime"].isNull())
orderObject.createTime = dataNodeOrderListOrder["CreateTime"].asString();
if(!dataNodeOrderListOrder["ProductType"].isNull())
orderObject.productType = dataNodeOrderListOrder["ProductType"].asString();
if(!dataNodeOrderListOrder["RelatedOrderId"].isNull())
orderObject.relatedOrderId = dataNodeOrderListOrder["RelatedOrderId"].asString();
if(!dataNodeOrderListOrder["Quantity"].isNull())
orderObject.quantity = dataNodeOrderListOrder["Quantity"].asString();
if(!dataNodeOrderListOrder["OrderId"].isNull())
orderObject.orderId = dataNodeOrderListOrder["OrderId"].asString();
if(!dataNodeOrderListOrder["PretaxAmount"].isNull())
orderObject.pretaxAmount = dataNodeOrderListOrder["PretaxAmount"].asString();
if(!dataNodeOrderListOrder["OrderSubType"].isNull())
orderObject.orderSubType = dataNodeOrderListOrder["OrderSubType"].asString();
if(!dataNodeOrderListOrder["Region"].isNull())
orderObject.region = dataNodeOrderListOrder["Region"].asString();
if(!dataNodeOrderListOrder["InstanceIDs"].isNull())
orderObject.instanceIDs = dataNodeOrderListOrder["InstanceIDs"].asString();
if(!dataNodeOrderListOrder["PretaxAmountLocal"].isNull())
orderObject.pretaxAmountLocal = dataNodeOrderListOrder["PretaxAmountLocal"].asString();
if(!dataNodeOrderListOrder["CommodityCode"].isNull())
orderObject.commodityCode = dataNodeOrderListOrder["CommodityCode"].asString();
data_.orderList.push_back(orderObject);
}
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["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}

View File

@@ -43,20 +43,20 @@ void ModifyCostUnitResult::parse(const std::string &payload)
for (auto valueDataDataItem : allDataNode)
{
DataItem dataObject;
if(!valueDataDataItem["OwnerUid"].isNull())
dataObject.ownerUid = std::stol(valueDataDataItem["OwnerUid"].asString());
if(!valueDataDataItem["UnitId"].isNull())
dataObject.unitId = std::stol(valueDataDataItem["UnitId"].asString());
if(!valueDataDataItem["IsSuccess"].isNull())
dataObject.isSuccess = valueDataDataItem["IsSuccess"].asString() == "true";
if(!valueDataDataItem["UnitId"].isNull())
dataObject.unitId = std::stol(valueDataDataItem["UnitId"].asString());
if(!valueDataDataItem["OwnerUid"].isNull())
dataObject.ownerUid = std::stol(valueDataDataItem["OwnerUid"].asString());
data_.push_back(dataObject);
}
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["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}

View File

@@ -0,0 +1,128 @@
/*
* 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/bssopenapi/model/QueryAccountTransactionDetailsRequest.h>
using AlibabaCloud::BssOpenApi::Model::QueryAccountTransactionDetailsRequest;
QueryAccountTransactionDetailsRequest::QueryAccountTransactionDetailsRequest() :
RpcServiceRequest("bssopenapi", "2017-12-14", "QueryAccountTransactionDetails")
{
setMethod(HttpRequest::Method::Post);
}
QueryAccountTransactionDetailsRequest::~QueryAccountTransactionDetailsRequest()
{}
std::string QueryAccountTransactionDetailsRequest::getTransactionType()const
{
return transactionType_;
}
void QueryAccountTransactionDetailsRequest::setTransactionType(const std::string& transactionType)
{
transactionType_ = transactionType;
setParameter("TransactionType", transactionType);
}
std::string QueryAccountTransactionDetailsRequest::getCreateTimeEnd()const
{
return createTimeEnd_;
}
void QueryAccountTransactionDetailsRequest::setCreateTimeEnd(const std::string& createTimeEnd)
{
createTimeEnd_ = createTimeEnd;
setParameter("CreateTimeEnd", createTimeEnd);
}
std::string QueryAccountTransactionDetailsRequest::getRecordID()const
{
return recordID_;
}
void QueryAccountTransactionDetailsRequest::setRecordID(const std::string& recordID)
{
recordID_ = recordID;
setParameter("RecordID", recordID);
}
std::string QueryAccountTransactionDetailsRequest::getNextToken()const
{
return nextToken_;
}
void QueryAccountTransactionDetailsRequest::setNextToken(const std::string& nextToken)
{
nextToken_ = nextToken;
setParameter("NextToken", nextToken);
}
int QueryAccountTransactionDetailsRequest::getMaxResults()const
{
return maxResults_;
}
void QueryAccountTransactionDetailsRequest::setMaxResults(int maxResults)
{
maxResults_ = maxResults;
setParameter("MaxResults", std::to_string(maxResults));
}
std::string QueryAccountTransactionDetailsRequest::getTransactionChannel()const
{
return transactionChannel_;
}
void QueryAccountTransactionDetailsRequest::setTransactionChannel(const std::string& transactionChannel)
{
transactionChannel_ = transactionChannel;
setParameter("TransactionChannel", transactionChannel);
}
std::string QueryAccountTransactionDetailsRequest::getTransactionChannelSN()const
{
return transactionChannelSN_;
}
void QueryAccountTransactionDetailsRequest::setTransactionChannelSN(const std::string& transactionChannelSN)
{
transactionChannelSN_ = transactionChannelSN;
setParameter("TransactionChannelSN", transactionChannelSN);
}
std::string QueryAccountTransactionDetailsRequest::getCreateTimeStart()const
{
return createTimeStart_;
}
void QueryAccountTransactionDetailsRequest::setCreateTimeStart(const std::string& createTimeStart)
{
createTimeStart_ = createTimeStart;
setParameter("CreateTimeStart", createTimeStart);
}
std::string QueryAccountTransactionDetailsRequest::getTransactionNumber()const
{
return transactionNumber_;
}
void QueryAccountTransactionDetailsRequest::setTransactionNumber(const std::string& transactionNumber)
{
transactionNumber_ = transactionNumber;
setParameter("TransactionNumber", transactionNumber);
}

View File

@@ -0,0 +1,111 @@
/*
* 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/bssopenapi/model/QueryAccountTransactionDetailsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::BssOpenApi;
using namespace AlibabaCloud::BssOpenApi::Model;
QueryAccountTransactionDetailsResult::QueryAccountTransactionDetailsResult() :
ServiceResult()
{}
QueryAccountTransactionDetailsResult::QueryAccountTransactionDetailsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryAccountTransactionDetailsResult::~QueryAccountTransactionDetailsResult()
{}
void QueryAccountTransactionDetailsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["AccountName"].isNull())
data_.accountName = dataNode["AccountName"].asString();
if(!dataNode["TotalCount"].isNull())
data_.totalCount = std::stoi(dataNode["TotalCount"].asString());
if(!dataNode["NextToken"].isNull())
data_.nextToken = dataNode["NextToken"].asString();
if(!dataNode["MaxResults"].isNull())
data_.maxResults = std::stoi(dataNode["MaxResults"].asString());
auto allAccountTransactionsListNode = dataNode["AccountTransactionsList"]["AccountTransactionsListItem"];
for (auto dataNodeAccountTransactionsListAccountTransactionsListItem : allAccountTransactionsListNode)
{
Data::AccountTransactionsListItem accountTransactionsListItemObject;
if(!dataNodeAccountTransactionsListAccountTransactionsListItem["TransactionNumber"].isNull())
accountTransactionsListItemObject.transactionNumber = dataNodeAccountTransactionsListAccountTransactionsListItem["TransactionNumber"].asString();
if(!dataNodeAccountTransactionsListAccountTransactionsListItem["TransactionTime"].isNull())
accountTransactionsListItemObject.transactionTime = dataNodeAccountTransactionsListAccountTransactionsListItem["TransactionTime"].asString();
if(!dataNodeAccountTransactionsListAccountTransactionsListItem["TransactionFlow"].isNull())
accountTransactionsListItemObject.transactionFlow = dataNodeAccountTransactionsListAccountTransactionsListItem["TransactionFlow"].asString();
if(!dataNodeAccountTransactionsListAccountTransactionsListItem["TransactionType"].isNull())
accountTransactionsListItemObject.transactionType = dataNodeAccountTransactionsListAccountTransactionsListItem["TransactionType"].asString();
if(!dataNodeAccountTransactionsListAccountTransactionsListItem["TransactionChannel"].isNull())
accountTransactionsListItemObject.transactionChannel = dataNodeAccountTransactionsListAccountTransactionsListItem["TransactionChannel"].asString();
if(!dataNodeAccountTransactionsListAccountTransactionsListItem["TransactionChannelSN"].isNull())
accountTransactionsListItemObject.transactionChannelSN = dataNodeAccountTransactionsListAccountTransactionsListItem["TransactionChannelSN"].asString();
if(!dataNodeAccountTransactionsListAccountTransactionsListItem["FundType"].isNull())
accountTransactionsListItemObject.fundType = dataNodeAccountTransactionsListAccountTransactionsListItem["FundType"].asString();
if(!dataNodeAccountTransactionsListAccountTransactionsListItem["RecordID"].isNull())
accountTransactionsListItemObject.recordID = dataNodeAccountTransactionsListAccountTransactionsListItem["RecordID"].asString();
if(!dataNodeAccountTransactionsListAccountTransactionsListItem["Remarks"].isNull())
accountTransactionsListItemObject.remarks = dataNodeAccountTransactionsListAccountTransactionsListItem["Remarks"].asString();
if(!dataNodeAccountTransactionsListAccountTransactionsListItem["BillingCycle"].isNull())
accountTransactionsListItemObject.billingCycle = dataNodeAccountTransactionsListAccountTransactionsListItem["BillingCycle"].asString();
if(!dataNodeAccountTransactionsListAccountTransactionsListItem["Amount"].isNull())
accountTransactionsListItemObject.amount = dataNodeAccountTransactionsListAccountTransactionsListItem["Amount"].asString();
if(!dataNodeAccountTransactionsListAccountTransactionsListItem["Balance"].isNull())
accountTransactionsListItemObject.balance = dataNodeAccountTransactionsListAccountTransactionsListItem["Balance"].asString();
if(!dataNodeAccountTransactionsListAccountTransactionsListItem["TransactionAccount"].isNull())
accountTransactionsListItemObject.transactionAccount = dataNodeAccountTransactionsListAccountTransactionsListItem["TransactionAccount"].asString();
data_.accountTransactionsList.push_back(accountTransactionsListItemObject);
}
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();
}
std::string QueryAccountTransactionDetailsResult::getMessage()const
{
return message_;
}
QueryAccountTransactionDetailsResult::Data QueryAccountTransactionDetailsResult::getData()const
{
return data_;
}
std::string QueryAccountTransactionDetailsResult::getCode()const
{
return code_;
}
bool QueryAccountTransactionDetailsResult::getSuccess()const
{
return success_;
}

View File

@@ -40,74 +40,74 @@ void QueryCostUnitResourceResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["PageNum"].isNull())
data_.pageNum = std::stoi(dataNode["PageNum"].asString());
if(!dataNode["PageSize"].isNull())
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
if(!dataNode["TotalCount"].isNull())
data_.totalCount = std::stoi(dataNode["TotalCount"].asString());
if(!dataNode["PageSize"].isNull())
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
if(!dataNode["PageNum"].isNull())
data_.pageNum = std::stoi(dataNode["PageNum"].asString());
auto allResourceInstanceDtoListNode = dataNode["ResourceInstanceDtoList"]["ResourceInstanceList"];
for (auto dataNodeResourceInstanceDtoListResourceInstanceList : allResourceInstanceDtoListNode)
{
Data::ResourceInstanceList resourceInstanceListObject;
if(!dataNodeResourceInstanceDtoListResourceInstanceList["ResourceUserId"].isNull())
resourceInstanceListObject.resourceUserId = std::stol(dataNodeResourceInstanceDtoListResourceInstanceList["ResourceUserId"].asString());
if(!dataNodeResourceInstanceDtoListResourceInstanceList["ResourceTag"].isNull())
resourceInstanceListObject.resourceTag = dataNodeResourceInstanceDtoListResourceInstanceList["ResourceTag"].asString();
if(!dataNodeResourceInstanceDtoListResourceInstanceList["RelatedResources"].isNull())
resourceInstanceListObject.relatedResources = dataNodeResourceInstanceDtoListResourceInstanceList["RelatedResources"].asString();
if(!dataNodeResourceInstanceDtoListResourceInstanceList["ApportionName"].isNull())
resourceInstanceListObject.apportionName = dataNodeResourceInstanceDtoListResourceInstanceList["ApportionName"].asString();
if(!dataNodeResourceInstanceDtoListResourceInstanceList["ResourceId"].isNull())
resourceInstanceListObject.resourceId = dataNodeResourceInstanceDtoListResourceInstanceList["ResourceId"].asString();
if(!dataNodeResourceInstanceDtoListResourceInstanceList["CommodityCode"].isNull())
resourceInstanceListObject.commodityCode = dataNodeResourceInstanceDtoListResourceInstanceList["CommodityCode"].asString();
if(!dataNodeResourceInstanceDtoListResourceInstanceList["ResourceUserName"].isNull())
resourceInstanceListObject.resourceUserName = dataNodeResourceInstanceDtoListResourceInstanceList["ResourceUserName"].asString();
if(!dataNodeResourceInstanceDtoListResourceInstanceList["CommodityName"].isNull())
resourceInstanceListObject.commodityName = dataNodeResourceInstanceDtoListResourceInstanceList["CommodityName"].asString();
if(!dataNodeResourceInstanceDtoListResourceInstanceList["ResourceGroup"].isNull())
resourceInstanceListObject.resourceGroup = dataNodeResourceInstanceDtoListResourceInstanceList["ResourceGroup"].asString();
if(!dataNodeResourceInstanceDtoListResourceInstanceList["ResourceTag"].isNull())
resourceInstanceListObject.resourceTag = dataNodeResourceInstanceDtoListResourceInstanceList["ResourceTag"].asString();
if(!dataNodeResourceInstanceDtoListResourceInstanceList["ResourceNick"].isNull())
resourceInstanceListObject.resourceNick = dataNodeResourceInstanceDtoListResourceInstanceList["ResourceNick"].asString();
if(!dataNodeResourceInstanceDtoListResourceInstanceList["ResourceType"].isNull())
resourceInstanceListObject.resourceType = dataNodeResourceInstanceDtoListResourceInstanceList["ResourceType"].asString();
if(!dataNodeResourceInstanceDtoListResourceInstanceList["ResourceStatus"].isNull())
resourceInstanceListObject.resourceStatus = dataNodeResourceInstanceDtoListResourceInstanceList["ResourceStatus"].asString();
if(!dataNodeResourceInstanceDtoListResourceInstanceList["RelatedResources"].isNull())
resourceInstanceListObject.relatedResources = dataNodeResourceInstanceDtoListResourceInstanceList["RelatedResources"].asString();
if(!dataNodeResourceInstanceDtoListResourceInstanceList["ResourceType"].isNull())
resourceInstanceListObject.resourceType = dataNodeResourceInstanceDtoListResourceInstanceList["ResourceType"].asString();
if(!dataNodeResourceInstanceDtoListResourceInstanceList["ResourceUserName"].isNull())
resourceInstanceListObject.resourceUserName = dataNodeResourceInstanceDtoListResourceInstanceList["ResourceUserName"].asString();
if(!dataNodeResourceInstanceDtoListResourceInstanceList["ResourceNick"].isNull())
resourceInstanceListObject.resourceNick = dataNodeResourceInstanceDtoListResourceInstanceList["ResourceNick"].asString();
if(!dataNodeResourceInstanceDtoListResourceInstanceList["ResourceGroup"].isNull())
resourceInstanceListObject.resourceGroup = dataNodeResourceInstanceDtoListResourceInstanceList["ResourceGroup"].asString();
if(!dataNodeResourceInstanceDtoListResourceInstanceList["CommodityName"].isNull())
resourceInstanceListObject.commodityName = dataNodeResourceInstanceDtoListResourceInstanceList["CommodityName"].asString();
if(!dataNodeResourceInstanceDtoListResourceInstanceList["ApportionCode"].isNull())
resourceInstanceListObject.apportionCode = dataNodeResourceInstanceDtoListResourceInstanceList["ApportionCode"].asString();
if(!dataNodeResourceInstanceDtoListResourceInstanceList["ApportionName"].isNull())
resourceInstanceListObject.apportionName = dataNodeResourceInstanceDtoListResourceInstanceList["ApportionName"].asString();
data_.resourceInstanceDtoList.push_back(resourceInstanceListObject);
}
auto costUnitNode = dataNode["CostUnit"];
if(!costUnitNode["OwnerUid"].isNull())
data_.costUnit.ownerUid = std::stol(costUnitNode["OwnerUid"].asString());
if(!costUnitNode["ParentUnitId"].isNull())
data_.costUnit.parentUnitId = std::stol(costUnitNode["ParentUnitId"].asString());
if(!costUnitNode["UnitId"].isNull())
data_.costUnit.unitId = std::stol(costUnitNode["UnitId"].asString());
if(!costUnitNode["ParentUnitId"].isNull())
data_.costUnit.parentUnitId = std::stol(costUnitNode["ParentUnitId"].asString());
if(!costUnitNode["OwnerUid"].isNull())
data_.costUnit.ownerUid = std::stol(costUnitNode["OwnerUid"].asString());
if(!costUnitNode["UnitName"].isNull())
data_.costUnit.unitName = costUnitNode["UnitName"].asString();
auto costUnitStatisInfoNode = dataNode["CostUnitStatisInfo"];
if(!costUnitStatisInfoNode["ResourceCount"].isNull())
data_.costUnitStatisInfo.resourceCount = std::stol(costUnitStatisInfoNode["ResourceCount"].asString());
if(!costUnitStatisInfoNode["ResourceGroupCount"].isNull())
data_.costUnitStatisInfo.resourceGroupCount = std::stol(costUnitStatisInfoNode["ResourceGroupCount"].asString());
if(!costUnitStatisInfoNode["SubUnitCount"].isNull())
data_.costUnitStatisInfo.subUnitCount = std::stol(costUnitStatisInfoNode["SubUnitCount"].asString());
if(!costUnitStatisInfoNode["UserCount"].isNull())
data_.costUnitStatisInfo.userCount = std::stol(costUnitStatisInfoNode["UserCount"].asString());
if(!costUnitStatisInfoNode["TotalResourceCount"].isNull())
data_.costUnitStatisInfo.totalResourceCount = std::stol(costUnitStatisInfoNode["TotalResourceCount"].asString());
if(!costUnitStatisInfoNode["TotalUserCount"].isNull())
data_.costUnitStatisInfo.totalUserCount = std::stol(costUnitStatisInfoNode["TotalUserCount"].asString());
if(!costUnitStatisInfoNode["TotalResourceGroupCount"].isNull())
data_.costUnitStatisInfo.totalResourceGroupCount = std::stol(costUnitStatisInfoNode["TotalResourceGroupCount"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!costUnitStatisInfoNode["TotalResourceCount"].isNull())
data_.costUnitStatisInfo.totalResourceCount = std::stol(costUnitStatisInfoNode["TotalResourceCount"].asString());
if(!costUnitStatisInfoNode["UserCount"].isNull())
data_.costUnitStatisInfo.userCount = std::stol(costUnitStatisInfoNode["UserCount"].asString());
if(!costUnitStatisInfoNode["ResourceCount"].isNull())
data_.costUnitStatisInfo.resourceCount = std::stol(costUnitStatisInfoNode["ResourceCount"].asString());
if(!costUnitStatisInfoNode["TotalUserCount"].isNull())
data_.costUnitStatisInfo.totalUserCount = std::stol(costUnitStatisInfoNode["TotalUserCount"].asString());
if(!costUnitStatisInfoNode["ResourceGroupCount"].isNull())
data_.costUnitStatisInfo.resourceGroupCount = std::stol(costUnitStatisInfoNode["ResourceGroupCount"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}

View File

@@ -40,32 +40,32 @@ void QueryCostUnitResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["PageNum"].isNull())
data_.pageNum = std::stoi(dataNode["PageNum"].asString());
if(!dataNode["PageSize"].isNull())
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
if(!dataNode["TotalCount"].isNull())
data_.totalCount = std::stoi(dataNode["TotalCount"].asString());
if(!dataNode["PageSize"].isNull())
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
if(!dataNode["PageNum"].isNull())
data_.pageNum = std::stoi(dataNode["PageNum"].asString());
auto allCostUnitDtoListNode = dataNode["CostUnitDtoList"]["CostUnitDtoListItem"];
for (auto dataNodeCostUnitDtoListCostUnitDtoListItem : allCostUnitDtoListNode)
{
Data::CostUnitDtoListItem costUnitDtoListItemObject;
if(!dataNodeCostUnitDtoListCostUnitDtoListItem["OwnerUid"].isNull())
costUnitDtoListItemObject.ownerUid = std::stol(dataNodeCostUnitDtoListCostUnitDtoListItem["OwnerUid"].asString());
if(!dataNodeCostUnitDtoListCostUnitDtoListItem["ParentUnitId"].isNull())
costUnitDtoListItemObject.parentUnitId = std::stol(dataNodeCostUnitDtoListCostUnitDtoListItem["ParentUnitId"].asString());
if(!dataNodeCostUnitDtoListCostUnitDtoListItem["UnitId"].isNull())
costUnitDtoListItemObject.unitId = std::stol(dataNodeCostUnitDtoListCostUnitDtoListItem["UnitId"].asString());
if(!dataNodeCostUnitDtoListCostUnitDtoListItem["ParentUnitId"].isNull())
costUnitDtoListItemObject.parentUnitId = std::stol(dataNodeCostUnitDtoListCostUnitDtoListItem["ParentUnitId"].asString());
if(!dataNodeCostUnitDtoListCostUnitDtoListItem["OwnerUid"].isNull())
costUnitDtoListItemObject.ownerUid = std::stol(dataNodeCostUnitDtoListCostUnitDtoListItem["OwnerUid"].asString());
if(!dataNodeCostUnitDtoListCostUnitDtoListItem["UnitName"].isNull())
costUnitDtoListItemObject.unitName = dataNodeCostUnitDtoListCostUnitDtoListItem["UnitName"].asString();
data_.costUnitDtoList.push_back(costUnitDtoListItemObject);
}
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["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}

View File

@@ -84,6 +84,8 @@ void QueryOrdersResult::parse(const std::string &payload)
orderObject.paymentCurrency = dataNodeOrderListOrder["PaymentCurrency"].asString();
if(!dataNodeOrderListOrder["RelatedOrderId"].isNull())
orderObject.relatedOrderId = dataNodeOrderListOrder["RelatedOrderId"].asString();
if(!dataNodeOrderListOrder["CommodityCode"].isNull())
orderObject.commodityCode = dataNodeOrderListOrder["CommodityCode"].asString();
data_.orderList.push_back(orderObject);
}
if(!value["Success"].isNull())