sdk-team преди 6 години
родител
ревизия
304717df66
променени са 4 файла, в които са добавени 43 реда и са изтрити 76 реда
  1. 3 0
      CHANGELOG
  2. 1 1
      VERSION
  3. 14 20
      vcs/include/alibabacloud/vcs/model/GetMonitorResultResult.h
  4. 25 55
      vcs/src/model/GetMonitorResultResult.cc

+ 3 - 0
CHANGELOG

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

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.431
+1.36.432

+ 14 - 20
vcs/include/alibabacloud/vcs/model/GetMonitorResultResult.h

@@ -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_;
 
 			};
 		}

+ 25 - 55
vcs/src/model/GetMonitorResultResult.cc

@@ -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)
+	auto dataNode = value["Data"];
+	if(!dataNode["MaxId"].isNull())
+		data_.maxId = dataNode["MaxId"].asString();
+	auto allRecordsNode = dataNode["Records"]["RecordsItem"];
+	for (auto dataNodeRecordsRecordsItem : 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);
+		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);
 	}
-	auto dataNode = value["Data"];
-	if(!dataNode["MaxRecordId"].isNull())
-		data_.maxRecordId = dataNode["MaxRecordId"].asString();
 	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_;
-}
-