package com.pj.project4sp.face.handler.impl;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

@NoArgsConstructor
@Data
public class TencenRespBO implements Serializable {

    @JsonProperty("ImageWidth")
    private Integer imageWidth;
    @JsonProperty("ImageHeight")
    private Integer imageHeight;
    @JsonProperty("FaceInfos")
    private List<FaceInfosDTO> faceInfos;
    @JsonProperty("FaceModelVersion")
    private String faceModelVersion;
    @JsonProperty("RequestId")
    private String requestId;

    @NoArgsConstructor
    @Data
    public static class FaceInfosDTO {
        @JsonProperty("X")
        private Integer x;
        @JsonProperty("Y")
        private Integer y;
        @JsonProperty("Width")
        private Integer width;
        @JsonProperty("Height")
        private Integer height;
        @JsonProperty("FaceAttributesInfo")
        private FaceAttributesInfoDTO faceAttributesInfo;
        @JsonProperty("FaceQualityInfo")
        private FaceQualityInfoDTO faceQualityInfo;

        @NoArgsConstructor
        @Data
        public static class FaceAttributesInfoDTO {
            @JsonProperty("Gender")
            private Integer gender;
            @JsonProperty("Age")
            private Integer age;
            @JsonProperty("Expression")
            private Integer expression;
            @JsonProperty("Hat")
            private Boolean hat;
            @JsonProperty("Glass")
            private Boolean glass;
            @JsonProperty("EyeOpen")
            private Boolean eyeOpen;
            @JsonProperty("Mask")
            private Boolean mask;
            @JsonProperty("Hair")
            private HairDTO hair;
            @JsonProperty("Pitch")
            private Integer pitch;
            @JsonProperty("Yaw")
            private Integer yaw;
            @JsonProperty("Roll")
            private Integer roll;
            @JsonProperty("Beauty")
            private Integer beauty;

            @NoArgsConstructor
            @Data
            public static class HairDTO {
                @JsonProperty("Length")
                private Integer length;
                @JsonProperty("Bang")
                private Integer bang;
                @JsonProperty("Color")
                private Integer color;
            }
        }

        @NoArgsConstructor
        @Data
        public static class FaceQualityInfoDTO {
            @JsonProperty("Score")
            private Integer score;
            @JsonProperty("Sharpness")
            private Integer sharpness;
            @JsonProperty("Brightness")
            private Integer brightness;
            @JsonProperty("Completeness")
            private CompletenessDTO completeness;

            @NoArgsConstructor
            @Data
            public static class CompletenessDTO {
                @JsonProperty("Eyebrow")
                private Integer eyebrow;
                @JsonProperty("Eye")
                private Integer eye;
                @JsonProperty("Nose")
                private Integer nose;
                @JsonProperty("Cheek")
                private Integer cheek;
                @JsonProperty("Mouth")
                private Integer mouth;
                @JsonProperty("Chin")
                private Integer chin;
            }
        }
    }
}
