Generated 2017-12-14 for BssOpenApi.
This commit is contained in:
@@ -14,76 +14,76 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/bssopenapi/model/AllocateFinanceUnitResourceRequest.h>
|
||||
#include <alibabacloud/bssopenapi/model/AllocateCostUnitResourceRequest.h>
|
||||
|
||||
using AlibabaCloud::BssOpenApi::Model::AllocateFinanceUnitResourceRequest;
|
||||
using AlibabaCloud::BssOpenApi::Model::AllocateCostUnitResourceRequest;
|
||||
|
||||
AllocateFinanceUnitResourceRequest::AllocateFinanceUnitResourceRequest() :
|
||||
RpcServiceRequest("bssopenapi", "2017-12-14", "AllocateFinanceUnitResource")
|
||||
AllocateCostUnitResourceRequest::AllocateCostUnitResourceRequest() :
|
||||
RpcServiceRequest("bssopenapi", "2017-12-14", "AllocateCostUnitResource")
|
||||
{}
|
||||
|
||||
AllocateFinanceUnitResourceRequest::~AllocateFinanceUnitResourceRequest()
|
||||
AllocateCostUnitResourceRequest::~AllocateCostUnitResourceRequest()
|
||||
{}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
std::vector<AllocateCostUnitResourceRequest::ResourceInstanceList> AllocateCostUnitResourceRequest::getResourceInstanceList()const
|
||||
{
|
||||
return resourceInstanceList_;
|
||||
}
|
||||
|
||||
void AllocateCostUnitResourceRequest::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 AllocateCostUnitResourceRequest::getFromUnitId()const
|
||||
{
|
||||
return fromUnitId_;
|
||||
}
|
||||
|
||||
void AllocateCostUnitResourceRequest::setFromUnitId(long fromUnitId)
|
||||
{
|
||||
fromUnitId_ = fromUnitId;
|
||||
setCoreParameter("FromUnitId", std::to_string(fromUnitId));
|
||||
}
|
||||
|
||||
long AllocateCostUnitResourceRequest::getToUnitId()const
|
||||
{
|
||||
return toUnitId_;
|
||||
}
|
||||
|
||||
void AllocateCostUnitResourceRequest::setToUnitId(long toUnitId)
|
||||
{
|
||||
toUnitId_ = toUnitId;
|
||||
setCoreParameter("ToUnitId", std::to_string(toUnitId));
|
||||
}
|
||||
|
||||
long AllocateCostUnitResourceRequest::getFromUnitUserId()const
|
||||
{
|
||||
return fromUnitUserId_;
|
||||
}
|
||||
|
||||
void AllocateCostUnitResourceRequest::setFromUnitUserId(long fromUnitUserId)
|
||||
{
|
||||
fromUnitUserId_ = fromUnitUserId;
|
||||
setCoreParameter("FromUnitUserId", std::to_string(fromUnitUserId));
|
||||
}
|
||||
|
||||
long AllocateCostUnitResourceRequest::getToUnitUserId()const
|
||||
{
|
||||
return toUnitUserId_;
|
||||
}
|
||||
|
||||
void AllocateCostUnitResourceRequest::setToUnitUserId(long toUnitUserId)
|
||||
{
|
||||
toUnitUserId_ = toUnitUserId;
|
||||
setCoreParameter("ToUnitUserId", std::to_string(toUnitUserId));
|
||||
}
|
||||
|
||||
@@ -14,26 +14,26 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/bssopenapi/model/AllocateFinanceUnitResourceResult.h>
|
||||
#include <alibabacloud/bssopenapi/model/AllocateCostUnitResourceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::BssOpenApi;
|
||||
using namespace AlibabaCloud::BssOpenApi::Model;
|
||||
|
||||
AllocateFinanceUnitResourceResult::AllocateFinanceUnitResourceResult() :
|
||||
AllocateCostUnitResourceResult::AllocateCostUnitResourceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
AllocateFinanceUnitResourceResult::AllocateFinanceUnitResourceResult(const std::string &payload) :
|
||||
AllocateCostUnitResourceResult::AllocateCostUnitResourceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
AllocateFinanceUnitResourceResult::~AllocateFinanceUnitResourceResult()
|
||||
AllocateCostUnitResourceResult::~AllocateCostUnitResourceResult()
|
||||
{}
|
||||
|
||||
void AllocateFinanceUnitResourceResult::parse(const std::string &payload)
|
||||
void AllocateCostUnitResourceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
@@ -55,22 +55,22 @@ void AllocateFinanceUnitResourceResult::parse(const std::string &payload)
|
||||
|
||||
}
|
||||
|
||||
std::string AllocateFinanceUnitResourceResult::getMessage()const
|
||||
std::string AllocateCostUnitResourceResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
AllocateFinanceUnitResourceResult::Data AllocateFinanceUnitResourceResult::getData()const
|
||||
AllocateCostUnitResourceResult::Data AllocateCostUnitResourceResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string AllocateFinanceUnitResourceResult::getCode()const
|
||||
std::string AllocateCostUnitResourceResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool AllocateFinanceUnitResourceResult::getSuccess()const
|
||||
bool AllocateCostUnitResourceResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
@@ -14,32 +14,32 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/bssopenapi/model/CreateFinanceUnitRequest.h>
|
||||
#include <alibabacloud/bssopenapi/model/CreateCostUnitRequest.h>
|
||||
|
||||
using AlibabaCloud::BssOpenApi::Model::CreateFinanceUnitRequest;
|
||||
using AlibabaCloud::BssOpenApi::Model::CreateCostUnitRequest;
|
||||
|
||||
CreateFinanceUnitRequest::CreateFinanceUnitRequest() :
|
||||
RpcServiceRequest("bssopenapi", "2017-12-14", "CreateFinanceUnit")
|
||||
CreateCostUnitRequest::CreateCostUnitRequest() :
|
||||
RpcServiceRequest("bssopenapi", "2017-12-14", "CreateCostUnit")
|
||||
{}
|
||||
|
||||
CreateFinanceUnitRequest::~CreateFinanceUnitRequest()
|
||||
CreateCostUnitRequest::~CreateCostUnitRequest()
|
||||
{}
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<CreateCostUnitRequest::UnitEntityList> CreateCostUnitRequest::getUnitEntityList()const
|
||||
{
|
||||
return unitEntityList_;
|
||||
}
|
||||
|
||||
void CreateCostUnitRequest::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));
|
||||
}
|
||||
}
|
||||
|
||||
85
bssopenapi/src/model/CreateCostUnitResult.cc
Normal file
85
bssopenapi/src/model/CreateCostUnitResult.cc
Normal 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/CreateCostUnitResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::BssOpenApi;
|
||||
using namespace AlibabaCloud::BssOpenApi::Model;
|
||||
|
||||
CreateCostUnitResult::CreateCostUnitResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateCostUnitResult::CreateCostUnitResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateCostUnitResult::~CreateCostUnitResult()
|
||||
{}
|
||||
|
||||
void CreateCostUnitResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
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["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();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateCostUnitResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
CreateCostUnitResult::Data CreateCostUnitResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string CreateCostUnitResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool CreateCostUnitResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
/*
|
||||
* 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 allFinanceUnitDtoListNode = dataNode["FinanceUnitDtoList"]["FinanceUnitDtoListItem"];
|
||||
for (auto dataNodeFinanceUnitDtoListFinanceUnitDtoListItem : allFinanceUnitDtoListNode)
|
||||
{
|
||||
Data::FinanceUnitDtoListItem financeUnitDtoListItemObject;
|
||||
if(!dataNodeFinanceUnitDtoListFinanceUnitDtoListItem["OwnerUid"].isNull())
|
||||
financeUnitDtoListItemObject.ownerUid = std::stol(dataNodeFinanceUnitDtoListFinanceUnitDtoListItem["OwnerUid"].asString());
|
||||
if(!dataNodeFinanceUnitDtoListFinanceUnitDtoListItem["ParentUnitId"].isNull())
|
||||
financeUnitDtoListItemObject.parentUnitId = std::stol(dataNodeFinanceUnitDtoListFinanceUnitDtoListItem["ParentUnitId"].asString());
|
||||
if(!dataNodeFinanceUnitDtoListFinanceUnitDtoListItem["UnitId"].isNull())
|
||||
financeUnitDtoListItemObject.unitId = std::stol(dataNodeFinanceUnitDtoListFinanceUnitDtoListItem["UnitId"].asString());
|
||||
if(!dataNodeFinanceUnitDtoListFinanceUnitDtoListItem["UnitName"].isNull())
|
||||
financeUnitDtoListItemObject.unitName = dataNodeFinanceUnitDtoListFinanceUnitDtoListItem["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_;
|
||||
}
|
||||
|
||||
@@ -14,36 +14,36 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/bssopenapi/model/DeleteFinanceUnitRequest.h>
|
||||
#include <alibabacloud/bssopenapi/model/DeleteCostUnitRequest.h>
|
||||
|
||||
using AlibabaCloud::BssOpenApi::Model::DeleteFinanceUnitRequest;
|
||||
using AlibabaCloud::BssOpenApi::Model::DeleteCostUnitRequest;
|
||||
|
||||
DeleteFinanceUnitRequest::DeleteFinanceUnitRequest() :
|
||||
RpcServiceRequest("bssopenapi", "2017-12-14", "DeleteFinanceUnit")
|
||||
DeleteCostUnitRequest::DeleteCostUnitRequest() :
|
||||
RpcServiceRequest("bssopenapi", "2017-12-14", "DeleteCostUnit")
|
||||
{}
|
||||
|
||||
DeleteFinanceUnitRequest::~DeleteFinanceUnitRequest()
|
||||
DeleteCostUnitRequest::~DeleteCostUnitRequest()
|
||||
{}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
long DeleteCostUnitRequest::getUnitId()const
|
||||
{
|
||||
return unitId_;
|
||||
}
|
||||
|
||||
void DeleteCostUnitRequest::setUnitId(long unitId)
|
||||
{
|
||||
unitId_ = unitId;
|
||||
setCoreParameter("UnitId", std::to_string(unitId));
|
||||
}
|
||||
|
||||
long DeleteCostUnitRequest::getOwnerUid()const
|
||||
{
|
||||
return ownerUid_;
|
||||
}
|
||||
|
||||
void DeleteCostUnitRequest::setOwnerUid(long ownerUid)
|
||||
{
|
||||
ownerUid_ = ownerUid;
|
||||
setCoreParameter("OwnerUid", std::to_string(ownerUid));
|
||||
}
|
||||
|
||||
@@ -14,26 +14,26 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/bssopenapi/model/DeleteFinanceUnitResult.h>
|
||||
#include <alibabacloud/bssopenapi/model/DeleteCostUnitResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::BssOpenApi;
|
||||
using namespace AlibabaCloud::BssOpenApi::Model;
|
||||
|
||||
DeleteFinanceUnitResult::DeleteFinanceUnitResult() :
|
||||
DeleteCostUnitResult::DeleteCostUnitResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteFinanceUnitResult::DeleteFinanceUnitResult(const std::string &payload) :
|
||||
DeleteCostUnitResult::DeleteCostUnitResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteFinanceUnitResult::~DeleteFinanceUnitResult()
|
||||
DeleteCostUnitResult::~DeleteCostUnitResult()
|
||||
{}
|
||||
|
||||
void DeleteFinanceUnitResult::parse(const std::string &payload)
|
||||
void DeleteCostUnitResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
@@ -55,22 +55,22 @@ void DeleteFinanceUnitResult::parse(const std::string &payload)
|
||||
|
||||
}
|
||||
|
||||
std::string DeleteFinanceUnitResult::getMessage()const
|
||||
std::string DeleteCostUnitResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
DeleteFinanceUnitResult::Data DeleteFinanceUnitResult::getData()const
|
||||
DeleteCostUnitResult::Data DeleteCostUnitResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string DeleteFinanceUnitResult::getCode()const
|
||||
std::string DeleteCostUnitResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool DeleteFinanceUnitResult::getSuccess()const
|
||||
bool DeleteCostUnitResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
@@ -14,32 +14,32 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/bssopenapi/model/ModifyFinanceUnitRequest.h>
|
||||
#include <alibabacloud/bssopenapi/model/ModifyCostUnitRequest.h>
|
||||
|
||||
using AlibabaCloud::BssOpenApi::Model::ModifyFinanceUnitRequest;
|
||||
using AlibabaCloud::BssOpenApi::Model::ModifyCostUnitRequest;
|
||||
|
||||
ModifyFinanceUnitRequest::ModifyFinanceUnitRequest() :
|
||||
RpcServiceRequest("bssopenapi", "2017-12-14", "ModifyFinanceUnit")
|
||||
ModifyCostUnitRequest::ModifyCostUnitRequest() :
|
||||
RpcServiceRequest("bssopenapi", "2017-12-14", "ModifyCostUnit")
|
||||
{}
|
||||
|
||||
ModifyFinanceUnitRequest::~ModifyFinanceUnitRequest()
|
||||
ModifyCostUnitRequest::~ModifyCostUnitRequest()
|
||||
{}
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<ModifyCostUnitRequest::UnitEntityList> ModifyCostUnitRequest::getUnitEntityList()const
|
||||
{
|
||||
return unitEntityList_;
|
||||
}
|
||||
|
||||
void ModifyCostUnitRequest::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 + ".NewUnitName", obj.newUnitName);
|
||||
setCoreParameter(str + ".UnitId", std::to_string(obj.unitId));
|
||||
setCoreParameter(str + ".OwnerUid", std::to_string(obj.ownerUid));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,26 +14,26 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/bssopenapi/model/ModifyFinanceUnitResult.h>
|
||||
#include <alibabacloud/bssopenapi/model/ModifyCostUnitResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::BssOpenApi;
|
||||
using namespace AlibabaCloud::BssOpenApi::Model;
|
||||
|
||||
ModifyFinanceUnitResult::ModifyFinanceUnitResult() :
|
||||
ModifyCostUnitResult::ModifyCostUnitResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ModifyFinanceUnitResult::ModifyFinanceUnitResult(const std::string &payload) :
|
||||
ModifyCostUnitResult::ModifyCostUnitResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ModifyFinanceUnitResult::~ModifyFinanceUnitResult()
|
||||
ModifyCostUnitResult::~ModifyCostUnitResult()
|
||||
{}
|
||||
|
||||
void ModifyFinanceUnitResult::parse(const std::string &payload)
|
||||
void ModifyCostUnitResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
@@ -60,22 +60,22 @@ void ModifyFinanceUnitResult::parse(const std::string &payload)
|
||||
|
||||
}
|
||||
|
||||
std::string ModifyFinanceUnitResult::getMessage()const
|
||||
std::string ModifyCostUnitResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::vector<ModifyFinanceUnitResult::DataItem> ModifyFinanceUnitResult::getData()const
|
||||
std::vector<ModifyCostUnitResult::DataItem> ModifyCostUnitResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string ModifyFinanceUnitResult::getCode()const
|
||||
std::string ModifyCostUnitResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ModifyFinanceUnitResult::getSuccess()const
|
||||
bool ModifyCostUnitResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
@@ -14,58 +14,58 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/bssopenapi/model/QueryFinanceUnitResourceRequest.h>
|
||||
#include <alibabacloud/bssopenapi/model/QueryCostUnitRequest.h>
|
||||
|
||||
using AlibabaCloud::BssOpenApi::Model::QueryFinanceUnitResourceRequest;
|
||||
using AlibabaCloud::BssOpenApi::Model::QueryCostUnitRequest;
|
||||
|
||||
QueryFinanceUnitResourceRequest::QueryFinanceUnitResourceRequest() :
|
||||
RpcServiceRequest("bssopenapi", "2017-12-14", "QueryFinanceUnitResource")
|
||||
QueryCostUnitRequest::QueryCostUnitRequest() :
|
||||
RpcServiceRequest("bssopenapi", "2017-12-14", "QueryCostUnit")
|
||||
{}
|
||||
|
||||
QueryFinanceUnitResourceRequest::~QueryFinanceUnitResourceRequest()
|
||||
QueryCostUnitRequest::~QueryCostUnitRequest()
|
||||
{}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
long QueryCostUnitRequest::getParentUnitId()const
|
||||
{
|
||||
return parentUnitId_;
|
||||
}
|
||||
|
||||
void QueryCostUnitRequest::setParentUnitId(long parentUnitId)
|
||||
{
|
||||
parentUnitId_ = parentUnitId;
|
||||
setCoreParameter("ParentUnitId", std::to_string(parentUnitId));
|
||||
}
|
||||
|
||||
int QueryCostUnitRequest::getPageNum()const
|
||||
{
|
||||
return pageNum_;
|
||||
}
|
||||
|
||||
void QueryCostUnitRequest::setPageNum(int pageNum)
|
||||
{
|
||||
pageNum_ = pageNum;
|
||||
setCoreParameter("PageNum", std::to_string(pageNum));
|
||||
}
|
||||
|
||||
int QueryCostUnitRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void QueryCostUnitRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
long QueryCostUnitRequest::getOwnerUid()const
|
||||
{
|
||||
return ownerUid_;
|
||||
}
|
||||
|
||||
void QueryCostUnitRequest::setOwnerUid(long ownerUid)
|
||||
{
|
||||
ownerUid_ = ownerUid;
|
||||
setCoreParameter("OwnerUid", std::to_string(ownerUid));
|
||||
}
|
||||
|
||||
@@ -14,58 +14,58 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/bssopenapi/model/QueryFinanceUnitRequest.h>
|
||||
#include <alibabacloud/bssopenapi/model/QueryCostUnitResourceRequest.h>
|
||||
|
||||
using AlibabaCloud::BssOpenApi::Model::QueryFinanceUnitRequest;
|
||||
using AlibabaCloud::BssOpenApi::Model::QueryCostUnitResourceRequest;
|
||||
|
||||
QueryFinanceUnitRequest::QueryFinanceUnitRequest() :
|
||||
RpcServiceRequest("bssopenapi", "2017-12-14", "QueryFinanceUnit")
|
||||
QueryCostUnitResourceRequest::QueryCostUnitResourceRequest() :
|
||||
RpcServiceRequest("bssopenapi", "2017-12-14", "QueryCostUnitResource")
|
||||
{}
|
||||
|
||||
QueryFinanceUnitRequest::~QueryFinanceUnitRequest()
|
||||
QueryCostUnitResourceRequest::~QueryCostUnitResourceRequest()
|
||||
{}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
int QueryCostUnitResourceRequest::getPageNum()const
|
||||
{
|
||||
return pageNum_;
|
||||
}
|
||||
|
||||
void QueryCostUnitResourceRequest::setPageNum(int pageNum)
|
||||
{
|
||||
pageNum_ = pageNum;
|
||||
setCoreParameter("PageNum", std::to_string(pageNum));
|
||||
}
|
||||
|
||||
int QueryCostUnitResourceRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void QueryCostUnitResourceRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
long QueryCostUnitResourceRequest::getUnitId()const
|
||||
{
|
||||
return unitId_;
|
||||
}
|
||||
|
||||
void QueryCostUnitResourceRequest::setUnitId(long unitId)
|
||||
{
|
||||
unitId_ = unitId;
|
||||
setCoreParameter("UnitId", std::to_string(unitId));
|
||||
}
|
||||
|
||||
long QueryCostUnitResourceRequest::getOwnerUid()const
|
||||
{
|
||||
return ownerUid_;
|
||||
}
|
||||
|
||||
void QueryCostUnitResourceRequest::setOwnerUid(long ownerUid)
|
||||
{
|
||||
ownerUid_ = ownerUid;
|
||||
setCoreParameter("OwnerUid", std::to_string(ownerUid));
|
||||
}
|
||||
|
||||
@@ -14,26 +14,26 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/bssopenapi/model/QueryFinanceUnitResourceResult.h>
|
||||
#include <alibabacloud/bssopenapi/model/QueryCostUnitResourceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::BssOpenApi;
|
||||
using namespace AlibabaCloud::BssOpenApi::Model;
|
||||
|
||||
QueryFinanceUnitResourceResult::QueryFinanceUnitResourceResult() :
|
||||
QueryCostUnitResourceResult::QueryCostUnitResourceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QueryFinanceUnitResourceResult::QueryFinanceUnitResourceResult(const std::string &payload) :
|
||||
QueryCostUnitResourceResult::QueryCostUnitResourceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QueryFinanceUnitResourceResult::~QueryFinanceUnitResourceResult()
|
||||
QueryCostUnitResourceResult::~QueryCostUnitResourceResult()
|
||||
{}
|
||||
|
||||
void QueryFinanceUnitResourceResult::parse(const std::string &payload)
|
||||
void QueryCostUnitResourceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
@@ -78,30 +78,30 @@ void QueryFinanceUnitResourceResult::parse(const std::string &payload)
|
||||
resourceInstanceListObject.apportionName = dataNodeResourceInstanceDtoListResourceInstanceList["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());
|
||||
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["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())
|
||||
@@ -111,22 +111,22 @@ void QueryFinanceUnitResourceResult::parse(const std::string &payload)
|
||||
|
||||
}
|
||||
|
||||
std::string QueryFinanceUnitResourceResult::getMessage()const
|
||||
std::string QueryCostUnitResourceResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
QueryFinanceUnitResourceResult::Data QueryFinanceUnitResourceResult::getData()const
|
||||
QueryCostUnitResourceResult::Data QueryCostUnitResourceResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string QueryFinanceUnitResourceResult::getCode()const
|
||||
std::string QueryCostUnitResourceResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool QueryFinanceUnitResourceResult::getSuccess()const
|
||||
bool QueryCostUnitResourceResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
91
bssopenapi/src/model/QueryCostUnitResult.cc
Normal file
91
bssopenapi/src/model/QueryCostUnitResult.cc
Normal 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/QueryCostUnitResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::BssOpenApi;
|
||||
using namespace AlibabaCloud::BssOpenApi::Model;
|
||||
|
||||
QueryCostUnitResult::QueryCostUnitResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QueryCostUnitResult::QueryCostUnitResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QueryCostUnitResult::~QueryCostUnitResult()
|
||||
{}
|
||||
|
||||
void QueryCostUnitResult::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 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["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();
|
||||
|
||||
}
|
||||
|
||||
std::string QueryCostUnitResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
QueryCostUnitResult::Data QueryCostUnitResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string QueryCostUnitResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool QueryCostUnitResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
/*
|
||||
* 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 allFinanceUnitDtoListNode = dataNode["FinanceUnitDtoList"]["FinanceUnitDtoListItem"];
|
||||
for (auto dataNodeFinanceUnitDtoListFinanceUnitDtoListItem : allFinanceUnitDtoListNode)
|
||||
{
|
||||
Data::FinanceUnitDtoListItem financeUnitDtoListItemObject;
|
||||
if(!dataNodeFinanceUnitDtoListFinanceUnitDtoListItem["OwnerUid"].isNull())
|
||||
financeUnitDtoListItemObject.ownerUid = std::stol(dataNodeFinanceUnitDtoListFinanceUnitDtoListItem["OwnerUid"].asString());
|
||||
if(!dataNodeFinanceUnitDtoListFinanceUnitDtoListItem["ParentUnitId"].isNull())
|
||||
financeUnitDtoListItemObject.parentUnitId = std::stol(dataNodeFinanceUnitDtoListFinanceUnitDtoListItem["ParentUnitId"].asString());
|
||||
if(!dataNodeFinanceUnitDtoListFinanceUnitDtoListItem["UnitId"].isNull())
|
||||
financeUnitDtoListItemObject.unitId = std::stol(dataNodeFinanceUnitDtoListFinanceUnitDtoListItem["UnitId"].asString());
|
||||
if(!dataNodeFinanceUnitDtoListFinanceUnitDtoListItem["UnitName"].isNull())
|
||||
financeUnitDtoListItemObject.unitName = dataNodeFinanceUnitDtoListFinanceUnitDtoListItem["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_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user