Support upgrade.
This commit is contained in:
@@ -35,20 +35,20 @@ namespace AlibabaCloud
|
||||
DbfsRecordRequest();
|
||||
~DbfsRecordRequest();
|
||||
|
||||
std::string getData()const;
|
||||
void setData(const std::string& data);
|
||||
int getPageNumber()const;
|
||||
void setPageNumber(int pageNumber);
|
||||
std::string getRegionId()const;
|
||||
void setRegionId(const std::string& regionId);
|
||||
int getPageSize()const;
|
||||
void setPageSize(int pageSize);
|
||||
std::string getBatchStrategyNo()const;
|
||||
void setBatchStrategyNo(const std::string& batchStrategyNo);
|
||||
|
||||
private:
|
||||
std::string data_;
|
||||
int pageNumber_;
|
||||
std::string regionId_;
|
||||
int pageSize_;
|
||||
std::string batchStrategyNo_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -58,11 +58,17 @@ namespace AlibabaCloud
|
||||
DbfsRecordResult();
|
||||
explicit DbfsRecordResult(const std::string &payload);
|
||||
~DbfsRecordResult();
|
||||
long getPageSize()const;
|
||||
long getTotal()const;
|
||||
long getPageNo()const;
|
||||
std::vector<RecordsItem> getRecords()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
long pageSize_;
|
||||
long total_;
|
||||
long pageNo_;
|
||||
std::vector<RecordsItem> records_;
|
||||
|
||||
};
|
||||
|
||||
@@ -27,6 +27,17 @@ DbfsRecordRequest::DbfsRecordRequest() :
|
||||
DbfsRecordRequest::~DbfsRecordRequest()
|
||||
{}
|
||||
|
||||
std::string DbfsRecordRequest::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
void DbfsRecordRequest::setData(const std::string& data)
|
||||
{
|
||||
data_ = data;
|
||||
setParameter("Data", data);
|
||||
}
|
||||
|
||||
int DbfsRecordRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
@@ -60,14 +71,3 @@ void DbfsRecordRequest::setPageSize(int pageSize)
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DbfsRecordRequest::getBatchStrategyNo()const
|
||||
{
|
||||
return batchStrategyNo_;
|
||||
}
|
||||
|
||||
void DbfsRecordRequest::setBatchStrategyNo(const std::string& batchStrategyNo)
|
||||
{
|
||||
batchStrategyNo_ = batchStrategyNo;
|
||||
setParameter("BatchStrategyNo", batchStrategyNo);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,9 +81,30 @@ void DbfsRecordResult::parse(const std::string &payload)
|
||||
recordsObject.isDel = valueRecordsRecordsItem["IsDel"].asString();
|
||||
records_.push_back(recordsObject);
|
||||
}
|
||||
if(!value["PageNo"].isNull())
|
||||
pageNo_ = std::stol(value["PageNo"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stol(value["PageSize"].asString());
|
||||
if(!value["Total"].isNull())
|
||||
total_ = std::stol(value["Total"].asString());
|
||||
|
||||
}
|
||||
|
||||
long DbfsRecordResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
long DbfsRecordResult::getTotal()const
|
||||
{
|
||||
return total_;
|
||||
}
|
||||
|
||||
long DbfsRecordResult::getPageNo()const
|
||||
{
|
||||
return pageNo_;
|
||||
}
|
||||
|
||||
std::vector<DbfsRecordResult::RecordsItem> DbfsRecordResult::getRecords()const
|
||||
{
|
||||
return records_;
|
||||
|
||||
Reference in New Issue
Block a user