package com.zd.face.config;

import com.zd.face.valid.KeyNotNull;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotBlank;

/**
 * @Author: zhoupan
 * @Date: 2021/10/12/10:39
 * @Description:
 */
@ConfigurationProperties(prefix = "face" ,ignoreUnknownFields=true,ignoreInvalidFields=true)
@Validated
public class FaceProperties {

    boolean isInit;

    @NotBlank(message = "应用ID不能为空，请配置!")
    String appId;


//    @NotBlank(message = "sdk key 不能为空，请配置!")
    /**
     * 已放弃使用改为linuxKey和winKey
     */
    @Deprecated
    String sdkKey;

    String linuxKey;

    String winKey;

    public String getLinuxKey() {
        return linuxKey;
    }

    public void setLinuxKey(String linuxKey) {
        this.linuxKey = linuxKey;
    }

    public String getWinKey() {
        return winKey;
    }

    public void setWinKey(String winKey) {
        this.winKey = winKey;
    }

    /**
     * 是否激活
     */
    Boolean isActivation =false;
    /**
     * lib路径 暂时没有业务
     */
    String libPath;

    /**
     * 人脸对比匹配度阈值
     */
    float score = 0.8f;

    /**
     * 是否打开视频引擎
     */
    Boolean video=false;

    /**
     * 默认 arcsoft_lib
     */
    String lib_folder="arcsoft_lib";

    public boolean isInit() {
        return isInit;
    }

    public void setInit(boolean init) {
        isInit = init;
    }

    public Boolean getActivation() {
        return isActivation;
    }

    public void setActivation(Boolean activation) {
        isActivation = activation;
    }

    public String getLib_folder() {
        return lib_folder;
    }

    public void setLib_folder(String lib_folder) {
        this.lib_folder = lib_folder;
    }

    public Boolean getVideo() {
        return video;
    }

    public void setVideo(Boolean video) {
        this.video = video;
    }

    public float getScore() {
        return score;
    }

    public void setScore(float score) {
        this.score = score;
    }

    public String getLibPath() {
        return libPath;
    }

    public void setLibPath(String libPath) {
        this.libPath = libPath;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getSdkKey() {
        return sdkKey;
    }

    public void setSdkKey(String sdkKey) {
        this.sdkKey = sdkKey;
    }
}
