package com.heyu.api.baidu.response.traffic;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.heyu.api.baidu.response.BBaseResp;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 *
 *https://console.bce.baidu.com/support/?_=1740219852952&timestamp=1740325926517#/api?product=AI&project=%E6%96%87%E5%AD%97%E8%AF%86%E5%88%AB&parent=%E4%BA%A4%E9%80%9A%E5%9C%BA%E6%99%AFOCR&api=rest%2F2.0%2Focr%2Fv1%2Flicense_plate&method=post
 *
 * 车牌识别
 *
 *
 *
 * {
 * 	"words_result": [
 * 		        {
 * 			"color": "blue",
 * 			"number": "京KBT355",
 * 			"probability": [
 * 				0.9999992847,
 * 				0.999999404,
 * 				0.9999910593,
 * 				0.9999765158,
 * 				0.999994874,
 * 				0.9998959303,
 * 				0.9999984503
 * 			],
 * 			"vertexes_location": [
 *                {
 * 					"x": 495,
 * 					"y": 589
 *                },
 *                {
 * 					"x": 800,
 * 					"y": 587
 *                },
 *                {
 * 					"x": 800,
 * 					"y": 676
 *                },
 *                {
 * 					"x": 496,
 * 					"y": 678
 *                }
 * 			]
 *        }
 * 	],
 * 	"log_id": "6845817085824549137"
 * }
 */
@NoArgsConstructor
@Data
public class BLicensePlateResp  extends BBaseResp {


    @JsonProperty("words_result")
    private List<WordsResultDTO> wordsResult;
    @JsonProperty("log_id")
    private String logId;

    @NoArgsConstructor
    @Data
    public static class WordsResultDTO {
        @JsonProperty("color")
        private String color;
        @JsonProperty("number")
        private String number;
        @JsonProperty("probability")
        private List<Double> probability;
        @JsonProperty("cover_info")
        private String coverInfo;
        @JsonProperty("edit_tool")
        private String editTool;

        @JsonProperty("vertexes_location")
        private List<VertexesLocationDTO> vertexesLocation;

        @NoArgsConstructor
        @Data
        public static class VertexesLocationDTO {
            @JsonProperty("x")
            private Integer x;
            @JsonProperty("y")
            private Integer y;
        }
    }
}
