Generate SDK by new Generator

This commit is contained in:
wb-hx510875
2019-09-18 11:18:56 +08:00
parent be86048a76
commit f3eaf1d292
9054 changed files with 325898 additions and 381375 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,89 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/bssopenapi/model/AllocateFinanceUnitResourceRequest.h>
using AlibabaCloud::BssOpenApi::Model::AllocateFinanceUnitResourceRequest;
AllocateFinanceUnitResourceRequest::AllocateFinanceUnitResourceRequest() :
RpcServiceRequest("bssopenapi", "2017-12-14", "AllocateFinanceUnitResource")
{}
AllocateFinanceUnitResourceRequest::~AllocateFinanceUnitResourceRequest()
{}
std::vector<AllocateFinanceUnitResourceRequest::ResourceInstanceList> AllocateFinanceUnitResourceRequest::getResourceInstanceList()const
{
return resourceInstanceList_;
}
void AllocateFinanceUnitResourceRequest::setResourceInstanceList(const std::vector<ResourceInstanceList>& resourceInstanceList)
{
resourceInstanceList_ = resourceInstanceList;
int i = 0;
for(int i = 0; i!= resourceInstanceList.size(); i++) {
auto obj = resourceInstanceList.at(i);
std::string str ="ResourceInstanceList."+ std::to_string(i);
setCoreParameter(str + ".ResourceId", obj.resourceId);
setCoreParameter(str + ".CommodityCode", obj.commodityCode);
setCoreParameter(str + ".ResourceUserId", std::to_string(obj.resourceUserId));
}
}
long AllocateFinanceUnitResourceRequest::getFromUnitId()const
{
return fromUnitId_;
}
void AllocateFinanceUnitResourceRequest::setFromUnitId(long fromUnitId)
{
fromUnitId_ = fromUnitId;
setCoreParameter("FromUnitId", std::to_string(fromUnitId));
}
long AllocateFinanceUnitResourceRequest::getToUnitId()const
{
return toUnitId_;
}
void AllocateFinanceUnitResourceRequest::setToUnitId(long toUnitId)
{
toUnitId_ = toUnitId;
setCoreParameter("ToUnitId", std::to_string(toUnitId));
}
long AllocateFinanceUnitResourceRequest::getFromUnitUserId()const
{
return fromUnitUserId_;
}
void AllocateFinanceUnitResourceRequest::setFromUnitUserId(long fromUnitUserId)
{
fromUnitUserId_ = fromUnitUserId;
setCoreParameter("FromUnitUserId", std::to_string(fromUnitUserId));
}
long AllocateFinanceUnitResourceRequest::getToUnitUserId()const
{
return toUnitUserId_;
}
void AllocateFinanceUnitResourceRequest::setToUnitUserId(long toUnitUserId)
{
toUnitUserId_ = toUnitUserId;
setCoreParameter("ToUnitUserId", std::to_string(toUnitUserId));
}

View File

