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


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/?_=1740667714316&timestamp=1740671542097#/api?product=AI&project=%E6%96%87%E5%AD%97%E8%AF%86%E5%88%AB&parent=%E6%96%87%E6%A1%A3%E5%9B%BE%E5%83%8F%E5%A4%84%E7%90%86&api=rest%2F2.0%2Focr%2Fv1%2Fdoc_classify&method=post
 *
 * 文件检测分类
 */
@NoArgsConstructor
@Data
public class BDocClassifyResp extends BBaseResp {


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

    @NoArgsConstructor
    @Data
    public static class WordsResultDTO {
        @JsonProperty("probablity")
        private Double probablity;
        @JsonProperty("location")
        private LocationDTO location;
        @JsonProperty("type")
        private String type;

        @NoArgsConstructor
        @Data
        public static class LocationDTO {
            @JsonProperty("top")
            private Integer top;
            @JsonProperty("left")
            private Integer left;
            @JsonProperty("width")
            private Integer width;
            @JsonProperty("height")
            private Integer height;
        }
    }
}
