Compare commits

..

3 Commits

Author SHA1 Message Date
sdk-team
ff1e74581f Add monitor related. 2020-05-26 10:29:43 +08:00
sdk-team
304717df66 Add monitor related. 2020-05-26 10:22:17 +08:00
sdk-team
d4d401ed4e Add monitor related. 2020-05-25 16:16:14 +08:00
4 changed files with 50 additions and 77 deletions

View File

@@ -1,3 +1,12 @@
2020-05-26 Version: 1.36.433
- Add monitor related.
2020-05-26 Version: 1.36.432
- Add monitor related.
2020-05-25 Version: 1.36.431
- Add monitor related.
2020-05-25 Version: 1.36.430
- Add monitor related.

View File

@@ -1 +1 @@
1.36.430
1.36.433

View File

@@ -34,42 +34,36 @@ namespace AlibabaCloud
public:
struct Data
{
std::string maxRecordId;
};
struct RecordsItem
{
std::string shotPicUrl;
std::string gbId;
std::string monitorPicUrl;
std::string shotTime;
struct RecordsItem
{
std::string leftUpX;
std::string leftUpY;
std::string score;
std::string rightBottomX;
std::string rightBottomY;
std::string gbId;
std::string monitorPicUrl;
std::string shotTime;
std::string picUrl;
};
std::string maxId;
std::vector<RecordsItem> records;
};
GetMonitorResultResult();
explicit GetMonitorResultResult(const std::string &payload);
~GetMonitorResultResult();
std::string getScore()const;
std::string getMessage()const;
std::string getRightBottomX()const;
std::string getRightBottomY()const;
Data getData()const;
std::string getLeftTopY()const;
std::vector<RecordsItem> getRecords()const;
std::string getCode()const;
std::string getLeftTopX()const;
protected:
void parse(const std::string &payload);
private:
std::string score_;
std::string message_;
std::string rightBottomX_;
std::string rightBottomY_;
Data data_;
std::string leftTopY_;
std::vector<RecordsItem> records_;
std::string code_;
std::string leftTopX_;
};
}

View File

@@ -39,82 +39,52 @@ void GetMonitorResultResult::parse(const std::string &payload)
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allRecordsNode = value["Records"]["RecordsItem"];
for (auto valueRecordsRecordsItem : allRecordsNode)
{
RecordsItem recordsObject;
if(!valueRecordsRecordsItem["GbId"].isNull())
recordsObject.gbId = valueRecordsRecordsItem["GbId"].asString();
if(!valueRecordsRecordsItem["ShotTime"].isNull())
recordsObject.shotTime = valueRecordsRecordsItem["ShotTime"].asString();
if(!valueRecordsRecordsItem["MonitorPicUrl"].isNull())
recordsObject.monitorPicUrl = valueRecordsRecordsItem["MonitorPicUrl"].asString();
if(!valueRecordsRecordsItem["ShotPicUrl"].isNull())
recordsObject.shotPicUrl = valueRecordsRecordsItem["ShotPicUrl"].asString();
records_.push_back(recordsObject);
}
auto dataNode = value["Data"];
if(!dataNode["MaxRecordId"].isNull())
data_.maxRecordId = dataNode["MaxRecordId"].asString();
if(!dataNode["MaxId"].isNull())
data_.maxId = dataNode["MaxId"].asString();
auto allRecordsNode = dataNode["Records"]["RecordsItem"];
for (auto dataNodeRecordsRecordsItem : allRecordsNode)
{
Data::RecordsItem recordsItemObject;
if(!dataNodeRecordsRecordsItem["RightBottomY"].isNull())
recordsItemObject.rightBottomY = dataNodeRecordsRecordsItem["RightBottomY"].asString();
if(!dataNodeRecordsRecordsItem["RightBottomX"].isNull())
recordsItemObject.rightBottomX = dataNodeRecordsRecordsItem["RightBottomX"].asString();
if(!dataNodeRecordsRecordsItem["LeftUpY"].isNull())
recordsItemObject.leftUpY = dataNodeRecordsRecordsItem["LeftUpY"].asString();
if(!dataNodeRecordsRecordsItem["LeftUpX"].isNull())
recordsItemObject.leftUpX = dataNodeRecordsRecordsItem["LeftUpX"].asString();
if(!dataNodeRecordsRecordsItem["GbId"].isNull())
recordsItemObject.gbId = dataNodeRecordsRecordsItem["GbId"].asString();
if(!dataNodeRecordsRecordsItem["Score"].isNull())
recordsItemObject.score = dataNodeRecordsRecordsItem["Score"].asString();
if(!dataNodeRecordsRecordsItem["PicUrl"].isNull())
recordsItemObject.picUrl = dataNodeRecordsRecordsItem["PicUrl"].asString();
if(!dataNodeRecordsRecordsItem["ShotTime"].isNull())
recordsItemObject.shotTime = dataNodeRecordsRecordsItem["ShotTime"].asString();
if(!dataNodeRecordsRecordsItem["MonitorPicUrl"].isNull())
recordsItemObject.monitorPicUrl = dataNodeRecordsRecordsItem["MonitorPicUrl"].asString();
data_.records.push_back(recordsItemObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Score"].isNull())
score_ = value["Score"].asString();
if(!value["LeftTopX"].isNull())
leftTopX_ = value["LeftTopX"].asString();
if(!value["LeftTopY"].isNull())
leftTopY_ = value["LeftTopY"].asString();
if(!value["RightBottomX"].isNull())
rightBottomX_ = value["RightBottomX"].asString();
if(!value["RightBottomY"].isNull())
rightBottomY_ = value["RightBottomY"].asString();
}
std::string GetMonitorResultResult::getScore()const
{
return score_;
}
std::string GetMonitorResultResult::getMessage()const
{
return message_;
}
std::string GetMonitorResultResult::getRightBottomX()const
{
return rightBottomX_;
}
std::string GetMonitorResultResult::getRightBottomY()const
{
return rightBottomY_;
}
GetMonitorResultResult::Data GetMonitorResultResult::getData()const
{
return data_;
}
std::string GetMonitorResultResult::getLeftTopY()const
{
return leftTopY_;
}
std::vector<GetMonitorResultResult::RecordsItem> GetMonitorResultResult::getRecords()const
{
return records_;
}
std::string GetMonitorResultResult::getCode()const
{
return code_;
}
std::string GetMonitorResultResult::getLeftTopX()const
{
return leftTopX_;
}