@@ -0,0 +1,77 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/bssopenapi/model/AllocateFinanceUnitResourceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::BssOpenApi;
using namespace AlibabaCloud::BssOpenApi::Model;
AllocateFinanceUnitResourceResult::AllocateFinanceUnitResourceResult() :
ServiceResult()
{}
AllocateFinanceUnitResourceResult::AllocateFinanceUnitResourceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AllocateFinanceUnitResourceResult::~AllocateFinanceUnitResourceResult()
{}
void AllocateFinanceUnitResourceResult::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["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();
}
std::string AllocateFinanceUnitResourceResult::getMessage()const
{
return message_;
}
AllocateFinanceUnitResourceResult::Data AllocateFinanceUnitResourceResult::getData()const
{
return data_;
}
std::string AllocateFinanceUnitResourceResult::getCode()const
{
return code_;
}
bool AllocateFinanceUnitResourceResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,45 @@
/*
* 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/CreateFinanceUnitRequest.h>
using AlibabaCloud::BssOpenApi::Model::CreateFinanceUnitRequest;
CreateFinanceUnitRequest::CreateFinanceUnitRequest() :
RpcServiceRequest("bssopenapi", "2017-12-14", "CreateFinanceUnit")
{}
CreateFinanceUnitRequest::~CreateFinanceUnitRequest()
{}
std::vector<CreateFinanceUnitRequest::UnitEntityList> CreateFinanceUnitRequest::getUnitEntityList()const
{
return unitEntityList_;
}
void CreateFinanceUnitRequest::setUnitEntityList(const std::vector<UnitEntityList>& unitEntityList)
{
unitEntityList_ = unitEntityList;
int i = 0;
for(int i = 0; i!= unitEntityList.size(); i++) {
auto obj = unitEntityList.at(i);
std::string str ="UnitEntityList."+ std::to_string(i);
setCoreParameter(str + ".UnitName", obj.unitName);
setCoreParameter(str + ".ParentUnitId", std::to_string(obj.parentUnitId));
setCoreParameter(str + ".OwnerUid", std::to_string(obj.ownerUid));
}
}

View File

@@ -0,0 +1,85 @@
/*
* 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/CreateFinanceUnitResult.h>
#include <json/json.h>
using namespace AlibabaCloud::BssOpenApi;
using namespace AlibabaCloud::BssOpenApi::Model;
CreateFinanceUnitResult::CreateFinanceUnitResult() :
ServiceResult()
{}
CreateFinanceUnitResult::CreateFinanceUnitResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateFinanceUnitResult::~CreateFinanceUnitResult()
{}
void CreateFinanceUnitResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allFinanceUnitDtoList = value["FinanceUnitDtoList"]["FinanceUnitDtoListItem"];
for (auto value : allFinanceUnitDtoList)
{
Data::FinanceUnitDtoListItem financeUnitDtoListItemObject;
if(!value["OwnerUid"].isNull())
financeUnitDtoListItemObject.ownerUid = std::stol(value["OwnerUid"].asString());
if(!value["ParentUnitId"].isNull())
financeUnitDtoListItemObject.parentUnitId = std::stol(value["ParentUnitId"].asString());
if(!value["UnitId"].isNull())
financeUnitDtoListItemObject.unitId = std::stol(value["UnitId"].asString());
if(!value["UnitName"].isNull())
financeUnitDtoListItemObject.unitName = value["UnitName"].asString();
data_.financeUnitDtoList.push_back(financeUnitDtoListItemObject);
}
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 CreateFinanceUnitResult::getMessage()const
{
return message_;
}
CreateFinanceUnitResult::Data CreateFinanceUnitResult::getData()const
{
return data_;
}
std::string CreateFinanceUnitResult::getCode()const
{
return code_;
}
bool CreateFinanceUnitResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/bssopenapi/model/DeleteFinanceUnitRequest.h>
using AlibabaCloud::BssOpenApi::Model::DeleteFinanceUnitRequest;
DeleteFinanceUnitRequest::DeleteFinanceUnitRequest() :
RpcServiceRequest("bssopenapi", "2017-12-14", "DeleteFinanceUnit")
{}
DeleteFinanceUnitRequest::~DeleteFinanceUnitRequest()
{}
long DeleteFinanceUnitRequest::getUnitId()const
{
return unitId_;
}
void DeleteFinanceUnitRequest::setUnitId(long unitId)
{
unitId_ = unitId;
setCoreParameter("UnitId", std::to_string(unitId));
}
long DeleteFinanceUnitRequest::getOwnerUid()const
{
return ownerUid_;
}
void DeleteFinanceUnitRequest::setOwnerUid(long ownerUid)
{
ownerUid_ = ownerUid;
setCoreParameter("OwnerUid", std::to_string(ownerUid));
}

View File

@@ -0,0 +1,77 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/bssopenapi/model/DeleteFinanceUnitResult.h>
#include <json/json.h>
using namespace AlibabaCloud::BssOpenApi;
using namespace AlibabaCloud::BssOpenApi::Model;
DeleteFinanceUnitResult::DeleteFinanceUnitResult() :
ServiceResult()
{}
DeleteFinanceUnitResult::DeleteFinanceUnitResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteFinanceUnitResult::~DeleteFinanceUnitResult()
{}
void DeleteFinanceUnitResult::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["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(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string DeleteFinanceUnitResult::getMessage()const
{
return message_;
}
DeleteFinanceUnitResult::Data DeleteFinanceUnitResult::getData()const
{
return data_;
}
std::string DeleteFinanceUnitResult::getCode()const
{
return code_;
}
bool DeleteFinanceUnitResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,45 @@
/*
* 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/ModifyFinanceUnitRequest.h>
using AlibabaCloud::BssOpenApi::Model::ModifyFinanceUnitRequest;
ModifyFinanceUnitRequest::ModifyFinanceUnitRequest() :
RpcServiceRequest("bssopenapi", "2017-12-14", "ModifyFinanceUnit")
{}
ModifyFinanceUnitRequest::~ModifyFinanceUnitRequest()
{}
std::vector<ModifyFinanceUnitRequest::UnitEntityList> ModifyFinanceUnitRequest::getUnitEntityList()const
{
return unitEntityList_;
}
void ModifyFinanceUnitRequest::setUnitEntityList(const std::vector<UnitEntityList>& unitEntityList)
{
unitEntityList_ = unitEntityList;
int i = 0;
for(int i = 0; i!= unitEntityList.size(); i++) {
auto obj = unitEntityList.at(i);
std::string str ="UnitEntityList."+ std::to_string(i);
setCoreParameter(str + ".UnitName", obj.unitName);
setCoreParameter(str + ".UnitId", std::to_string(obj.unitId));
setCoreParameter(str + ".OwnerUid", std::to_string(obj.ownerUid));
}
}

View File

@@ -0,0 +1,82 @@
/*
* 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/ModifyFinanceUnitResult.h>
#include <json/json.h>
using namespace AlibabaCloud::BssOpenApi;
using namespace AlibabaCloud::BssOpenApi::Model;
ModifyFinanceUnitResult::ModifyFinanceUnitResult() :
ServiceResult()
{}
ModifyFinanceUnitResult::ModifyFinanceUnitResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ModifyFinanceUnitResult::~ModifyFinanceUnitResult()
{}
void ModifyFinanceUnitResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allData = value["Data"]["DataItem"];
for (auto value : allData)
{
DataItem dataObject;
if(!value["OwnerUid"].isNull())
dataObject.ownerUid = std::stol(value["OwnerUid"].asString());
if(!value["UnitId"].isNull())
dataObject.unitId = std::stol(value["UnitId"].asString());
if(!value["IsSuccess"].isNull())
dataObject.isSuccess = value["IsSuccess"].asString() == "true";
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();
}
std::string ModifyFinanceUnitResult::getMessage()const
{
return message_;
}
std::vector<ModifyFinanceUnitResult::DataItem> ModifyFinanceUnitResult::getData()const
{
return data_;
}
std::string ModifyFinanceUnitResult::getCode()const
{
return code_;
}
bool ModifyFinanceUnitResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,71 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/bssopenapi/model/QueryFinanceUnitRequest.h>
using AlibabaCloud::BssOpenApi::Model::QueryFinanceUnitRequest;
QueryFinanceUnitRequest::QueryFinanceUnitRequest() :
RpcServiceRequest("bssopenapi", "2017-12-14", "QueryFinanceUnit")
{}
QueryFinanceUnitRequest::~QueryFinanceUnitRequest()
{}
int QueryFinanceUnitRequest::getPageNum()const
{
return pageNum_;
}
void QueryFinanceUnitRequest::setPageNum(int pageNum)
{
pageNum_ = pageNum;
setCoreParameter("PageNum", std::to_string(pageNum));
}
int QueryFinanceUnitRequest::getPageSize()const
{
return pageSize_;
}
void QueryFinanceUnitRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setCoreParameter("PageSize", std::to_string(pageSize));
}
long QueryFinanceUnitRequest::getUnitId()const
{
return unitId_;
}
void QueryFinanceUnitRequest::setUnitId(long unitId)
{
unitId_ = unitId;
setCoreParameter("UnitId", std::to_string(unitId));
}
long QueryFinanceUnitRequest::getOwnerUid()const
{
return ownerUid_;
}
void QueryFinanceUnitRequest::setOwnerUid(long ownerUid)
{
ownerUid_ = ownerUid;
setCoreParameter("OwnerUid", std::to_string(ownerUid));
}

View File

@@ -0,0 +1,71 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/bssopenapi/model/QueryFinanceUnitResourceRequest.h>
using AlibabaCloud::BssOpenApi::Model::QueryFinanceUnitResourceRequest;
QueryFinanceUnitResourceRequest::QueryFinanceUnitResourceRequest() :
RpcServiceRequest("bssopenapi", "2017-12-14", "QueryFinanceUnitResource")
{}
QueryFinanceUnitResourceRequest::~QueryFinanceUnitResourceRequest()
{}
int QueryFinanceUnitResourceRequest::getPageNum()const
{
return pageNum_;
}
void QueryFinanceUnitResourceRequest::setPageNum(int pageNum)
{
pageNum_ = pageNum;
setCoreParameter("PageNum", std::to_string(pageNum));
}
int QueryFinanceUnitResourceRequest::getPageSize()const
{
return pageSize_;
}
void QueryFinanceUnitResourceRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setCoreParameter("PageSize", std::to_string(pageSize));
}
long QueryFinanceUnitResourceRequest::getUnitId()const
{
return unitId_;
}
void QueryFinanceUnitResourceRequest::setUnitId(long unitId)
{
unitId_ = unitId;
setCoreParameter("UnitId", std::to_string(unitId));
}
long QueryFinanceUnitResourceRequest::getOwnerUid()const
{
return ownerUid_;
}
void QueryFinanceUnitResourceRequest::setOwnerUid(long ownerUid)
{
ownerUid_ = ownerUid;
setCoreParameter("OwnerUid", std::to_string(ownerUid));
}

View File

@@ -0,0 +1,133 @@
/*
* 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/QueryFinanceUnitResourceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::BssOpenApi;
using namespace AlibabaCloud::BssOpenApi::Model;
QueryFinanceUnitResourceResult::QueryFinanceUnitResourceResult() :
ServiceResult()
{}
QueryFinanceUnitResourceResult::QueryFinanceUnitResourceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryFinanceUnitResourceResult::~QueryFinanceUnitResourceResult()
{}
void QueryFinanceUnitResourceResult::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["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());
auto allResourceInstanceDtoList = value["ResourceInstanceDtoList"]["ResourceInstanceList"];
for (auto value : allResourceInstanceDtoList)
{
Data::ResourceInstanceList resourceInstanceListObject;
if(!value["ResourceUserId"].isNull())
resourceInstanceListObject.resourceUserId = std::stol(value["ResourceUserId"].asString());
if(!value["ResourceId"].isNull())
resourceInstanceListObject.resourceId = std::stol(value["ResourceId"].asString());
if(!value["CommodityCode"].isNull())
resourceInstanceListObject.commodityCode = value["CommodityCode"].asString();
if(!value["ResourceUserName"].isNull())
resourceInstanceListObject.resourceUserName = value["ResourceUserName"].asString();
if(!value["CommodityName"].isNull())
resourceInstanceListObject.commodityName = value["CommodityName"].asString();
if(!value["ResourceGroup"].isNull())
resourceInstanceListObject.resourceGroup = value["ResourceGroup"].asString();
if(!value["ResourceTag"].isNull())
resourceInstanceListObject.resourceTag = value["ResourceTag"].asString();
if(!value["ResourceNick"].isNull())
resourceInstanceListObject.resourceNick = value["ResourceNick"].asString();
if(!value["ResourceType"].isNull())
resourceInstanceListObject.resourceType = value["ResourceType"].asString();
if(!value["ResourceStatus"].isNull())
resourceInstanceListObject.resourceStatus = value["ResourceStatus"].asString();
if(!value["RelatedResources"].isNull())
resourceInstanceListObject.relatedResources = value["RelatedResources"].asString();
if(!value["ApportionCode"].isNull())
resourceInstanceListObject.apportionCode = value["ApportionCode"].asString();
if(!value["ApportionName"].isNull())
resourceInstanceListObject.apportionName = value["ApportionName"].asString();
data_.resourceInstanceDtoList.push_back(resourceInstanceListObject);
}
auto financeUnitNode = dataNode["FinanceUnit"];
if(!financeUnitNode["OwnerUid"].isNull())
data_.financeUnit.ownerUid = std::stol(financeUnitNode["OwnerUid"].asString());
if(!financeUnitNode["ParentUnitId"].isNull())
data_.financeUnit.parentUnitId = std::stol(financeUnitNode["ParentUnitId"].asString());
if(!financeUnitNode["UnitId"].isNull())
data_.financeUnit.unitId = std::stol(financeUnitNode["UnitId"].asString());
if(!financeUnitNode["UnitName"].isNull())
data_.financeUnit.unitName = financeUnitNode["UnitName"].asString();
auto financeUnitStatisInfoNode = dataNode["FinanceUnitStatisInfo"];
if(!financeUnitStatisInfoNode["ResourceCount"].isNull())
data_.financeUnitStatisInfo.resourceCount = std::stol(financeUnitStatisInfoNode["ResourceCount"].asString());
if(!financeUnitStatisInfoNode["ResourceGroupCount"].isNull())
data_.financeUnitStatisInfo.resourceGroupCount = std::stol(financeUnitStatisInfoNode["ResourceGroupCount"].asString());
if(!financeUnitStatisInfoNode["SubUnitCount"].isNull())
data_.financeUnitStatisInfo.subUnitCount = std::stol(financeUnitStatisInfoNode["SubUnitCount"].asString());
if(!financeUnitStatisInfoNode["UserCount"].isNull())
data_.financeUnitStatisInfo.userCount = std::stol(financeUnitStatisInfoNode["UserCount"].asString());
if(!financeUnitStatisInfoNode["TotalResourceCount"].isNull())
data_.financeUnitStatisInfo.totalResourceCount = std::stol(financeUnitStatisInfoNode["TotalResourceCount"].asString());
if(!financeUnitStatisInfoNode["TotalUserCount"].isNull())
data_.financeUnitStatisInfo.totalUserCount = std::stol(financeUnitStatisInfoNode["TotalUserCount"].asString());
if(!financeUnitStatisInfoNode["TotalResourceGroupCount"].isNull())
data_.financeUnitStatisInfo.totalResourceGroupCount = std::stol(financeUnitStatisInfoNode["TotalResourceGroupCount"].asString());
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 QueryFinanceUnitResourceResult::getMessage()const
{
return message_;
}
QueryFinanceUnitResourceResult::Data QueryFinanceUnitResourceResult::getData()const
{
return data_;
}
std::string QueryFinanceUnitResourceResult::getCode()const
{
return code_;
}
bool QueryFinanceUnitResourceResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,91 @@
/*
* 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/QueryFinanceUnitResult.h>
#include <json/json.h>
using namespace AlibabaCloud::BssOpenApi;
using namespace AlibabaCloud::BssOpenApi::Model;
QueryFinanceUnitResult::QueryFinanceUnitResult() :
ServiceResult()
{}
QueryFinanceUnitResult::QueryFinanceUnitResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryFinanceUnitResult::~QueryFinanceUnitResult()
{}
void QueryFinanceUnitResult::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["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());
auto allFinanceUnitDtoList = value["FinanceUnitDtoList"]["FinanceUnitDtoListItem"];
for (auto value : allFinanceUnitDtoList)
{
Data::FinanceUnitDtoListItem financeUnitDtoListItemObject;
if(!value["OwnerUid"].isNull())
financeUnitDtoListItemObject.ownerUid = std::stol(value["OwnerUid"].asString());
if(!value["ParentUnitId"].isNull())
financeUnitDtoListItemObject.parentUnitId = std::stol(value["ParentUnitId"].asString());
if(!value["UnitId"].isNull())
financeUnitDtoListItemObject.unitId = std::stol(value["UnitId"].asString());
if(!value["UnitName"].isNull())
financeUnitDtoListItemObject.unitName = value["UnitName"].asString();
data_.financeUnitDtoList.push_back(financeUnitDtoListItemObject);
}
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 QueryFinanceUnitResult::getMessage()const
{
return message_;
}
QueryFinanceUnitResult::Data QueryFinanceUnitResult::getData()const
{
return data_;
}
std::string QueryFinanceUnitResult::getCode()const
{
return code_;
}
bool QueryFinanceUnitResult::getSuccess()const
{
return success_;
}